Sample - GitHub REST API
POST/orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}

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.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 5 body fields
orgstringrequired
The organization name. The name is not case sensitive.
clusterstringrequired
The cluster name.
logical_environmentstringrequired
The stage of the deployment.
physical_environmentstringoptional
The physical region of the deployment.
deploymentsarray<object>required
The list of deployments to record.
partial_successbooleanoptional
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.
Default:false
return_recordsbooleanoptional
If true, the endpoint will return the set records in the response body
Default:true

4 status codes
200Deployment records created or updated successfully.
total_countintegerrequired
The number of deployment records created
deployment_recordsarray<ArtifactDeploymentRecord>optional
207This 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.
total_countintegerrequired
The number of deployment records created or updated.
deployment_recordsarray<ArtifactDeploymentRecord>optional
errorsarray<object>optional
A list of errors for deployments that could not be processed.
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.