> 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/artifact-registry/api-reference/spaces.md).

# Spaces

## Get artifact stats

> Get artifact stats

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/artifact/stats":{"get":{"description":"Get artifact stats","operationId":"GetArtifactStatsForSpace","parameters":[{"$ref":"#/components/parameters/spaceRefPathParam"},{"$ref":"#/components/parameters/fromDateParam"},{"$ref":"#/components/parameters/toDateParam"}],"responses":{"200":{"$ref":"#/components/responses/ArtifactStatsResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get artifact stats","tags":["Spaces"]}}},"components":{"parameters":{"spaceRefPathParam":{"description":"Reference to the scope in which the registry exists.\n\nFormat depends on the scope:\n\n- **Account-level**: `account_id/+`\n- **Organization-level**: `account_id/org/+`\n- **Project-level**: `account_id/org/project/+`\n\nThe `/+` suffix is used internally to route scoped requests.\nIt must be included **exactly as shown** in the URL.\n","in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},"fromDateParam":{"description":"Date. Format - MM/DD/YYYY","in":"query","name":"from","schema":{"type":"string"}},"toDateParam":{"description":"Date. Format - MM/DD/YYYY","in":"query","name":"to","schema":{"type":"string"}}},"responses":{"ArtifactStatsResponse":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ArtifactStats"},"status":{"$ref":"#/components/schemas/Status"}},"required":["status","data"],"type":"object"}}},"description":"response to get artifact stats response"},"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was invalid or malformed"},"Unauthenticated":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed or missing credentials"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied due to insufficient permissions"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found"},"InternalServerError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An unexpected server error occurred"}},"schemas":{"ArtifactStats":{"description":"Harness Artifact Stats","properties":{"downloadCount":{"format":"int64","type":"integer"},"downloadSize":{"format":"int64","type":"integer"},"totalStorageSize":{"format":"int64","type":"integer"},"uploadSize":{"format":"int64","type":"integer"}},"type":"object"},"Status":{"description":"Request processing status indicator","enum":["SUCCESS","FAILURE","ERROR"],"type":"string"},"Error":{"description":"Standard error response with code, message and optional details","properties":{"code":{"description":"The HTTP error code","type":"string"},"details":{"description":"Additional context and details about the error.\nMay include field-specific validation errors or debugging information.\n","type":"object"},"message":{"description":"Human-readable error message explaining what went wrong","type":"string"}},"required":["code","message"],"type":"object"}}}}
```

## List artifacts

> Lists all the artifacts

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/artifacts":{"get":{"description":"Lists all the artifacts","operationId":"GetAllArtifacts","parameters":[{"$ref":"#/components/parameters/spaceRefPathParam"},{"$ref":"#/components/parameters/RegistryIdentifierParam"},{"$ref":"#/components/parameters/pageNumber"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/sortOrder"},{"$ref":"#/components/parameters/sortField"},{"$ref":"#/components/parameters/searchTerm"},{"$ref":"#/components/parameters/latestVersion"},{"$ref":"#/components/parameters/deployedArtifact"},{"$ref":"#/components/parameters/packageTypeParam"}],"responses":{"200":{"$ref":"#/components/responses/ListArtifactResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List artifacts","tags":["Spaces"]}}},"components":{"parameters":{"spaceRefPathParam":{"description":"Reference to the scope in which the registry exists.\n\nFormat depends on the scope:\n\n- **Account-level**: `account_id/+`\n- **Organization-level**: `account_id/org/+`\n- **Project-level**: `account_id/org/project/+`\n\nThe `/+` suffix is used internally to route scoped requests.\nIt must be included **exactly as shown** in the URL.\n","in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},"RegistryIdentifierParam":{"description":"Registry Identifier","in":"query","name":"reg_identifier","schema":{"items":{"type":"string"},"type":"array"}},"pageNumber":{"description":"Current page number","in":"query","name":"page","schema":{"default":1,"format":"int64","type":"integer"}},"pageSize":{"description":"Number of items per page","in":"query","name":"size","schema":{"default":20,"format":"int64","type":"integer"}},"sortOrder":{"description":"sortOrder","in":"query","name":"sort_order","schema":{"type":"string"}},"sortField":{"description":"sortField","in":"query","name":"sort_field","schema":{"type":"string"}},"searchTerm":{"description":"search Term.","in":"query","name":"search_term","schema":{"type":"string"}},"latestVersion":{"description":"Latest Version Filter.","in":"query","name":"latest_version","schema":{"type":"boolean"}},"deployedArtifact":{"description":"Deployed Artifact Filter.","in":"query","name":"deployed_artifact","schema":{"type":"boolean"}},"packageTypeParam":{"description":"Registry Package Type","in":"query","name":"package_type","schema":{"items":{"type":"string"},"type":"array"}}},"responses":{"ListArtifactResponse":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ListArtifact"},"status":{"$ref":"#/components/schemas/Status"}},"required":["status","data"],"type":"object"}}},"description":"response for list artifact"},"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was invalid or malformed"},"Unauthenticated":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed or missing credentials"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied due to insufficient permissions"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found"},"InternalServerError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An unexpected server error occurred"}},"schemas":{"ListArtifact":{"description":"A list of Artifacts","properties":{"artifacts":{"description":"A list of Artifact","items":{"$ref":"#/components/schemas/ArtifactMetadata"},"type":"array"},"itemCount":{"description":"The total number of items","format":"int64","type":"integer"},"pageCount":{"description":"The total number of pages","format":"int64","type":"integer"},"pageIndex":{"description":"The current page","format":"int64","type":"integer"},"pageSize":{"description":"The number of items per page","type":"integer"}},"required":["artifacts"],"type":"object"},"ArtifactMetadata":{"description":"Artifact Metadata","properties":{"artifactKey":{"additionalProperties":{"type":"string"},"type":"object"},"artifactType":{"$ref":"#/components/schemas/ArtifactType"},"deletedAt":{"description":"Timestamp in milliseconds when the artifact was soft deleted. Null if not deleted.","type":"string"},"deploymentMetadata":{"$ref":"#/components/schemas/DeploymentMetadata"},"digestCount":{"format":"int64","type":"integer"},"downloadsCount":{"format":"int64","type":"integer"},"fileCount":{"type":"integer"},"firewallMode":{"enum":["ENABLED","QUARANTINE","ALLOW"],"type":"string"},"isQuarantined":{"type":"boolean"},"labels":{"items":{"type":"string"},"type":"array"},"lastModified":{"type":"string"},"lastScannedAt":{"type":"string"},"latestVersion":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ArtifactEntityMetadata"},"name":{"type":"string"},"packageType":{"$ref":"#/components/schemas/PackageType"},"pullCommand":{"type":"string"},"purl":{"description":"Package URL (PURL) identifying the package version.","type":"string"},"quarantineReason":{"type":"string"},"registryIdentifier":{"type":"string"},"registryPath":{"type":"string"},"registryType":{"$ref":"#/components/schemas/RegistryType"},"registryUUID":{"type":"string"},"scanId":{"type":"string"},"scanStatus":{"enum":["WARN","BLOCKED","ALLOWED"],"type":"string"},"uuid":{"type":"string"},"version":{"type":"string"}},"required":["name","version","registryIdentifier","latestVersion","registryPath","packageType","registryUUID","uuid"],"type":"object"},"ArtifactType":{"description":"refers to artifact type","enum":["model","dataset","module","provider"],"type":"string"},"DeploymentMetadata":{"properties":{"nonProdEnvCount":{"type":"integer"},"prodEnvCount":{"type":"integer"}},"required":["prodEnvCount","nonProdEnvCount"],"type":"object"},"ArtifactEntityMetadata":{"additionalProperties":true,"description":"Artifact Entity Metadata","type":"object"},"PackageType":{"description":"refers to package","enum":["DOCKER","MAVEN","PYTHON","GENERIC","HELM","NUGET","NPM","RPM","CARGO","COMPOSER","GO","HUGGINGFACE","CONDA","DART","SWIFT","PUPPET","RUBY","CRAN","WOLFI","ALPINE","RAW","HELM_HTTP","DEBIAN","CONAN","TERRAFORM","TERRAFORM_BACKEND"],"type":"string"},"RegistryType":{"description":"refers to type of registry i.e virtual or upstream","discriminator":{"propertyName":"type"},"enum":["VIRTUAL","UPSTREAM"],"type":"string"},"Status":{"description":"Request processing status indicator","enum":["SUCCESS","FAILURE","ERROR"],"type":"string"},"Error":{"description":"Standard error response with code, message and optional details","properties":{"code":{"description":"The HTTP error code","type":"string"},"details":{"description":"Additional context and details about the error.\nMay include field-specific validation errors or debugging information.\n","type":"object"},"message":{"description":"Human-readable error message explaining what went wrong","type":"string"}},"required":["code","message"],"type":"object"}}}}
```

## Get storage details for given space

> Get storage details for given space

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/details":{"get":{"description":"Get storage details for given space","operationId":"GetStorageDetails","parameters":[{"$ref":"#/components/parameters/spaceRefPathParam"}],"responses":{"200":{"$ref":"#/components/responses/StorageDetailsResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Get storage details for given space","tags":["Spaces"]}}},"components":{"parameters":{"spaceRefPathParam":{"description":"Reference to the scope in which the registry exists.\n\nFormat depends on the scope:\n\n- **Account-level**: `account_id/+`\n- **Organization-level**: `account_id/org/+`\n- **Project-level**: `account_id/org/project/+`\n\nThe `/+` suffix is used internally to route scoped requests.\nIt must be included **exactly as shown** in the URL.\n","in":"path","name":"space_ref","required":true,"schema":{"type":"string"}}},"responses":{"StorageDetailsResponse":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/StorageDetails"},"status":{"$ref":"#/components/schemas/Status"}},"required":["status","data"],"type":"object"}}},"description":"response for storage details"},"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was invalid or malformed"},"Unauthenticated":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed or missing credentials"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied due to insufficient permissions"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found"},"InternalServerError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An unexpected server error occurred"}},"schemas":{"StorageDetails":{"description":"storage details","properties":{"dailyStorage":{"description":"Day-wise storage snapshots for the last 30 calendar days (UTC).","items":{"$ref":"#/components/schemas/DailyStorage"},"type":"array"},"last30DayAverage":{"description":"Average daily storage over the last 30 calendar days (UTC), as a human-readable auto-scaled size (e.g. \"468.78GB\").","type":"string"},"totalSize":{"description":"Total current storage, as a human-readable auto-scaled size (e.g. \"468.78GB\").","type":"string"},"totalSizeInBytes":{"description":"Total current storage in raw bytes (e.g. \"503316480\").","type":"string"}},"required":["totalSize"],"type":"object"},"DailyStorage":{"description":"Storage snapshot for a single calendar day.","properties":{"date":{"description":"Snapshot date in UTC (YYYY-MM-DD).","format":"date","type":"string"},"size":{"description":"Total storage on that date, as a human-readable auto-scaled size (e.g. \"468.78GB\").","type":"string"}},"required":["date","size"],"type":"object"},"Status":{"description":"Request processing status indicator","enum":["SUCCESS","FAILURE","ERROR"],"type":"string"},"Error":{"description":"Standard error response with code, message and optional details","properties":{"code":{"description":"The HTTP error code","type":"string"},"details":{"description":"Additional context and details about the error.\nMay include field-specific validation errors or debugging information.\n","type":"object"},"message":{"description":"Human-readable error message explaining what went wrong","type":"string"}},"required":["code","message"],"type":"object"}}}}
```

## GET /v1/spaces/{space\_ref}/labels

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels":{"get":{"operationId":"listSpaceLabels","parameters":[{"description":"The page to return.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"The result should inherit entities from parent spaces.","in":"query","name":"inherited","schema":{"default":false,"type":"boolean"}},{"description":"The substring which is used to filter the labels by their key.","in":"query","name":"query","schema":{"type":"string"}},{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesLabel"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"format":"int64","type":"integer"},"created_by":{"format":"int64","type":"integer"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"key":{"type":"string"},"scope":{"format":"int64","type":"integer"},"space_id":{"format":"int64","nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"format":"int64","type":"integer"},"updated_by":{"format":"int64","type":"integer"},"value_count":{"format":"int64","type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## POST /v1/spaces/{space\_ref}/labels

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels":{"post":{"operationId":"defineSpaceLabel","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabel"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"format":"int64","type":"integer"},"created_by":{"format":"int64","type":"integer"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"key":{"type":"string"},"scope":{"format":"int64","type":"integer"},"space_id":{"format":"int64","nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"format":"int64","type":"integer"},"updated_by":{"format":"int64","type":"integer"},"value_count":{"format":"int64","type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## PUT /v1/spaces/{space\_ref}/labels

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels":{"put":{"operationId":"saveSpaceLabel","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"label":{"$ref":"#/components/schemas/TypesSaveLabelInput"},"values":{"items":{"$ref":"#/components/schemas/TypesSaveLabelValueInput"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelWithValues"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"TypesSaveLabelInput":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesSaveLabelValueInput":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"TypesLabelWithValues":{"properties":{"label":{"$ref":"#/components/schemas/TypesLabel"},"values":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}},"type":"object"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"format":"int64","type":"integer"},"created_by":{"format":"int64","type":"integer"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"key":{"type":"string"},"scope":{"format":"int64","type":"integer"},"space_id":{"format":"int64","nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"format":"int64","type":"integer"},"updated_by":{"format":"int64","type":"integer"},"value_count":{"format":"int64","type":"integer"}},"type":"object"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## GET /v1/spaces/{space\_ref}/labels/{key}

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}":{"get":{"operationId":"findSpaceLabel","parameters":[{"description":"The result should include label values.","in":"query","name":"include_values","schema":{"default":false,"type":"boolean"}},{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelWithValues"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"TypesLabelWithValues":{"properties":{"label":{"$ref":"#/components/schemas/TypesLabel"},"values":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}},"type":"object"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"format":"int64","type":"integer"},"created_by":{"format":"int64","type":"integer"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"key":{"type":"string"},"scope":{"format":"int64","type":"integer"},"space_id":{"format":"int64","nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"format":"int64","type":"integer"},"updated_by":{"format":"int64","type":"integer"},"value_count":{"format":"int64","type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## DELETE /v1/spaces/{space\_ref}/labels/{key}

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}":{"delete":{"operationId":"deleteSpaceLabel","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## PATCH /v1/spaces/{space\_ref}/labels/{key}

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}":{"patch":{"operationId":"updateSpaceLabel","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabel"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"format":"int64","type":"integer"},"created_by":{"format":"int64","type":"integer"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"key":{"type":"string"},"scope":{"format":"int64","type":"integer"},"space_id":{"format":"int64","nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"format":"int64","type":"integer"},"updated_by":{"format":"int64","type":"integer"},"value_count":{"format":"int64","type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## GET /v1/spaces/{space\_ref}/labels/{key}/values

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}/values":{"get":{"operationId":"listSpaceLabelValues","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## POST /v1/spaces/{space\_ref}/labels/{key}/values

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}/values":{"post":{"operationId":"defineSpaceLabelValue","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"value":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelValue"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## DELETE /v1/spaces/{space\_ref}/labels/{key}/values/{value}

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}/values/{value}":{"delete":{"operationId":"deleteSpaceLabelValue","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"value","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## PATCH /v1/spaces/{space\_ref}/labels/{key}/values/{value}

>

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/labels/{key}/values/{value}":{"patch":{"operationId":"updateSpaceLabelValue","parameters":[{"in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"value","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"value":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelValue"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["Spaces"]}}},"components":{"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}}}
```

## List registries

> Lists all the registries.

```json
{"openapi":"3.0.0","info":{"title":"Harness Artifact Registry API","version":"1.0.0"},"tags":[],"servers":[{"url":"/api"}],"paths":{"/v1/spaces/{space_ref}/registries":{"get":{"description":"Lists all the registries.","operationId":"GetAllRegistries","parameters":[{"$ref":"#/components/parameters/spaceRefPathParam"},{"$ref":"#/components/parameters/packageTypeParam"},{"$ref":"#/components/parameters/RegistryTypeParam"},{"$ref":"#/components/parameters/pageNumber"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/sortOrder"},{"$ref":"#/components/parameters/sortField"},{"$ref":"#/components/parameters/searchTerm"},{"$ref":"#/components/parameters/recursiveParam"},{"$ref":"#/components/parameters/scopeParam"}],"responses":{"200":{"$ref":"#/components/responses/ListRegistryResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"List registries","tags":["Spaces"]}}},"components":{"parameters":{"spaceRefPathParam":{"description":"Reference to the scope in which the registry exists.\n\nFormat depends on the scope:\n\n- **Account-level**: `account_id/+`\n- **Organization-level**: `account_id/org/+`\n- **Project-level**: `account_id/org/project/+`\n\nThe `/+` suffix is used internally to route scoped requests.\nIt must be included **exactly as shown** in the URL.\n","in":"path","name":"space_ref","required":true,"schema":{"type":"string"}},"packageTypeParam":{"description":"Registry Package Type","in":"query","name":"package_type","schema":{"items":{"type":"string"},"type":"array"}},"RegistryTypeParam":{"description":"Registry Type","in":"query","name":"type","schema":{"enum":["VIRTUAL","UPSTREAM"],"type":"string"}},"pageNumber":{"description":"Current page number","in":"query","name":"page","schema":{"default":1,"format":"int64","type":"integer"}},"pageSize":{"description":"Number of items per page","in":"query","name":"size","schema":{"default":20,"format":"int64","type":"integer"}},"sortOrder":{"description":"sortOrder","in":"query","name":"sort_order","schema":{"type":"string"}},"sortField":{"description":"sortField","in":"query","name":"sort_field","schema":{"type":"string"}},"searchTerm":{"description":"search Term.","in":"query","name":"search_term","schema":{"type":"string"}},"recursiveParam":{"description":"Whether to list registries recursively.\n\n**Deprecated.** Use the new `scope` parameter.\n\n* `recursive=true`  → `scope=ancestors`\n* `recursive=false` → `scope=none`\n","in":"query","name":"recursive","schema":{"default":false,"type":"boolean"}},"scopeParam":{"description":"**Scope of registries to list**\n* **none** – current space only (default)   * **ancestors** – current space **plus** all parent spaces   * **descendants** – current space **plus** all child spaces  \nIf omitted, `none` is assumed.\n","in":"query","name":"scope","schema":{"enum":["ancestors","descendants","none"],"type":"string"}}},"responses":{"ListRegistryResponse":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ListRegistry"},"status":{"$ref":"#/components/schemas/Status"}},"required":["status","data"],"type":"object"}}},"description":"response for list registry"},"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was invalid or malformed"},"Unauthenticated":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication failed or missing credentials"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Access denied due to insufficient permissions"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found"},"InternalServerError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"An unexpected server error occurred"}},"schemas":{"ListRegistry":{"description":"A list of Harness Artifact Registries","properties":{"itemCount":{"description":"The total number of items","format":"int64","type":"integer"},"meta":{"$ref":"#/components/schemas/Meta"},"pageCount":{"description":"The total number of pages","format":"int64","type":"integer"},"pageIndex":{"description":"The current page","format":"int64","type":"integer"},"pageSize":{"description":"The number of items per page","type":"integer"},"registries":{"description":"A list of Harness Artifact Registries","items":{"$ref":"#/components/schemas/RegistryMetadata"},"type":"array"}},"required":["registries","meta"],"type":"object"},"Meta":{"description":"Metadata about the list response","properties":{"activeCount":{"description":"Count of active (non-deleted) entities","format":"int64","type":"integer"},"deletedCount":{"description":"Count of soft-deleted entities","format":"int64","type":"integer"}},"required":["activeCount","deletedCount"],"type":"object"},"RegistryMetadata":{"description":"Harness Artifact Registry Metadata","properties":{"artifactsCount":{"format":"int64","type":"integer"},"deletedAt":{"description":"Timestamp in milliseconds when the registry was soft-deleted","type":"string"},"deletedBy":{"$ref":"#/components/schemas/PerformedBy"},"description":{"type":"string"},"downloadsCount":{"format":"int64","type":"integer"},"identifier":{"type":"string"},"isPublic":{"type":"boolean"},"lastModified":{"type":"string"},"packageType":{"$ref":"#/components/schemas/PackageType"},"path":{"type":"string"},"registrySize":{"type":"string"},"type":{"$ref":"#/components/schemas/RegistryType"},"url":{"type":"string"},"uuid":{"type":"string"}},"required":["type","packageType","identifier","url","isPublic","uuid"],"type":"object"},"PerformedBy":{"description":"Principal who performed the relevant action","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["name","email"],"type":"object"},"PackageType":{"description":"refers to package","enum":["DOCKER","MAVEN","PYTHON","GENERIC","HELM","NUGET","NPM","RPM","CARGO","COMPOSER","GO","HUGGINGFACE","CONDA","DART","SWIFT","PUPPET","RUBY","CRAN","WOLFI","ALPINE","RAW","HELM_HTTP","DEBIAN","CONAN","TERRAFORM","TERRAFORM_BACKEND"],"type":"string"},"RegistryType":{"description":"refers to type of registry i.e virtual or upstream","discriminator":{"propertyName":"type"},"enum":["VIRTUAL","UPSTREAM"],"type":"string"},"Status":{"description":"Request processing status indicator","enum":["SUCCESS","FAILURE","ERROR"],"type":"string"},"Error":{"description":"Standard error response with code, message and optional details","properties":{"code":{"description":"The HTTP error code","type":"string"},"details":{"description":"Additional context and details about the error.\nMay include field-specific validation errors or debugging information.\n","type":"object"},"message":{"description":"Human-readable error message explaining what went wrong","type":"string"}},"required":["code","message"],"type":"object"}}}}
```
