Set cluster deployment records
Set deployment records for a given cluster. If proposed records in the ‘deployments’ field have identical ‘cluster’, ‘logical_environment’, ‘physical_environment’, and ‘deployment_name’ values as existing records, the existing records will be updated. If no existing records match, new records will be created. Note: Artifacts are uniquely identified by the combination of their repository and digest fields. If two entries in the deployments array resolve to the same repository and have identical digest fields but differing name and version fields, the endpoint will use the artifact name and version from the record processed first, since a single artifact (identified by repository and digest) can only have one name and version.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
The cluster name.
Request Body required
Section titled “ Request Body required ”object
The stage of the deployment.
The physical region of the deployment.
The list of deployments to record.
object
The name of the artifact.
The hex encoded digest of the artifact.
The artifact version.
The deployment status of the artifact.
The unique identifier for the deployment represented by the new record. To accommodate differing containers and namespaces within a record set, the following format is recommended: {namespaceName}-{deploymentName}-{containerName}. The deployment_name must be unique across all entries in the deployments array.
The name of the GitHub repository associated with the artifact. This should be used when there are no provenance attestations available for the artifact. The repository must belong to the organization specified in the path parameter.
If a provenance attestation is available for the artifact, the API will use the repository information from the attestation instead of this parameter.
Key-value pairs to tag the deployment record.
object
A list of runtime risks associated with the deployment.
When enabled, deployments associated with repositories the actor can write to are processed
while deployments associated with repositories that cannot be resolved or written to by the actor
are skipped and reported in the errors array. When false (the default), the endpoint returns
an error if any targeted repository cannot be resolved, the actor lacks write access, or no matching attestation can be found.
If true, the endpoint will return the set records in the response body
Examples
{ "logical_environment": "prod", "physical_environment": "pacific-east", "deployments": [ { "name": "awesome-image", "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", "version": "2.1.0", "status": "deployed", "deployment_name": "deployment-pod", "tags": { "owning-team": "platform" }, "runtime_risks": [ "sensitive-data" ] } ]}Responses
Section titled “ Responses ”Deployment records created or updated successfully.
object
The number of deployment records created
Artifact Metadata Deployment Record
object
object
A list of runtime risks associated with the deployment.
The ID of the provenance attestation associated with the deployment record.
Examples
{ "total_count": 1, "deployment_records": [ { "id": 123, "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", "logical_environment": "prod", "physical_environment": "pacific-east", "cluster": "moda-1", "deployment_name": "prod-deployment", "tags": { "data": "sensitive" }, "created": "2011-01-26T19:14:43Z", "updated_at": "2011-01-26T19:14:43Z", "attestation_id": 456 } ]}This response format is only returned when partial_success is set to true in the request body.
Successfully processed deployments are included in the deployment_records field. Records that could
not be processed and were skipped because of unresolvable repositories, missing actor permissions, or lack of a matching attestation are
included in the errors field.
object
The number of deployment records created or updated.
Artifact Metadata Deployment Record
object
object
A list of runtime risks associated with the deployment.
The ID of the provenance attestation associated with the deployment record.
A list of errors for deployments that could not be processed.
object
The reason the deployment failed processing.
The deployment payload that could not be processed.
object
The name of the artifact.
The digest of the artifact.
The name of the deployment that failed processing.
The version of the deployment.
The deployment status.
The repository associated with the deployment.
Custom metadata tags for the deployment.
object
Runtime risk classifications for the deployment.
Examples
{ "total_count": 1, "deployment_records": [ { "id": 42, "digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72", "logical_environment": "prod", "physical_environment": "us-east-1a", "cluster": "production-cluster", "deployment_name": "deployment-pod", "tags": { "owning-team": "platform" }, "runtime_risks": [ "sensitive-data" ], "created_at": "2024-01-01T12:00:00Z", "updated_at": "2024-01-01T12:30:00Z", "attestation_id": 777 } ], "errors": [ { "cause": "unauthorized", "deployment": { "name": "my-image", "digest": "sha256:5aa19f9a13f67a644f6d8528e2eb5cf64431e236df5dbbd44ff9b9e3f6fc6cb2", "deployment_name": "restricted-deployment", "version": "2.1.1", "status": "deployed", "github_repository": "private-repo", "tags": { "owning-team": "platform" }, "runtime_risks": [ "sensitive-data" ] } } ]}Forbidden
Basic Error
object
Examples
{ "message": { "cause": "artifact metadata write permission required on one or more repositories", "repositories": [ 123, 345 ] }}Resource not found
Basic Error
object
Examples
{ "message": { "cause": "One or more repositories do not exist", "repositories": [ "repoA", "repoB" ] }}