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

Create an artifact deployment record

Create or update deployment records for an artifact associated with an organization. This endpoint allows you to record information about a specific artifact, such as its name, digest, environments, cluster, and deployment. The deployment name has to be uniqe within a cluster (i.e a combination of logical, physical environment and cluster) as it identifies unique deployment. Multiple requests for the same combination of logical, physical environment, cluster and deployment name will only create one record, successive request will update the existing record. This allows for a stable tracking of a deployment where the actual deployed artifact can change over time.

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

1 parameter · 12 body fields
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
The name of the artifact.
digeststringrequired
The hex encoded digest of the artifact.
versionstringoptional
The artifact version.
statusstringrequired
The status of the artifact. Can be either deployed or decommissioned.
Allowed:deployeddecommissioned
logical_environmentstringrequired
The stage of the deployment.
physical_environmentstringoptional
The physical region of the deployment.
clusterstringoptional
The deployment cluster.
deployment_namestringrequired
The unique identifier for the deployment represented by the new record. To accommodate differing containers and namespaces within a cluster, the following format is recommended: {namespaceName}-{deploymentName}-{containerName}.
tagsobjectoptional
The tags associated with the deployment.
runtime_risksarray<string>optional
A list of runtime risks associated with the deployment.
github_repositorystringoptional
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.
return_recordsbooleanoptional
If true, the endpoint will return the created or updated record in the response body.
Default:true

3 status codes
200Artifact deployment record stored successfully.
total_countintegerrequired
The number of deployment records created
deployment_recordsarray<ArtifactDeploymentRecord>optional
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.