> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/ar/registry-v3-lifecycle.md).

# Registry V3 Lifecycle

V3 lifecycle rule endpoints

## List lifecycle executions

> Lists lifecycle executions for the given scope, optionally filtered by policy.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/executions":{"get":{"description":"Lists lifecycle executions for the given scope, optionally filtered by policy.","operationId":"ListLifecycleExecutionsV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/PageNumberV3"},{"$ref":"#/components/parameters/PageSizeV3"},{"$ref":"#/components/parameters/SearchTermV3"},{"$ref":"#/components/parameters/LifecycleScopeParamV3"},{"$ref":"#/components/parameters/PackageTypeListParamV3"},{"$ref":"#/components/parameters/RegistryIdListOptionalParamV3"},{"$ref":"#/components/parameters/LifecycleExecutionStatusParamV3"}],"responses":{"200":{"$ref":"#/components/responses/ListLifecycleExecutionsResponseV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"List lifecycle executions","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"PageNumberV3":{"description":"The page number for pagination (0-indexed).\n\nUsed to navigate through large result sets. Combined with `size` parameter\nto control which subset of results to return.\n\nExample: `page=0` returns the first page, `page=1` returns the second page\n","in":"query","name":"page","schema":{"default":0,"format":"int64","type":"integer"}},"PageSizeV3":{"description":"The number of items to return per page.\n\nControls the page size for paginated results. \n\nExample: `size=50` returns up to 50 items per page\n","in":"query","name":"size","schema":{"default":20,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},"SearchTermV3":{"description":"Search term for filtering results.\n\nExample: `search_term=prod` might match keys like \"production\", \"prod-env\", etc.\n","in":"query","name":"search_term","schema":{"type":"string"}},"LifecycleScopeParamV3":{"description":"**Scope of lifecycle rules/executions to list**\n* **none** – current space only (default)\n* **ancestors** – current space **plus** all parent spaces\n* **descendants** – current space **plus** all child spaces\n\nIf omitted, `none` is assumed.\n","in":"query","name":"scope","schema":{"enum":["ancestors","descendants","none"],"type":"string"}},"PackageTypeListParamV3":{"description":"Registry Package Type","in":"query","name":"package_types","schema":{"items":{"type":"string"},"type":"array"}},"RegistryIdListOptionalParamV3":{"description":"Unique id for the registry.\nNote: This parameter should have one id if package query param is provided\n","in":"query","name":"registry_ids","schema":{"items":{"format":"uuid","type":"string"},"type":"array"}},"LifecycleExecutionStatusParamV3":{"description":"Filter executions by status.","in":"query","name":"status","schema":{"enum":["PENDING","INPROGRESS","SUCCESS","FAILED"],"type":"string"}}},"responses":{"ListLifecycleExecutionsResponseV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLifecycleExecutionsResponseBodyV3"}}},"description":"Response for list lifecycle executions"}},"schemas":{"ListLifecycleExecutionsResponseBodyV3":{"properties":{"hasMore":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/LifecycleExecutionResponseV3"},"type":"array"},"page":{"format":"int64","type":"integer"},"size":{"format":"int64","type":"integer"}},"required":["items","hasMore","page","size"],"type":"object"},"LifecycleExecutionResponseV3":{"properties":{"completedAt":{"format":"int64","type":"integer"},"createdAt":{"format":"int64","type":"integer"},"id":{"type":"string"},"message":{"type":"string"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packagesAffected":{"format":"int64","type":"integer"},"policyId":{"type":"string"},"policyName":{"description":"Name of the lifecycle policy that triggered this execution.","type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"protected":{"format":"int64","type":"integer"},"registriesAffected":{"format":"int64","type":"integer"},"startedAt":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/LifecycleExecutionStatusV3"},"storageReclaimed":{"type":"string"},"triggerType":{"$ref":"#/components/schemas/LifecycleExecutionTriggerTypeV3"},"versionsDeleted":{"format":"int64","type":"integer"}},"required":["id","policyId","policyName","status","triggerType","createdAt","registriesAffected","packagesAffected","versionsDeleted","storageReclaimed","protected"],"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"LifecycleExecutionStatusV3":{"enum":["PENDING","INPROGRESS","SUCCESS","FAILED"],"type":"string"},"LifecycleExecutionTriggerTypeV3":{"enum":["SCHEDULED","DRY_RUN"],"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```

## Trigger a dry-run lifecycle execution

> Triggers a dry-run execution for a lifecycle rule.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/executions":{"post":{"description":"Triggers a dry-run execution for a lifecycle rule.","operationId":"CreateLifecycleExecutionV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleDryRunRequestBodyV3"}}},"required":true},"responses":{"201":{"$ref":"#/components/responses/LifecycleExecutionCreatedV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Trigger a dry-run lifecycle execution","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}}},"schemas":{"LifecycleDryRunRequestBodyV3":{"properties":{"policyId":{"type":"string"}},"required":["policyId"],"type":"object"},"LifecycleExecutionResponseV3":{"properties":{"completedAt":{"format":"int64","type":"integer"},"createdAt":{"format":"int64","type":"integer"},"id":{"type":"string"},"message":{"type":"string"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packagesAffected":{"format":"int64","type":"integer"},"policyId":{"type":"string"},"policyName":{"description":"Name of the lifecycle policy that triggered this execution.","type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"protected":{"format":"int64","type":"integer"},"registriesAffected":{"format":"int64","type":"integer"},"startedAt":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/LifecycleExecutionStatusV3"},"storageReclaimed":{"type":"string"},"triggerType":{"$ref":"#/components/schemas/LifecycleExecutionTriggerTypeV3"},"versionsDeleted":{"format":"int64","type":"integer"}},"required":["id","policyId","policyName","status","triggerType","createdAt","registriesAffected","packagesAffected","versionsDeleted","storageReclaimed","protected"],"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"LifecycleExecutionStatusV3":{"enum":["PENDING","INPROGRESS","SUCCESS","FAILED"],"type":"string"},"LifecycleExecutionTriggerTypeV3":{"enum":["SCHEDULED","DRY_RUN"],"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}},"responses":{"LifecycleExecutionCreatedV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleExecutionResponseV3"}}},"description":"Lifecycle dry-run execution created successfully"}}}}
```

## Get a lifecycle execution

> Returns a specific lifecycle execution by ID.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/executions/{executionId}":{"get":{"description":"Returns a specific lifecycle execution by ID.","operationId":"GetLifecycleExecutionV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"description":"The execution ID.","in":"path","name":"executionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/LifecycleExecutionResponseV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Get a lifecycle execution","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}}},"responses":{"LifecycleExecutionResponseV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleExecutionResponseV3"}}},"description":"Lifecycle execution response"}},"schemas":{"LifecycleExecutionResponseV3":{"properties":{"completedAt":{"format":"int64","type":"integer"},"createdAt":{"format":"int64","type":"integer"},"id":{"type":"string"},"message":{"type":"string"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packagesAffected":{"format":"int64","type":"integer"},"policyId":{"type":"string"},"policyName":{"description":"Name of the lifecycle policy that triggered this execution.","type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"protected":{"format":"int64","type":"integer"},"registriesAffected":{"format":"int64","type":"integer"},"startedAt":{"format":"int64","type":"integer"},"status":{"$ref":"#/components/schemas/LifecycleExecutionStatusV3"},"storageReclaimed":{"type":"string"},"triggerType":{"$ref":"#/components/schemas/LifecycleExecutionTriggerTypeV3"},"versionsDeleted":{"format":"int64","type":"integer"}},"required":["id","policyId","policyName","status","triggerType","createdAt","registriesAffected","packagesAffected","versionsDeleted","storageReclaimed","protected"],"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"LifecycleExecutionStatusV3":{"enum":["PENDING","INPROGRESS","SUCCESS","FAILED"],"type":"string"},"LifecycleExecutionTriggerTypeV3":{"enum":["SCHEDULED","DRY_RUN"],"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```

## List lifecycle execution items

> Lists the artifact-level items evaluated during a lifecycle execution.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/executions/{executionId}/items":{"get":{"description":"Lists the artifact-level items evaluated during a lifecycle execution.","operationId":"ListLifecycleExecutionItemsV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/PageNumberV3"},{"$ref":"#/components/parameters/PageSizeV3"},{"$ref":"#/components/parameters/SearchTermV3"},{"$ref":"#/components/parameters/PackageTypeListParamV3"},{"$ref":"#/components/parameters/RegistryIdListOptionalParamV3"},{"$ref":"#/components/parameters/LifecycleExecutionItemStatusParamV3"},{"$ref":"#/components/parameters/LifecycleScopeParamV3"},{"description":"The execution ID.","in":"path","name":"executionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLifecycleExecutionItemsResponseV3"}}},"description":"Execution items list."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"List lifecycle execution items","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"PageNumberV3":{"description":"The page number for pagination (0-indexed).\n\nUsed to navigate through large result sets. Combined with `size` parameter\nto control which subset of results to return.\n\nExample: `page=0` returns the first page, `page=1` returns the second page\n","in":"query","name":"page","schema":{"default":0,"format":"int64","type":"integer"}},"PageSizeV3":{"description":"The number of items to return per page.\n\nControls the page size for paginated results. \n\nExample: `size=50` returns up to 50 items per page\n","in":"query","name":"size","schema":{"default":20,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},"SearchTermV3":{"description":"Search term for filtering results.\n\nExample: `search_term=prod` might match keys like \"production\", \"prod-env\", etc.\n","in":"query","name":"search_term","schema":{"type":"string"}},"PackageTypeListParamV3":{"description":"Registry Package Type","in":"query","name":"package_types","schema":{"items":{"type":"string"},"type":"array"}},"RegistryIdListOptionalParamV3":{"description":"Unique id for the registry.\nNote: This parameter should have one id if package query param is provided\n","in":"query","name":"registry_ids","schema":{"items":{"format":"uuid","type":"string"},"type":"array"}},"LifecycleExecutionItemStatusParamV3":{"description":"Filter items by outcome status.","in":"query","name":"status","schema":{"enum":["PROTECTED","WOULD_BE_DELETED","DELETED"],"type":"string"}},"LifecycleScopeParamV3":{"description":"**Scope of lifecycle rules/executions to list**\n* **none** – current space only (default)\n* **ancestors** – current space **plus** all parent spaces\n* **descendants** – current space **plus** all child spaces\n\nIf omitted, `none` is assumed.\n","in":"query","name":"scope","schema":{"enum":["ancestors","descendants","none"],"type":"string"}}},"schemas":{"ListLifecycleExecutionItemsResponseV3":{"properties":{"hasMore":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/LifecycleExecutionItemResponseV3"},"type":"array"},"page":{"format":"int64","type":"integer"},"size":{"format":"int64","type":"integer"}},"required":["items","hasMore","page","size"],"type":"object"},"LifecycleExecutionItemResponseV3":{"description":"A single artifact version evaluated during a lifecycle execution.","properties":{"lastDownloadedAt":{"description":"Epoch milliseconds of the last download.","format":"int64","type":"integer"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packageName":{"type":"string"},"packageType":{"$ref":"#/components/schemas/PackageTypeV3"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"reason":{"description":"Reason the item was included or excluded.","type":"string"},"registryName":{"type":"string"},"size":{"type":"string"},"status":{"$ref":"#/components/schemas/LifecycleExecutionItemStatusV3"},"version":{"type":"string"},"versionId":{"type":"string"}},"required":["packageName","version","registryName","status"],"type":"object"},"orgIdentifier":{"type":"string"},"PackageTypeV3":{"description":"Package type. Known values include: DOCKER, MAVEN, PYTHON, GENERIC, HELM, HELM_HTTP, NUGET, NPM, RPM, CARGO, COMPOSER, GO, HUGGINGFACE, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, DEBIAN, CONAN, TERRAFORM, CRAN, WOLFI, ALPINE. This field is extensible; clients must handle unknown values.\n","type":"string"},"projectIdentifier":{"type":"string"},"LifecycleExecutionItemStatusV3":{"description":"Outcome of a lifecycle execution item.","enum":["PROTECTED","WOULD_BE_DELETED","DELETED"],"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```

## List lifecycle rules

> Lists lifecycle rules for the given scope.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/rules":{"get":{"description":"Lists lifecycle rules for the given scope.","operationId":"ListLifecycleRulesV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/SearchTermV3"},{"$ref":"#/components/parameters/PageNumberV3"},{"$ref":"#/components/parameters/PageSizeV3"},{"$ref":"#/components/parameters/SortV3"},{"$ref":"#/components/parameters/LifecycleScopeParamV3"},{"$ref":"#/components/parameters/PackageTypeListParamV3"},{"$ref":"#/components/parameters/RegistryIdListOptionalParamV3"},{"$ref":"#/components/parameters/LifecycleActionParamV3"}],"responses":{"200":{"$ref":"#/components/responses/ListLifecycleRulesResponseV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"List lifecycle rules","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"SearchTermV3":{"description":"Search term for filtering results.\n\nExample: `search_term=prod` might match keys like \"production\", \"prod-env\", etc.\n","in":"query","name":"search_term","schema":{"type":"string"}},"PageNumberV3":{"description":"The page number for pagination (0-indexed).\n\nUsed to navigate through large result sets. Combined with `size` parameter\nto control which subset of results to return.\n\nExample: `page=0` returns the first page, `page=1` returns the second page\n","in":"query","name":"page","schema":{"default":0,"format":"int64","type":"integer"}},"PageSizeV3":{"description":"The number of items to return per page.\n\nControls the page size for paginated results. \n\nExample: `size=50` returns up to 50 items per page\n","in":"query","name":"size","schema":{"default":20,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},"SortV3":{"description":"The sort for the results.\nAccepted pattern: `sort_field:sort_order` where sort_field is the field name\nand sort_order is either `asc` or `desc`.\n\nExamples: `name:asc`, `modifiedAt:desc`\n","in":"query","name":"sort","schema":{"type":"string"}},"LifecycleScopeParamV3":{"description":"**Scope of lifecycle rules/executions to list**\n* **none** – current space only (default)\n* **ancestors** – current space **plus** all parent spaces\n* **descendants** – current space **plus** all child spaces\n\nIf omitted, `none` is assumed.\n","in":"query","name":"scope","schema":{"enum":["ancestors","descendants","none"],"type":"string"}},"PackageTypeListParamV3":{"description":"Registry Package Type","in":"query","name":"package_types","schema":{"items":{"type":"string"},"type":"array"}},"RegistryIdListOptionalParamV3":{"description":"Unique id for the registry.\nNote: This parameter should have one id if package query param is provided\n","in":"query","name":"registry_ids","schema":{"items":{"format":"uuid","type":"string"},"type":"array"}},"LifecycleActionParamV3":{"description":"Lifecycle action","in":"query","name":"action","schema":{"enum":["DELETE","PROTECT"],"type":"string"}}},"responses":{"ListLifecycleRulesResponseV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLifecycleRulesResponseBodyV3"}}},"description":"Response for list lifecycle rules"}},"schemas":{"ListLifecycleRulesResponseBodyV3":{"properties":{"hasMore":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/LifecycleRuleResponseV3"},"type":"array"},"page":{"format":"int64","type":"integer"},"size":{"format":"int64","type":"integer"}},"required":["items","hasMore","page","size"],"type":"object"},"LifecycleRuleResponseV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"createdAt":{"format":"int64","type":"integer"},"createdBy":{"$ref":"#/components/schemas/UserInfoV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"enabled":{"description":"Whether the lifecycle rule is currently enabled.","type":"boolean"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"hasLocalAssignment":{"description":"Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.","type":"boolean"},"id":{"type":"string"},"lastRunAt":{"description":"Epoch milliseconds of the last execution, if any.","format":"int64","type":"integer"},"name":{"type":"string"},"nextRunAt":{"description":"Epoch milliseconds of the next scheduled execution, if any.","format":"int64","type":"integer"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packageType":{"type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"},"updatedAt":{"format":"int64","type":"integer"},"updatedBy":{"$ref":"#/components/schemas/UserInfoV3"}},"required":["id","name","action","applyTo","enabled","hasLocalAssignment"],"type":"object"},"LifecycleRuleActionV3":{"enum":["DELETE","PROTECT"],"type":"string"},"LifecycleRuleApplyToV3":{"properties":{"mode":{"$ref":"#/components/schemas/LifecycleRuleApplyToModeV3"},"registries":{"items":{"type":"string"},"type":"array"}},"required":["mode"],"type":"object"},"LifecycleRuleApplyToModeV3":{"enum":["EXPLICIT","ALL_IN_SCOPE"],"type":"string"},"UserInfoV3":{"description":"Structured user information for a principal","properties":{"display_name":{"description":"Human-readable display name","type":"string"},"email":{"description":"Email address","type":"string"},"type":{"description":"Principal type (user, service, service_account)","type":"string"},"uid":{"description":"Principal unique identifier (username)","type":"string"}},"type":"object"},"LifecycleRuleCriteriaV3":{"properties":{"match":{"$ref":"#/components/schemas/LifecycleRuleCriteriaMatchV3"},"rules":{"items":{"$ref":"#/components/schemas/LifecycleRuleCriteriaItemV3"},"type":"array"}},"required":["match","rules"],"type":"object"},"LifecycleRuleCriteriaMatchV3":{"enum":["ANY","ALL"],"type":"string"},"LifecycleRuleCriteriaItemV3":{"properties":{"config":{"$ref":"#/components/schemas/LifecycleRuleCriteriaConfigV3"},"type":{"$ref":"#/components/schemas/LifecycleRuleCriteriaTypeV3"}},"required":["type","config"],"type":"object"},"LifecycleRuleCriteriaConfigV3":{"properties":{"unit":{"$ref":"#/components/schemas/LifecycleRuleCriteriaUnitV3"},"value":{"format":"int64","type":"integer"}},"type":"object"},"LifecycleRuleCriteriaUnitV3":{"enum":["DAYS","MONTHS","YEARS"],"type":"string"},"LifecycleRuleCriteriaTypeV3":{"enum":["KEEP_LAST_N","AGE_BASED","UNUSED_FOR"],"type":"string"},"LifecycleRuleFilterConfigV3":{"description":"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).\n","discriminator":{"mapping":{"DOCKER":"#/components/schemas/LifecycleRuleFilterConfigDockerV3","HUGGINGFACE":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3","MAVEN":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},"propertyName":"packageType"},"oneOf":[{"$ref":"#/components/schemas/LifecycleRuleFilterConfigDockerV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigGenericV3"}]},"LifecycleRuleFilterConfigDockerV3":{"description":"Filter configuration for DOCKER package type.","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for image names to include (e.g. \"my-app*\").","items":{"type":"string"},"type":"array"},"packageType":{"enum":["DOCKER"],"type":"string"},"tagNameAllowedPattern":{"description":"Glob patterns for tag names to include (e.g. \"v1.*\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigMavenV3":{"description":"Filter configuration for MAVEN package type.","properties":{"groupIdAllowedPattern":{"description":"Glob patterns for Maven group IDs to include (e.g. \"com.example.*\").","items":{"type":"string"},"type":"array"},"packageNameAllowedPattern":{"description":"Glob patterns for artifact IDs to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["MAVEN"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include (e.g. \"*-SNAPSHOT\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigHuggingFaceV3":{"description":"Filter configuration for HUGGINGFACE package type.","properties":{"datasetAllowedPattern":{"description":"Glob patterns for dataset names to include.","items":{"type":"string"},"type":"array"},"modelAllowedPattern":{"description":"Glob patterns for model names to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["HUGGINGFACE"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version/revision names to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigGenericV3":{"description":"Filter configuration for package types that support only name and version filtering: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for package names to include.","items":{"type":"string"},"type":"array"},"packageType":{"description":"Package type. One of: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"LifecycleRuleScheduleV3":{"properties":{"expression":{"type":"string"},"timezone":{"type":"string"}},"required":["expression","timezone"],"type":"object"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```

## Create a lifecycle rule

> Creates a new lifecycle rule.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/rules":{"post":{"description":"Creates a new lifecycle rule.","operationId":"CreateLifecycleRuleV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRuleRequestBodyV3"}}},"required":true},"responses":{"201":{"$ref":"#/components/responses/LifecycleRuleCreatedV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Create a lifecycle rule","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}}},"schemas":{"LifecycleRuleRequestBodyV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"name":{"type":"string"},"packageType":{"type":"string"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"}},"required":["name","action","applyTo"],"type":"object"},"LifecycleRuleActionV3":{"enum":["DELETE","PROTECT"],"type":"string"},"LifecycleRuleApplyToV3":{"properties":{"mode":{"$ref":"#/components/schemas/LifecycleRuleApplyToModeV3"},"registries":{"items":{"type":"string"},"type":"array"}},"required":["mode"],"type":"object"},"LifecycleRuleApplyToModeV3":{"enum":["EXPLICIT","ALL_IN_SCOPE"],"type":"string"},"LifecycleRuleCriteriaV3":{"properties":{"match":{"$ref":"#/components/schemas/LifecycleRuleCriteriaMatchV3"},"rules":{"items":{"$ref":"#/components/schemas/LifecycleRuleCriteriaItemV3"},"type":"array"}},"required":["match","rules"],"type":"object"},"LifecycleRuleCriteriaMatchV3":{"enum":["ANY","ALL"],"type":"string"},"LifecycleRuleCriteriaItemV3":{"properties":{"config":{"$ref":"#/components/schemas/LifecycleRuleCriteriaConfigV3"},"type":{"$ref":"#/components/schemas/LifecycleRuleCriteriaTypeV3"}},"required":["type","config"],"type":"object"},"LifecycleRuleCriteriaConfigV3":{"properties":{"unit":{"$ref":"#/components/schemas/LifecycleRuleCriteriaUnitV3"},"value":{"format":"int64","type":"integer"}},"type":"object"},"LifecycleRuleCriteriaUnitV3":{"enum":["DAYS","MONTHS","YEARS"],"type":"string"},"LifecycleRuleCriteriaTypeV3":{"enum":["KEEP_LAST_N","AGE_BASED","UNUSED_FOR"],"type":"string"},"LifecycleRuleFilterConfigV3":{"description":"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).\n","discriminator":{"mapping":{"DOCKER":"#/components/schemas/LifecycleRuleFilterConfigDockerV3","HUGGINGFACE":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3","MAVEN":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},"propertyName":"packageType"},"oneOf":[{"$ref":"#/components/schemas/LifecycleRuleFilterConfigDockerV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigGenericV3"}]},"LifecycleRuleFilterConfigDockerV3":{"description":"Filter configuration for DOCKER package type.","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for image names to include (e.g. \"my-app*\").","items":{"type":"string"},"type":"array"},"packageType":{"enum":["DOCKER"],"type":"string"},"tagNameAllowedPattern":{"description":"Glob patterns for tag names to include (e.g. \"v1.*\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigMavenV3":{"description":"Filter configuration for MAVEN package type.","properties":{"groupIdAllowedPattern":{"description":"Glob patterns for Maven group IDs to include (e.g. \"com.example.*\").","items":{"type":"string"},"type":"array"},"packageNameAllowedPattern":{"description":"Glob patterns for artifact IDs to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["MAVEN"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include (e.g. \"*-SNAPSHOT\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigHuggingFaceV3":{"description":"Filter configuration for HUGGINGFACE package type.","properties":{"datasetAllowedPattern":{"description":"Glob patterns for dataset names to include.","items":{"type":"string"},"type":"array"},"modelAllowedPattern":{"description":"Glob patterns for model names to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["HUGGINGFACE"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version/revision names to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigGenericV3":{"description":"Filter configuration for package types that support only name and version filtering: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for package names to include.","items":{"type":"string"},"type":"array"},"packageType":{"description":"Package type. One of: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleScheduleV3":{"properties":{"expression":{"type":"string"},"timezone":{"type":"string"}},"required":["expression","timezone"],"type":"object"},"LifecycleRuleResponseV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"createdAt":{"format":"int64","type":"integer"},"createdBy":{"$ref":"#/components/schemas/UserInfoV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"enabled":{"description":"Whether the lifecycle rule is currently enabled.","type":"boolean"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"hasLocalAssignment":{"description":"Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.","type":"boolean"},"id":{"type":"string"},"lastRunAt":{"description":"Epoch milliseconds of the last execution, if any.","format":"int64","type":"integer"},"name":{"type":"string"},"nextRunAt":{"description":"Epoch milliseconds of the next scheduled execution, if any.","format":"int64","type":"integer"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packageType":{"type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"},"updatedAt":{"format":"int64","type":"integer"},"updatedBy":{"$ref":"#/components/schemas/UserInfoV3"}},"required":["id","name","action","applyTo","enabled","hasLocalAssignment"],"type":"object"},"UserInfoV3":{"description":"Structured user information for a principal","properties":{"display_name":{"description":"Human-readable display name","type":"string"},"email":{"description":"Email address","type":"string"},"type":{"description":"Principal type (user, service, service_account)","type":"string"},"uid":{"description":"Principal unique identifier (username)","type":"string"}},"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}},"responses":{"LifecycleRuleCreatedV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRuleResponseV3"}}},"description":"Lifecycle rule created successfully"}}}}
```

## Get a lifecycle rule

> Returns a specific lifecycle rule by ID.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/rules/{id}":{"get":{"description":"Returns a specific lifecycle rule by ID.","operationId":"GetLifecycleRuleV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/IdPathParamV3"}],"responses":{"200":{"$ref":"#/components/responses/LifecycleRuleResponseV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Get a lifecycle rule","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"IdPathParamV3":{"in":"path","name":"id","required":true,"schema":{"type":"string"}}},"responses":{"LifecycleRuleResponseV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRuleResponseV3"}}},"description":"Lifecycle rule response"}},"schemas":{"LifecycleRuleResponseV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"createdAt":{"format":"int64","type":"integer"},"createdBy":{"$ref":"#/components/schemas/UserInfoV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"enabled":{"description":"Whether the lifecycle rule is currently enabled.","type":"boolean"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"hasLocalAssignment":{"description":"Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.","type":"boolean"},"id":{"type":"string"},"lastRunAt":{"description":"Epoch milliseconds of the last execution, if any.","format":"int64","type":"integer"},"name":{"type":"string"},"nextRunAt":{"description":"Epoch milliseconds of the next scheduled execution, if any.","format":"int64","type":"integer"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packageType":{"type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"},"updatedAt":{"format":"int64","type":"integer"},"updatedBy":{"$ref":"#/components/schemas/UserInfoV3"}},"required":["id","name","action","applyTo","enabled","hasLocalAssignment"],"type":"object"},"LifecycleRuleActionV3":{"enum":["DELETE","PROTECT"],"type":"string"},"LifecycleRuleApplyToV3":{"properties":{"mode":{"$ref":"#/components/schemas/LifecycleRuleApplyToModeV3"},"registries":{"items":{"type":"string"},"type":"array"}},"required":["mode"],"type":"object"},"LifecycleRuleApplyToModeV3":{"enum":["EXPLICIT","ALL_IN_SCOPE"],"type":"string"},"UserInfoV3":{"description":"Structured user information for a principal","properties":{"display_name":{"description":"Human-readable display name","type":"string"},"email":{"description":"Email address","type":"string"},"type":{"description":"Principal type (user, service, service_account)","type":"string"},"uid":{"description":"Principal unique identifier (username)","type":"string"}},"type":"object"},"LifecycleRuleCriteriaV3":{"properties":{"match":{"$ref":"#/components/schemas/LifecycleRuleCriteriaMatchV3"},"rules":{"items":{"$ref":"#/components/schemas/LifecycleRuleCriteriaItemV3"},"type":"array"}},"required":["match","rules"],"type":"object"},"LifecycleRuleCriteriaMatchV3":{"enum":["ANY","ALL"],"type":"string"},"LifecycleRuleCriteriaItemV3":{"properties":{"config":{"$ref":"#/components/schemas/LifecycleRuleCriteriaConfigV3"},"type":{"$ref":"#/components/schemas/LifecycleRuleCriteriaTypeV3"}},"required":["type","config"],"type":"object"},"LifecycleRuleCriteriaConfigV3":{"properties":{"unit":{"$ref":"#/components/schemas/LifecycleRuleCriteriaUnitV3"},"value":{"format":"int64","type":"integer"}},"type":"object"},"LifecycleRuleCriteriaUnitV3":{"enum":["DAYS","MONTHS","YEARS"],"type":"string"},"LifecycleRuleCriteriaTypeV3":{"enum":["KEEP_LAST_N","AGE_BASED","UNUSED_FOR"],"type":"string"},"LifecycleRuleFilterConfigV3":{"description":"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).\n","discriminator":{"mapping":{"DOCKER":"#/components/schemas/LifecycleRuleFilterConfigDockerV3","HUGGINGFACE":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3","MAVEN":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},"propertyName":"packageType"},"oneOf":[{"$ref":"#/components/schemas/LifecycleRuleFilterConfigDockerV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigGenericV3"}]},"LifecycleRuleFilterConfigDockerV3":{"description":"Filter configuration for DOCKER package type.","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for image names to include (e.g. \"my-app*\").","items":{"type":"string"},"type":"array"},"packageType":{"enum":["DOCKER"],"type":"string"},"tagNameAllowedPattern":{"description":"Glob patterns for tag names to include (e.g. \"v1.*\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigMavenV3":{"description":"Filter configuration for MAVEN package type.","properties":{"groupIdAllowedPattern":{"description":"Glob patterns for Maven group IDs to include (e.g. \"com.example.*\").","items":{"type":"string"},"type":"array"},"packageNameAllowedPattern":{"description":"Glob patterns for artifact IDs to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["MAVEN"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include (e.g. \"*-SNAPSHOT\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigHuggingFaceV3":{"description":"Filter configuration for HUGGINGFACE package type.","properties":{"datasetAllowedPattern":{"description":"Glob patterns for dataset names to include.","items":{"type":"string"},"type":"array"},"modelAllowedPattern":{"description":"Glob patterns for model names to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["HUGGINGFACE"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version/revision names to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigGenericV3":{"description":"Filter configuration for package types that support only name and version filtering: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for package names to include.","items":{"type":"string"},"type":"array"},"packageType":{"description":"Package type. One of: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"LifecycleRuleScheduleV3":{"properties":{"expression":{"type":"string"},"timezone":{"type":"string"}},"required":["expression","timezone"],"type":"object"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```

## Update a lifecycle rule

> Updates an existing lifecycle rule.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/rules/{id}":{"put":{"description":"Updates an existing lifecycle rule.","operationId":"UpdateLifecycleRuleV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/IdPathParamV3"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRuleRequestBodyV3"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/LifecycleRuleUpdatedV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Update a lifecycle rule","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"IdPathParamV3":{"in":"path","name":"id","required":true,"schema":{"type":"string"}}},"schemas":{"LifecycleRuleRequestBodyV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"name":{"type":"string"},"packageType":{"type":"string"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"}},"required":["name","action","applyTo"],"type":"object"},"LifecycleRuleActionV3":{"enum":["DELETE","PROTECT"],"type":"string"},"LifecycleRuleApplyToV3":{"properties":{"mode":{"$ref":"#/components/schemas/LifecycleRuleApplyToModeV3"},"registries":{"items":{"type":"string"},"type":"array"}},"required":["mode"],"type":"object"},"LifecycleRuleApplyToModeV3":{"enum":["EXPLICIT","ALL_IN_SCOPE"],"type":"string"},"LifecycleRuleCriteriaV3":{"properties":{"match":{"$ref":"#/components/schemas/LifecycleRuleCriteriaMatchV3"},"rules":{"items":{"$ref":"#/components/schemas/LifecycleRuleCriteriaItemV3"},"type":"array"}},"required":["match","rules"],"type":"object"},"LifecycleRuleCriteriaMatchV3":{"enum":["ANY","ALL"],"type":"string"},"LifecycleRuleCriteriaItemV3":{"properties":{"config":{"$ref":"#/components/schemas/LifecycleRuleCriteriaConfigV3"},"type":{"$ref":"#/components/schemas/LifecycleRuleCriteriaTypeV3"}},"required":["type","config"],"type":"object"},"LifecycleRuleCriteriaConfigV3":{"properties":{"unit":{"$ref":"#/components/schemas/LifecycleRuleCriteriaUnitV3"},"value":{"format":"int64","type":"integer"}},"type":"object"},"LifecycleRuleCriteriaUnitV3":{"enum":["DAYS","MONTHS","YEARS"],"type":"string"},"LifecycleRuleCriteriaTypeV3":{"enum":["KEEP_LAST_N","AGE_BASED","UNUSED_FOR"],"type":"string"},"LifecycleRuleFilterConfigV3":{"description":"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).\n","discriminator":{"mapping":{"DOCKER":"#/components/schemas/LifecycleRuleFilterConfigDockerV3","HUGGINGFACE":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3","MAVEN":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},"propertyName":"packageType"},"oneOf":[{"$ref":"#/components/schemas/LifecycleRuleFilterConfigDockerV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigGenericV3"}]},"LifecycleRuleFilterConfigDockerV3":{"description":"Filter configuration for DOCKER package type.","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for image names to include (e.g. \"my-app*\").","items":{"type":"string"},"type":"array"},"packageType":{"enum":["DOCKER"],"type":"string"},"tagNameAllowedPattern":{"description":"Glob patterns for tag names to include (e.g. \"v1.*\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigMavenV3":{"description":"Filter configuration for MAVEN package type.","properties":{"groupIdAllowedPattern":{"description":"Glob patterns for Maven group IDs to include (e.g. \"com.example.*\").","items":{"type":"string"},"type":"array"},"packageNameAllowedPattern":{"description":"Glob patterns for artifact IDs to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["MAVEN"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include (e.g. \"*-SNAPSHOT\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigHuggingFaceV3":{"description":"Filter configuration for HUGGINGFACE package type.","properties":{"datasetAllowedPattern":{"description":"Glob patterns for dataset names to include.","items":{"type":"string"},"type":"array"},"modelAllowedPattern":{"description":"Glob patterns for model names to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["HUGGINGFACE"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version/revision names to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigGenericV3":{"description":"Filter configuration for package types that support only name and version filtering: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for package names to include.","items":{"type":"string"},"type":"array"},"packageType":{"description":"Package type. One of: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleScheduleV3":{"properties":{"expression":{"type":"string"},"timezone":{"type":"string"}},"required":["expression","timezone"],"type":"object"},"LifecycleRuleResponseV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"createdAt":{"format":"int64","type":"integer"},"createdBy":{"$ref":"#/components/schemas/UserInfoV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"enabled":{"description":"Whether the lifecycle rule is currently enabled.","type":"boolean"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"hasLocalAssignment":{"description":"Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.","type":"boolean"},"id":{"type":"string"},"lastRunAt":{"description":"Epoch milliseconds of the last execution, if any.","format":"int64","type":"integer"},"name":{"type":"string"},"nextRunAt":{"description":"Epoch milliseconds of the next scheduled execution, if any.","format":"int64","type":"integer"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packageType":{"type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"},"updatedAt":{"format":"int64","type":"integer"},"updatedBy":{"$ref":"#/components/schemas/UserInfoV3"}},"required":["id","name","action","applyTo","enabled","hasLocalAssignment"],"type":"object"},"UserInfoV3":{"description":"Structured user information for a principal","properties":{"display_name":{"description":"Human-readable display name","type":"string"},"email":{"description":"Email address","type":"string"},"type":{"description":"Principal type (user, service, service_account)","type":"string"},"uid":{"description":"Principal unique identifier (username)","type":"string"}},"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}},"responses":{"LifecycleRuleUpdatedV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRuleResponseV3"}}},"description":"Lifecycle rule updated successfully"}}}}
```

## Delete a lifecycle rule

> Deletes a lifecycle rule. Only the owner scope may delete.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/rules/{id}":{"delete":{"description":"Deletes a lifecycle rule. Only the owner scope may delete.","operationId":"DeleteLifecycleRuleV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/IdPathParamV3"}],"responses":{"204":{"description":"Lifecycle rule deleted successfully."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Delete a lifecycle rule","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"IdPathParamV3":{"in":"path","name":"id","required":true,"schema":{"type":"string"}}},"schemas":{"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```

## Partially update a lifecycle rule

> Partially updates a lifecycle rule. Only provided fields are modified.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/rules/{id}":{"patch":{"description":"Partially updates a lifecycle rule. Only provided fields are modified.","operationId":"PatchLifecycleRuleV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/IdPathParamV3"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRulePatchBodyV3"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/LifecycleRuleResponseV3"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Partially update a lifecycle rule","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"IdPathParamV3":{"in":"path","name":"id","required":true,"schema":{"type":"string"}}},"schemas":{"LifecycleRulePatchBodyV3":{"description":"Partial update body for a lifecycle rule. Only provided fields are updated.","properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"enabled":{"description":"Enable or disable the lifecycle rule.","type":"boolean"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"name":{"type":"string"},"packageType":{"type":"string"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"}},"type":"object"},"LifecycleRuleActionV3":{"enum":["DELETE","PROTECT"],"type":"string"},"LifecycleRuleApplyToV3":{"properties":{"mode":{"$ref":"#/components/schemas/LifecycleRuleApplyToModeV3"},"registries":{"items":{"type":"string"},"type":"array"}},"required":["mode"],"type":"object"},"LifecycleRuleApplyToModeV3":{"enum":["EXPLICIT","ALL_IN_SCOPE"],"type":"string"},"LifecycleRuleCriteriaV3":{"properties":{"match":{"$ref":"#/components/schemas/LifecycleRuleCriteriaMatchV3"},"rules":{"items":{"$ref":"#/components/schemas/LifecycleRuleCriteriaItemV3"},"type":"array"}},"required":["match","rules"],"type":"object"},"LifecycleRuleCriteriaMatchV3":{"enum":["ANY","ALL"],"type":"string"},"LifecycleRuleCriteriaItemV3":{"properties":{"config":{"$ref":"#/components/schemas/LifecycleRuleCriteriaConfigV3"},"type":{"$ref":"#/components/schemas/LifecycleRuleCriteriaTypeV3"}},"required":["type","config"],"type":"object"},"LifecycleRuleCriteriaConfigV3":{"properties":{"unit":{"$ref":"#/components/schemas/LifecycleRuleCriteriaUnitV3"},"value":{"format":"int64","type":"integer"}},"type":"object"},"LifecycleRuleCriteriaUnitV3":{"enum":["DAYS","MONTHS","YEARS"],"type":"string"},"LifecycleRuleCriteriaTypeV3":{"enum":["KEEP_LAST_N","AGE_BASED","UNUSED_FOR"],"type":"string"},"LifecycleRuleFilterConfigV3":{"description":"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).\n","discriminator":{"mapping":{"DOCKER":"#/components/schemas/LifecycleRuleFilterConfigDockerV3","HUGGINGFACE":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3","MAVEN":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},"propertyName":"packageType"},"oneOf":[{"$ref":"#/components/schemas/LifecycleRuleFilterConfigDockerV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigMavenV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigHuggingFaceV3"},{"$ref":"#/components/schemas/LifecycleRuleFilterConfigGenericV3"}]},"LifecycleRuleFilterConfigDockerV3":{"description":"Filter configuration for DOCKER package type.","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for image names to include (e.g. \"my-app*\").","items":{"type":"string"},"type":"array"},"packageType":{"enum":["DOCKER"],"type":"string"},"tagNameAllowedPattern":{"description":"Glob patterns for tag names to include (e.g. \"v1.*\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigMavenV3":{"description":"Filter configuration for MAVEN package type.","properties":{"groupIdAllowedPattern":{"description":"Glob patterns for Maven group IDs to include (e.g. \"com.example.*\").","items":{"type":"string"},"type":"array"},"packageNameAllowedPattern":{"description":"Glob patterns for artifact IDs to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["MAVEN"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include (e.g. \"*-SNAPSHOT\").","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigHuggingFaceV3":{"description":"Filter configuration for HUGGINGFACE package type.","properties":{"datasetAllowedPattern":{"description":"Glob patterns for dataset names to include.","items":{"type":"string"},"type":"array"},"modelAllowedPattern":{"description":"Glob patterns for model names to include.","items":{"type":"string"},"type":"array"},"packageType":{"enum":["HUGGINGFACE"],"type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version/revision names to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleFilterConfigGenericV3":{"description":"Filter configuration for package types that support only name and version filtering: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","properties":{"packageNameAllowedPattern":{"description":"Glob patterns for package names to include.","items":{"type":"string"},"type":"array"},"packageType":{"description":"Package type. One of: PYTHON, HELM, NPM, NUGET, RPM, CARGO, COMPOSER, GO, CONDA, DART, SWIFT, PUPPET, RUBY, RAW, GENERIC.\n","type":"string"},"versionNameAllowedPattern":{"description":"Glob patterns for version strings to include.","items":{"type":"string"},"type":"array"}},"required":["packageType"],"type":"object"},"LifecycleRuleScheduleV3":{"properties":{"expression":{"type":"string"},"timezone":{"type":"string"}},"required":["expression","timezone"],"type":"object"},"LifecycleRuleResponseV3":{"properties":{"action":{"$ref":"#/components/schemas/LifecycleRuleActionV3"},"applyTo":{"$ref":"#/components/schemas/LifecycleRuleApplyToV3"},"createdAt":{"format":"int64","type":"integer"},"createdBy":{"$ref":"#/components/schemas/UserInfoV3"},"criteria":{"$ref":"#/components/schemas/LifecycleRuleCriteriaV3"},"description":{"type":"string"},"enabled":{"description":"Whether the lifecycle rule is currently enabled.","type":"boolean"},"filterConfig":{"$ref":"#/components/schemas/LifecycleRuleFilterConfigV3"},"hasLocalAssignment":{"description":"Whether the lifecycle rule has at least one assignment with parent_id matching the filter's ParentID.","type":"boolean"},"id":{"type":"string"},"lastRunAt":{"description":"Epoch milliseconds of the last execution, if any.","format":"int64","type":"integer"},"name":{"type":"string"},"nextRunAt":{"description":"Epoch milliseconds of the next scheduled execution, if any.","format":"int64","type":"integer"},"orgIdentifier":{"$ref":"#/components/schemas/orgIdentifier"},"packageType":{"type":"string"},"projectIdentifier":{"$ref":"#/components/schemas/projectIdentifier"},"schedule":{"$ref":"#/components/schemas/LifecycleRuleScheduleV3"},"updatedAt":{"format":"int64","type":"integer"},"updatedBy":{"$ref":"#/components/schemas/UserInfoV3"}},"required":["id","name","action","applyTo","enabled","hasLocalAssignment"],"type":"object"},"UserInfoV3":{"description":"Structured user information for a principal","properties":{"display_name":{"description":"Human-readable display name","type":"string"},"email":{"description":"Email address","type":"string"},"type":{"description":"Principal type (user, service, service_account)","type":"string"},"uid":{"description":"Principal unique identifier (username)","type":"string"}},"type":"object"},"orgIdentifier":{"type":"string"},"projectIdentifier":{"type":"string"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}},"responses":{"LifecycleRuleResponseV3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleRuleResponseV3"}}},"description":"Lifecycle rule response"}}}}
```

## Get lifecycle stats

> Returns aggregate lifecycle execution metrics for the given scope.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[{"description":"V3 lifecycle rule endpoints","name":"Registry V3 - Lifecycle"}],"servers":[{"url":"/api"}],"paths":{"/v3/lifecycle/stats":{"get":{"description":"Returns aggregate lifecycle execution metrics for the given scope.","operationId":"GetLifecycleStatsV3","parameters":[{"$ref":"#/components/parameters/AccountIdentifierV3"},{"$ref":"#/components/parameters/OrgIdentifierV3"},{"$ref":"#/components/parameters/ProjectIdentifierV3"},{"$ref":"#/components/parameters/SearchTermV3"},{"$ref":"#/components/parameters/LifecycleScopeParamV3"},{"$ref":"#/components/parameters/PackageTypeListParamV3"},{"$ref":"#/components/parameters/RegistryIdListOptionalParamV3"},{"$ref":"#/components/parameters/LifecycleActionParamV3"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleStatsResponseV3"}}},"description":"Lifecycle stats."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorV3"}}},"description":"Error response."}},"summary":"Get lifecycle stats","tags":["Registry V3 - Lifecycle"]}}},"components":{"parameters":{"AccountIdentifierV3":{"description":"Unique identifier for the Harness account.\n","in":"query","name":"account_identifier","required":true,"schema":{"type":"string"}},"OrgIdentifierV3":{"description":"Unique identifier for the organization within the account.\n\nExample: `default` or `engineering_org`\n","in":"query","name":"org_identifier","schema":{"type":"string"}},"ProjectIdentifierV3":{"description":"Unique identifier for the project within the organization.\n\nExample: `my_project` or `frontend_services`\n","in":"query","name":"project_identifier","schema":{"type":"string"}},"SearchTermV3":{"description":"Search term for filtering results.\n\nExample: `search_term=prod` might match keys like \"production\", \"prod-env\", etc.\n","in":"query","name":"search_term","schema":{"type":"string"}},"LifecycleScopeParamV3":{"description":"**Scope of lifecycle rules/executions to list**\n* **none** – current space only (default)\n* **ancestors** – current space **plus** all parent spaces\n* **descendants** – current space **plus** all child spaces\n\nIf omitted, `none` is assumed.\n","in":"query","name":"scope","schema":{"enum":["ancestors","descendants","none"],"type":"string"}},"PackageTypeListParamV3":{"description":"Registry Package Type","in":"query","name":"package_types","schema":{"items":{"type":"string"},"type":"array"}},"RegistryIdListOptionalParamV3":{"description":"Unique id for the registry.\nNote: This parameter should have one id if package query param is provided\n","in":"query","name":"registry_ids","schema":{"items":{"format":"uuid","type":"string"},"type":"array"}},"LifecycleActionParamV3":{"description":"Lifecycle action","in":"query","name":"action","schema":{"enum":["DELETE","PROTECT"],"type":"string"}}},"schemas":{"LifecycleStatsResponseV3":{"description":"Aggregate lifecycle execution metrics for the requested scope.","properties":{"artifactsCleaned":{"description":"Total artifact versions deleted across all executions.","format":"int64","type":"integer"},"executionsLast30Days":{"description":"Number of executions that ran in the last 30 days.","format":"int64","type":"integer"},"storageReclaimed":{"description":"Total storage reclaimed (bytes) across all executions.","type":"string"}},"required":["storageReclaimed","artifactsCleaned","executionsLast30Days"],"type":"object"},"ErrorV3":{"description":"An error response","properties":{"error":{"$ref":"#/components/schemas/ApiErrorsV3"}},"required":["error"],"type":"object"},"ApiErrorsV3":{"properties":{"code":{"description":"For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.","maxLength":5000,"type":"string"},"message":{"description":"A human-readable message providing more details about the error. These messages can be shown to users.","maxLength":40000,"type":"string"},"param":{"description":"If the error is parameter-specific, the parameter related to the error. For example, we can use this to display a message near the correct form field.","maxLength":5000,"type":"string"},"type":{"description":"The type of error returned.","enum":["INVALID_REQUEST_ERROR","AUTHENTICATION_ERROR","PERMISSION_ERROR","API_ERROR"],"type":"string"}},"required":["type"],"title":"APIErrors","type":"object"}}}}
```
