apicheats.dev github/llms.txt Raw .md
POST

POST /orgs/{org}/artifacts/metadata/storage-record — GitHub API

GitHub token (required); https://api.github.com

GitHub API

Create artifact metadata storage record

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 335 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X POST 'https://api.github.com/orgs/example-org/artifacts/metadata/storage-record' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10' \  -H 'Content-Type: application/json' \  -d '{  "name": "libfoo",  "digest": "sha256:0ecbaa601dba202129058746c7d8e3f282d0efb5fff0...",  "registry_url": "https://reg.example.com/artifactory/"}'

Parameters

Name In Type Required Description
org path string Yes The organization name. The name is not case sensitive.
name body string Yes The name of the artifact.
digest body string Yes The digest of the artifact (algorithm:hex-encoded-digest).
version body string No The artifact version.
artifact_url body string No The URL where the artifact is stored.
path body string No The path of the artifact.
registry_url body string Yes The base URL of the artifact registry.
repository body string No The repository name within the registry.
status body string No The status of the artifact (e.g., active, inactive).
github_repository body string No 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_records body boolean No If true, the endpoint will return the created record in the response body.

Response 200 OK

{
  "total_count": 1,
  "storage_records": [
    {
      "id": 0,
      "name": "string",
      "digest": "string",
      "artifact_url": "string",
      "registry_url": "string",
      "repository": "string",
      "status": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.