Skip to content

GitHub: Create an artifact deployment record

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

← Orgs operations · Get started

Operation github.orgs_create_artifact_deployment_record

Provider route: POST /orgs/{org}/artifacts/metadata/deployment-record. 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"]["orgsCreateArtifactDeploymentRecord"]>[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.orgsCreateArtifactDeploymentRecord(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_create_artifact_deployment_record(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
bodyobjectRequired within parent
body.clusterstringOptionalThe deployment cluster.
Maximum length: 128
body.deployment_namestringRequired within parentThe 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}.

Maximum length: 256
body.digeststringRequired within parentThe hex encoded digest of the artifact.
Maximum length: 71
Minimum length: 71
Pattern: ^sha256:[a-f0-9]{64}$
body.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
Minimum length: 1
Pattern: ^[A-Za-z0-9.-_]+$
body.logical_environmentstringRequired within parentThe stage of the deployment.
Maximum length: 128
Minimum length: 1
body.namestringRequired within parentThe name of the artifact.
Maximum length: 256
Minimum length: 1
body.physical_environmentstringOptionalThe physical region of the deployment.
Maximum length: 128
body.return_recordsbooleanOptionalIf true, the endpoint will return the created or updated record in the response body.

Default: true
body.runtime_risksarrayOptionalA list of runtime risks associated with the deployment.
Maximum items: 4
Unique items: true
body.runtime_risks[]stringEach itemOne of: critical-resource, internet-exposed, lateral-movement, sensitive-data
body.statusstringRequired within parentThe status of the artifact. Can be either deployed or decommissioned.
One of: deployed, decommissioned
body.tagsobjectOptionalThe tags associated with the deployment.
Maximum fields: 5
Additional keys: see wildcard field
body.tags.*stringAdditional keys
body.versionstringOptionalThe artifact version.
Maximum length: 100
Minimum length: 1

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

FieldTypePresenceDescription and constraints
$objectRoot
deployment_recordsarrayOptional
deployment_records[]ModelEach itemExpand List artifact deployment records — response body — deployment records item
total_countJSONRequired within parent
total_count (anyOf 1)integerAlternativeThe number of deployment records created
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_create_artifact_deployment_record. Catalog operation: orgs/create-artifact-deployment-record. 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.