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
storage_recordsarray
total_countintegerThe number of storage records for this digest and organization

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_artifact_storage_recordsselectorg, subject_digestList a collection of artifact storage records with a given subject digest that are associated with repositories owned by an organization.

The collection of storage records returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the content:read permission is required.
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 a collection of artifact storage records with a given subject digest that are associated with repositories owned by an organization.

The collection of storage records returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the content:read permission is required.

SELECT
storage_records,
total_count
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
;