v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1340127143.5 KB
projects

Creates an attachment. The returned Operation will finish once the attachment has been created. Its response will be the created attachment.

post/v1/{+parent}/attachments

Path parameters

parentstring required

Required. The name of the parent resource where the attachment will be created.

Query parameters

attachmentIdstring

Required. The attachment id to use for this attachment.

Request body

targetstring

Required. The target the attachment is for, can be a Version, Package or Repository. E.g. projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1.

annotationsobject

Optional. User annotations. These attributes can only be set and used by the user, and not by Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

attachmentNamespacestring

The namespace this attachment belongs to. E.g. If an attachment is created by artifact analysis, namespace is set to artifactanalysis.googleapis.com.

createTimestring google-datetime

Output only. The time when the attachment was created.

ociVersionNamestring

Output only. The name of the OCI version that this attachment created. Only populated for Docker attachments. E.g. projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1.

typestring

Type of attachment. E.g. application/vnd.spdx+json

updateTimestring google-datetime

Output only. The time when the attachment was last updated.

namestring

The name of the attachment. E.g. projects/p1/locations/us/repositories/repo/attachments/sbom.

filesstring[]

Required. The files that belong to this attachment. If the file ID part contains slashes, they are escaped. E.g. projects/p1/locations/us-central1/repositories/repo1/files/sha:.

Response

Successful response