Search + K

Command Palette

Search for a command to run...

Sign In

Create an attestation

POST /repos/{owner}/{repo}/attestations
Copy endpoint
https://api.github.com

Store an artifact attestation and associate it with a repository.

The authenticated user must have write permission to the repository and, if using a fine-grained access token, the attestations:write permission is required.

Artifact attestations are meant to be created using the attest action. For more information, see our guide on using artifact attestations to establish a build's provenance.

Parameters

path Path Parameters

Name Type
owner required

The account owner of the repository. The name is not case sensitive.

string
repo required

The name of the repository without the .git extension. The name is not case sensitive.

string

Request Body

application/json required
{ bundle: { mediaType?: string;verificationMaterial?: { };dsseEnvelope?: { }; }; }

Responses

201 application/json

response

{ id?: number; }

Client Errors

403 application/json

Forbidden

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json

Validation failed, or the endpoint has been spammed.

interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}
[]
;
}