Skip to content

GitHub: Set cluster deployment records

GitHub orgs.orgsSetClusterDeploymentRecords: arguments, response, policy and SDK examples.

← Orgs operations · Get started

Operation github.orgs_set_cluster_deployment_records

Provider route: POST /orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["orgs"]["orgsSetClusterDeploymentRecords"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.orgs.orgsSetClusterDeploymentRecords(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.orgs.orgs_set_cluster_deployment_records(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.orgstringRequired within parent
path.clusterstringRequired within parentMaximum length: 128
Minimum length: 1
Pattern: ^[a-zA-Z0-9._-]+$
bodyobjectRequired within parent
body.deploymentsarrayRequired within parentThe list of deployments to record.
Maximum items: 1000
body.deployments[]objectEach item
body.deployments[].deployment_namestringRequired within parentThe 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.

Maximum length: 256
Minimum length: 1
body.deployments[].digeststringRequired within parentThe hex encoded digest of the artifact.
Maximum length: 71
Minimum length: 71
Pattern: ^sha256:[a-f0-9]{64}$
body.deployments[].github_repositorystringOptionalThe 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.
Maximum length: 100
Pattern: ^[A-Za-z0-9.-_]+$
body.deployments[].namestringRequired within parentThe name of the artifact.
Maximum length: 256
Minimum length: 1
body.deployments[].runtime_risksarrayOptionalA list of runtime risks associated with the deployment.
Maximum items: 4
Unique items: true
body.deployments[].runtime_risks[]stringEach itemOne of: critical-resource, internet-exposed, lateral-movement, sensitive-data
body.deployments[].statusstringOptionalThe deployment status of the artifact.
Default: deployed
One of: deployed, decommissioned
body.deployments[].tagsobjectOptionalKey-value pairs to tag the deployment record.
Additional keys: see wildcard field
body.deployments[].tags.*stringAdditional keys
body.deployments[].versionstringOptionalThe artifact version.
Maximum length: 100
body.logical_environmentstringRequired within parentThe stage of the deployment.
Maximum length: 128
Minimum length: 1
body.partial_successbooleanOptionalWhen 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
body.physical_environmentstringOptionalThe physical region of the deployment.
Maximum length: 128
body.return_recordsbooleanOptionalIf true, the endpoint will return the set records in the response body

Default: true

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative
$ (anyOf 1).deployment_recordsarrayOptional
$ (anyOf 1).deployment_records[]ModelEach itemExpand List artifact deployment records — response body — deployment records item
$ (anyOf 1).total_countJSONRequired within parent
$ (anyOf 1).total_count (anyOf 1)integerAlternativeThe number of deployment records created
$ (anyOf 1).total_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 2)objectAlternative
$ (anyOf 2).deployment_recordsarrayOptional
$ (anyOf 2).deployment_records[]ModelEach itemExpand List artifact deployment records — response body — deployment records item
$ (anyOf 2).errorsarrayOptionalA list of errors for deployments that could not be processed.
$ (anyOf 2).errors[]objectEach item
$ (anyOf 2).errors[].causestringOptionalThe reason the deployment failed processing.
Known values: unauthorized, not_found
$ (anyOf 2).errors[].deploymentobjectOptionalThe deployment payload that could not be processed.
$ (anyOf 2).errors[].deployment.deployment_namestringOptionalThe name of the deployment that failed processing.
$ (anyOf 2).errors[].deployment.digeststringOptionalThe digest of the artifact.
$ (anyOf 2).errors[].deployment.github_repositoryJSONOptional
$ (anyOf 2).errors[].deployment.github_repository (anyOf 1)stringAlternativeThe repository associated with the deployment.
$ (anyOf 2).errors[].deployment.github_repository (anyOf 2)nullAlternative
$ (anyOf 2).errors[].deployment.namestringOptionalThe name of the artifact.
$ (anyOf 2).errors[].deployment.runtime_risksarrayOptionalRuntime risk classifications for the deployment.
$ (anyOf 2).errors[].deployment.runtime_risks[]stringEach item
$ (anyOf 2).errors[].deployment.statusstringOptionalThe deployment status.
$ (anyOf 2).errors[].deployment.tagsobjectOptionalCustom metadata tags for the deployment.
Additional keys: see wildcard field
$ (anyOf 2).errors[].deployment.tags.*stringAdditional keys
$ (anyOf 2).errors[].deployment.versionJSONOptional
$ (anyOf 2).errors[].deployment.version (anyOf 1)stringAlternativeThe version of the deployment.
$ (anyOf 2).errors[].deployment.version (anyOf 2)nullAlternative
$ (anyOf 2).total_countJSONRequired within parent
$ (anyOf 2).total_count (anyOf 1)integerAlternativeThe number of deployment records created or updated.
$ (anyOf 2).total_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: List artifact deployment records — response body — deployment records item

List artifact deployment records — response body — deployment records item
FieldTypePresenceDescription and constraints
$objectRootArtifact Metadata Deployment Record
attestation_idJSONOptional
attestation_id (anyOf 1)JSONAlternative
attestation_id (anyOf 1) (anyOf 1)integerAlternativeThe ID of the provenance attestation associated with the deployment record.
attestation_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
attestation_id (anyOf 2)nullAlternative
clusterstringOptional
created_atstringOptional
deployment_namestringOptional
digeststringOptional
idJSONOptional
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
logical_environmentstringOptional
physical_environmentstringOptional
runtime_risksarrayOptionalA list of runtime risks associated with the deployment.
Maximum items: 4
Unique items: true
runtime_risks[]stringEach itemKnown values: critical-resource, internet-exposed, lateral-movement, sensitive-data
tagsobjectOptionalAdditional keys: see wildcard field
tags.*stringAdditional keys
updated_atstringOptional

SDK function policy ID: github.orgs_set_cluster_deployment_records. Catalog operation: orgs/set-cluster-deployment-records. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.