Registry V3 Lifecycle
V3 lifecycle rule endpoints
Lists lifecycle executions for the given scope, optionally filtered by policy.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
The page number for pagination (0-indexed).
Used to navigate through large result sets. Combined with size parameter
to control which subset of results to return.
Example: page=0 returns the first page, page=1 returns the second page
0The number of items to return per page.
Controls the page size for paginated results.
Example: size=50 returns up to 50 items per page
20Search term for filtering results.
Example: search_term=prod might match keys like "production", "prod-env", etc.
Scope of lifecycle rules/executions to list
- none – current space only (default)
- ancestors – current space plus all parent spaces
- descendants – current space plus all child spaces
If omitted, none is assumed.
Registry Package Type
Unique id for the registry. Note: This parameter should have one id if package query param is provided
["12345678-1234-1234-1234-123456789012","aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"]Filter executions by status.
Response for list lifecycle executions
Error response.
GET /api/v3/lifecycle/executions?account_identifier=text HTTP/1.1
Accept: */*
{
"hasMore": true,
"items": [
{
"completedAt": 1,
"createdAt": 1,
"id": "text",
"message": "text",
"orgIdentifier": "text",
"packagesAffected": 1,
"policyId": "text",
"policyName": "text",
"projectIdentifier": "text",
"protected": 1,
"registriesAffected": 1,
"startedAt": 1,
"status": "PENDING",
"storageReclaimed": "text",
"triggerType": "SCHEDULED",
"versionsDeleted": 1
}
],
"page": 1,
"size": 1
}Triggers a dry-run execution for a lifecycle rule.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Lifecycle dry-run execution created successfully
Name of the lifecycle policy that triggered this execution.
Error response.
POST /api/v3/lifecycle/executions?account_identifier=text HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"policyId": "text"
}{
"completedAt": 1,
"createdAt": 1,
"id": "text",
"message": "text",
"orgIdentifier": "text",
"packagesAffected": 1,
"policyId": "text",
"policyName": "text",
"projectIdentifier": "text",
"protected": 1,
"registriesAffected": 1,
"startedAt": 1,
"status": "PENDING",
"storageReclaimed": "text",
"triggerType": "SCHEDULED",
"versionsDeleted": 1
}Returns a specific lifecycle execution by ID.
The execution ID.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Lifecycle execution response
Name of the lifecycle policy that triggered this execution.
Error response.
GET /api/v3/lifecycle/executions/{executionId}?account_identifier=text HTTP/1.1
Accept: */*
{
"completedAt": 1,
"createdAt": 1,
"id": "text",
"message": "text",
"orgIdentifier": "text",
"packagesAffected": 1,
"policyId": "text",
"policyName": "text",
"projectIdentifier": "text",
"protected": 1,
"registriesAffected": 1,
"startedAt": 1,
"status": "PENDING",
"storageReclaimed": "text",
"triggerType": "SCHEDULED",
"versionsDeleted": 1
}Lists the artifact-level items evaluated during a lifecycle execution.
The execution ID.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
The page number for pagination (0-indexed).
Used to navigate through large result sets. Combined with size parameter
to control which subset of results to return.
Example: page=0 returns the first page, page=1 returns the second page
0The number of items to return per page.
Controls the page size for paginated results.
Example: size=50 returns up to 50 items per page
20Search term for filtering results.
Example: search_term=prod might match keys like "production", "prod-env", etc.
Registry Package Type
Unique id for the registry. Note: This parameter should have one id if package query param is provided
["12345678-1234-1234-1234-123456789012","aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"]Filter items by outcome status.
Scope of lifecycle rules/executions to list
- none – current space only (default)
- ancestors – current space plus all parent spaces
- descendants – current space plus all child spaces
If omitted, none is assumed.
Execution items list.
Error response.
GET /api/v3/lifecycle/executions/{executionId}/items?account_identifier=text HTTP/1.1
Accept: */*
{
"hasMore": true,
"items": [
{
"lastDownloadedAt": 1,
"orgIdentifier": "text",
"packageName": "text",
"packageType": "DOCKER",
"projectIdentifier": "text",
"reason": "text",
"registryName": "text",
"size": "text",
"status": "PROTECTED",
"version": "text",
"versionId": "text"
}
],
"page": 1,
"size": 1
}Lists lifecycle rules for the given scope.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Search term for filtering results.
Example: search_term=prod might match keys like "production", "prod-env", etc.
The page number for pagination (0-indexed).
Used to navigate through large result sets. Combined with size parameter
to control which subset of results to return.
Example: page=0 returns the first page, page=1 returns the second page
0The number of items to return per page.
Controls the page size for paginated results.
Example: size=50 returns up to 50 items per page
20The sort for the results.
Accepted pattern: sort_field:sort_order where sort_field is the field name
and sort_order is either asc or desc.
Examples: name:asc, modifiedAt:desc
Scope of lifecycle rules/executions to list
- none – current space only (default)
- ancestors – current space plus all parent spaces
- descendants – current space plus all child spaces
If omitted, none is assumed.
Registry Package Type
Unique id for the registry. Note: This parameter should have one id if package query param is provided
["12345678-1234-1234-1234-123456789012","aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"]Lifecycle action
Response for list lifecycle rules
Error response.
GET /api/v3/lifecycle/rules?account_identifier=text HTTP/1.1
Accept: */*
{
"hasMore": true,
"items": [
{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"createdAt": 1,
"createdBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"enabled": true,
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"hasLocalAssignment": true,
"id": "text",
"lastRunAt": 1,
"name": "text",
"nextRunAt": 1,
"orgIdentifier": "text",
"packageType": "text",
"projectIdentifier": "text",
"schedule": {
"expression": "text",
"timezone": "text"
},
"updatedAt": 1,
"updatedBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
}
}
],
"page": 1,
"size": 1
}Creates a new lifecycle rule.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Lifecycle rule created successfully
Whether the lifecycle rule is currently enabled.
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.
Epoch milliseconds of the last execution, if any.
Epoch milliseconds of the next scheduled execution, if any.
Error response.
POST /api/v3/lifecycle/rules?account_identifier=text HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 383
{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"name": "text",
"packageType": "text",
"schedule": {
"expression": "text",
"timezone": "text"
}
}{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"createdAt": 1,
"createdBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"enabled": true,
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"hasLocalAssignment": true,
"id": "text",
"lastRunAt": 1,
"name": "text",
"nextRunAt": 1,
"orgIdentifier": "text",
"packageType": "text",
"projectIdentifier": "text",
"schedule": {
"expression": "text",
"timezone": "text"
},
"updatedAt": 1,
"updatedBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
}
}Returns a specific lifecycle rule by ID.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Lifecycle rule response
Whether the lifecycle rule is currently enabled.
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.
Epoch milliseconds of the last execution, if any.
Epoch milliseconds of the next scheduled execution, if any.
Error response.
GET /api/v3/lifecycle/rules/{id}?account_identifier=text HTTP/1.1
Accept: */*
{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"createdAt": 1,
"createdBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"enabled": true,
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"hasLocalAssignment": true,
"id": "text",
"lastRunAt": 1,
"name": "text",
"nextRunAt": 1,
"orgIdentifier": "text",
"packageType": "text",
"projectIdentifier": "text",
"schedule": {
"expression": "text",
"timezone": "text"
},
"updatedAt": 1,
"updatedBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
}
}Updates an existing lifecycle rule.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Lifecycle rule updated successfully
Whether the lifecycle rule is currently enabled.
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.
Epoch milliseconds of the last execution, if any.
Epoch milliseconds of the next scheduled execution, if any.
Error response.
PUT /api/v3/lifecycle/rules/{id}?account_identifier=text HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 383
{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"name": "text",
"packageType": "text",
"schedule": {
"expression": "text",
"timezone": "text"
}
}{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"createdAt": 1,
"createdBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"enabled": true,
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"hasLocalAssignment": true,
"id": "text",
"lastRunAt": 1,
"name": "text",
"nextRunAt": 1,
"orgIdentifier": "text",
"packageType": "text",
"projectIdentifier": "text",
"schedule": {
"expression": "text",
"timezone": "text"
},
"updatedAt": 1,
"updatedBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
}
}Deletes a lifecycle rule. Only the owner scope may delete.
Unique identifier for the Harness account.
Lifecycle rule deleted successfully.
No content
Error response.
DELETE /api/v3/lifecycle/rules/{id}?account_identifier=text HTTP/1.1
Accept: */*
No content
Partially updates a lifecycle rule. Only provided fields are modified.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Partial update body for a lifecycle rule. Only provided fields are updated.
Enable or disable the lifecycle rule.
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Lifecycle rule response
Whether the lifecycle rule is currently enabled.
Filter configuration for a lifecycle rule, discriminated by packageType. Set packageType to select the correct variant: DOCKER, MAVEN, HUGGINGFACE, or any other supported type (generic variant).
Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.
Epoch milliseconds of the last execution, if any.
Epoch milliseconds of the next scheduled execution, if any.
Error response.
PATCH /api/v3/lifecycle/rules/{id}?account_identifier=text HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 398
{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"enabled": true,
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"name": "text",
"packageType": "text",
"schedule": {
"expression": "text",
"timezone": "text"
}
}{
"action": "DELETE",
"applyTo": {
"mode": "EXPLICIT",
"registries": [
"text"
]
},
"createdAt": 1,
"createdBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
},
"criteria": {
"match": "ANY",
"rules": [
{
"config": {
"unit": "DAYS",
"value": 1
},
"type": "KEEP_LAST_N"
}
]
},
"description": "text",
"enabled": true,
"filterConfig": {
"packageNameAllowedPattern": [
"text"
],
"packageType": "DOCKER",
"tagNameAllowedPattern": [
"text"
]
},
"hasLocalAssignment": true,
"id": "text",
"lastRunAt": 1,
"name": "text",
"nextRunAt": 1,
"orgIdentifier": "text",
"packageType": "text",
"projectIdentifier": "text",
"schedule": {
"expression": "text",
"timezone": "text"
},
"updatedAt": 1,
"updatedBy": {
"display_name": "text",
"email": "text",
"type": "text",
"uid": "text"
}
}Returns aggregate lifecycle execution metrics for the given scope.
Unique identifier for the Harness account.
Unique identifier for the organization within the account.
Example: default or engineering_org
Unique identifier for the project within the organization.
Example: my_project or frontend_services
Search term for filtering results.
Example: search_term=prod might match keys like "production", "prod-env", etc.
Scope of lifecycle rules/executions to list
- none – current space only (default)
- ancestors – current space plus all parent spaces
- descendants – current space plus all child spaces
If omitted, none is assumed.
Registry Package Type
Unique id for the registry. Note: This parameter should have one id if package query param is provided
["12345678-1234-1234-1234-123456789012","aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"]Lifecycle action
Lifecycle stats.
Aggregate lifecycle execution metrics for the requested scope.
Total artifact versions deleted across all executions.
Number of executions that ran in the last 30 days.
Total storage reclaimed (bytes) across all executions.
Error response.
GET /api/v3/lifecycle/stats?account_identifier=text HTTP/1.1
Accept: */*
{
"artifactsCleaned": 1,
"executionsLast30Days": 1,
"storageReclaimed": "text"
}Last updated
Was this helpful?