Skip to content

Create artifact metadata storage record

POST
/orgs/{org}/artifacts/metadata/storage-record

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.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

Media type application/json
object
name
required

The name of the artifact.

string
>= 1 characters <= 256 characters
digest
required

The digest of the artifact (algorithm:hex-encoded-digest).

string
>= 71 characters <= 71 characters /^sha256:[a-f0-9]{64}$/
version

The artifact version.

string
>= 1 characters <= 100 characters
artifact_url

The URL where the artifact is stored.

string format: uri
<= 152 characters /^https:///
path

The path of the artifact.

string format: uri
<= 512 characters
registry_url
required

The base URL of the artifact registry.

string format: uri
>= 1 characters <= 256 characters /^https:///
repository

The repository name within the registry.

string
<= 128 characters
status

The status of the artifact (e.g., active, inactive).

string
default: active
Allowed values: active eol deleted
github_repository

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.

string
>= 1 characters <= 100 characters /^[A-Za-z0-9.\-_]+$/
return_records

If true, the endpoint will return the created record in the response body.

boolean
default: true
Examples
Example default
{
"name": "libfoo",
"version": "1.2.3",
"digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72",
"artifact_url": "https://reg.example.com/artifactory/bar/libfoo-1.2.3",
"registry_url": "https://reg.example.com/artifactory/",
"repository": "bar",
"status": "active"
}

Artifact metadata storage record stored successfully.

Media type application/json
object
total_count
required
integer
storage_records
Array<object>
object
id
integer
name
string
digest
string
artifact_url
string
nullable
registry_url
string
repository
string
nullable
status
string
created_at
string
updated_at
string
Examples
Example default
{
"total_count": 1,
"storage_records": [
{
"name": "libfoo",
"digest": "sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72",
"artifact_url": "https://reg.example.com/artifactory/bar/libfoo-1.2.3",
"registry_url": "https://reg.example.com/artifactory/",
"repository": "bar",
"status": "active",
"created_at": "2023-10-01T12:00:00Z",
"updated_at": "2023-10-01T12:00:00Z"
}
]
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}