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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.org | string | Required within parent | |
path.cluster | string | Required within parent | Maximum length: 128 Minimum length: 1 Pattern: ^[a-zA-Z0-9._-]+$ |
body | object | Required within parent | |
body.deployments | array | Required within parent | The list of deployments to record. Maximum items: 1000 |
body.deployments[] | object | Each item | |
body.deployments[].deployment_name | string | Required within parent | 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. Maximum length: 256 Minimum length: 1 |
body.deployments[].digest | string | Required within parent | The hex encoded digest of the artifact. Maximum length: 71 Minimum length: 71 Pattern: ^sha256:[a-f0-9]{64}$ |
body.deployments[].github_repository | string | Optional | 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. Maximum length: 100 Pattern: ^[A-Za-z0-9.-_]+$ |
body.deployments[].name | string | Required within parent | The name of the artifact. Maximum length: 256 Minimum length: 1 |
body.deployments[].runtime_risks | array | Optional | A list of runtime risks associated with the deployment. Maximum items: 4 Unique items: true |
body.deployments[].runtime_risks[] | string | Each item | One of: critical-resource, internet-exposed, lateral-movement, sensitive-data |
body.deployments[].status | string | Optional | The deployment status of the artifact. Default: deployed One of: deployed, decommissioned |
body.deployments[].tags | object | Optional | Key-value pairs to tag the deployment record. Additional keys: see wildcard field |
body.deployments[].tags.* | string | Additional keys | |
body.deployments[].version | string | Optional | The artifact version. Maximum length: 100 |
body.logical_environment | string | Required within parent | The stage of the deployment. Maximum length: 128 Minimum length: 1 |
body.partial_success | boolean | Optional | 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 |
body.physical_environment | string | Optional | The physical region of the deployment. Maximum length: 128 |
body.return_records | boolean | Optional | If true, the endpoint will return the set records in the response body Default: true |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | |
$ (anyOf 1).deployment_records | array | Optional | |
$ (anyOf 1).deployment_records[] | Model | Each item | Expand List artifact deployment records — response body — deployment records item |
$ (anyOf 1).total_count | JSON | Required within parent | |
$ (anyOf 1).total_count (anyOf 1) | integer | Alternative | The number of deployment records created |
$ (anyOf 1).total_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 2) | object | Alternative | |
$ (anyOf 2).deployment_records | array | Optional | |
$ (anyOf 2).deployment_records[] | Model | Each item | Expand List artifact deployment records — response body — deployment records item |
$ (anyOf 2).errors | array | Optional | A list of errors for deployments that could not be processed. |
$ (anyOf 2).errors[] | object | Each item | |
$ (anyOf 2).errors[].cause | string | Optional | The reason the deployment failed processing. Known values: unauthorized, not_found |
$ (anyOf 2).errors[].deployment | object | Optional | The deployment payload that could not be processed. |
$ (anyOf 2).errors[].deployment.deployment_name | string | Optional | The name of the deployment that failed processing. |
$ (anyOf 2).errors[].deployment.digest | string | Optional | The digest of the artifact. |
$ (anyOf 2).errors[].deployment.github_repository | JSON | Optional | |
$ (anyOf 2).errors[].deployment.github_repository (anyOf 1) | string | Alternative | The repository associated with the deployment. |
$ (anyOf 2).errors[].deployment.github_repository (anyOf 2) | null | Alternative | |
$ (anyOf 2).errors[].deployment.name | string | Optional | The name of the artifact. |
$ (anyOf 2).errors[].deployment.runtime_risks | array | Optional | Runtime risk classifications for the deployment. |
$ (anyOf 2).errors[].deployment.runtime_risks[] | string | Each item | |
$ (anyOf 2).errors[].deployment.status | string | Optional | The deployment status. |
$ (anyOf 2).errors[].deployment.tags | object | Optional | Custom metadata tags for the deployment. Additional keys: see wildcard field |
$ (anyOf 2).errors[].deployment.tags.* | string | Additional keys | |
$ (anyOf 2).errors[].deployment.version | JSON | Optional | |
$ (anyOf 2).errors[].deployment.version (anyOf 1) | string | Alternative | The version of the deployment. |
$ (anyOf 2).errors[].deployment.version (anyOf 2) | null | Alternative | |
$ (anyOf 2).total_count | JSON | Required within parent | |
$ (anyOf 2).total_count (anyOf 1) | integer | Alternative | The number of deployment records created or updated. |
$ (anyOf 2).total_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: List artifact deployment records — response body — deployment records item
Schemas
Section titled “Schemas”List artifact deployment records — response body — deployment records item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Artifact Metadata Deployment Record |
attestation_id | JSON | Optional | |
attestation_id (anyOf 1) | JSON | Alternative | |
attestation_id (anyOf 1) (anyOf 1) | integer | Alternative | The ID of the provenance attestation associated with the deployment record. |
attestation_id (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
attestation_id (anyOf 2) | null | Alternative | |
cluster | string | Optional | |
created_at | string | Optional | |
deployment_name | string | Optional | |
digest | string | Optional | |
id | JSON | Optional | |
id (anyOf 1) | integer | Alternative | |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
logical_environment | string | Optional | |
physical_environment | string | Optional | |
runtime_risks | array | Optional | A list of runtime risks associated with the deployment. Maximum items: 4 Unique items: true |
runtime_risks[] | string | Each item | Known values: critical-resource, internet-exposed, lateral-movement, sensitive-data |
tags | object | Optional | Additional keys: see wildcard field |
tags.* | string | Additional keys | |
updated_at | string | Optional |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}