Skip to main content

artifact_storage_records

Creates, updates, deletes, gets or lists an artifact_storage_records resource.

Overview

Nameartifact_storage_records
TypeResource
Idgithub.orgs.artifact_storage_records

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idinteger
namestring
artifact_urlstring
created_atstring
digeststring
registry_urlstring
repositorystring
statusstring
updated_atstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_artifact_storage_recordsselectorg, subject_digestList artifact storage records with a given subject digest for repositories owned by an organization.

Results are filtered by the authenticated user's permissions; records for repositories the user cannot read are omitted. Fine-grained access tokens require the artifact-metadata:read permission.
create_artifact_storage_recordinsertorg, name, digest, registry_urlCreate metadata storage records for artifacts associated with an organization.
This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and
associated with a repository owned by the organization.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
subject_digeststringThe parameter should be set to the attestation's subject's SHA256 digest, in the form sha256:HEX_DIGEST. (example: sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72)

SELECT examples

List artifact storage records with a given subject digest for repositories owned by an organization.

Results are filtered by the authenticated user's permissions; records for repositories the user cannot read are omitted. Fine-grained access tokens require the artifact-metadata:read permission.

SELECT
id,
name,
artifact_url,
created_at,
digest,
registry_url,
repository,
status,
updated_at
FROM github.orgs.artifact_storage_records
WHERE org = '{{ org }}' -- required
AND subject_digest = '{{ subject_digest }}' -- required
;

INSERT examples

Create metadata storage records for artifacts associated with an organization.
This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and
associated with a repository owned by the organization.

INSERT INTO github.orgs.artifact_storage_records (
name,
digest,
version,
artifact_url,
path,
registry_url,
repository,
status,
github_repository,
return_records,
org
)
SELECT
'{{ name }}' /* required */,
'{{ digest }}' /* required */,
'{{ version }}',
'{{ artifact_url }}',
'{{ path }}',
'{{ registry_url }}' /* required */,
'{{ repository }}',
'{{ status }}',
'{{ github_repository }}',
{{ return_records }},
'{{ org }}'
RETURNING
storage_records,
total_count
;