Skip to content

Bundles API ​

18 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

GET /api/v1/bundles ​

List bundles

Parameters

NameInTypeRequiredDescription
namequerystringno-
statequerystringno-
pagequerystringno-
limitquerystringno-

Responses

StatusDescriptionBody
200Successapplication/json: object
defaultErrorapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
bundlesarray of ReleaseBundleno-
limitintegerno-
pageintegerno-
totalintegerno-

POST /api/v1/bundles ​

Create bundle

Creates a draft bundle owned by the caller. Allowed for administrators and for any principal that can read at least one repository; the other bundle routes authorize per bundle (see the release bundles documentation).

Request body (required)

application/json: object

FieldTypeRequiredDescription
descriptionstringno-
namestringno-
pipelinestringnoName of the promotion pipeline; exclusive with pipeline_id.
pipeline_idstringno-
versionstringno-

Responses

StatusDescriptionBody
201Createdapplication/json: ReleaseBundle
defaultErrorapplication/json: Error

GET /api/v1/bundles/{name}/{version} ​

Get bundle

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
200Successapplication/json: ReleaseBundle
defaultErrorapplication/json: Error

DELETE /api/v1/bundles/{name}/{version} ​

Delete bundle

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
204No content-
defaultErrorapplication/json: Error

POST /api/v1/bundles/{name}/{version}/archive ​

Archive bundle

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
200Successapplication/json: ReleaseBundle
defaultErrorapplication/json: Error

GET /api/v1/bundles/{name}/{version}/items ​

List bundle items

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
200Successapplication/json: object
defaultErrorapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
itemsarray of ReleaseBundleItemno-

POST /api/v1/bundles/{name}/{version}/items ​

Add bundle items (draft bundles only, atomic)

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
itemsarray of objectno-

Responses

StatusDescriptionBody
201Createdapplication/json: object
defaultErrorapplication/json: Error

Fields of the 201 response (application/json):

FieldTypeRequiredDescription
itemsarray of ReleaseBundleItemno-

DELETE /api/v1/bundles/{name}/{version}/items/{sha256} ​

Remove bundle item

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-
sha256pathstringyes-

Responses

StatusDescriptionBody
204No content-
defaultErrorapplication/json: Error

GET /api/v1/bundles/{name}/{version}/manifest ​

Get bundle manifest

The exact JSON document a bundle signature covers (admin only): bundle identity plus its items ordered by digest.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
200Manifestapplication/json: object
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Admin access required-
404Bundle not found-

GET /api/v1/bundles/{name}/{version}/manifest.asc ​

Get bundle manifest signature

Armored detached GPG signature of the manifest; 404 when the bundle was sealed without a key (admin only). Verify with gpg --verify manifest.json.asc manifest.json.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
200Armored signatureapplication/pgp-signature: string
400Invalid request, including a NUL byte in the URL or the bodyapplication/json: Error
403Admin access required-
404Bundle not found or not signed-

POST /api/v1/bundles/{name}/{version}/promote ​

Promote bundle

Copies every item of a sealed bundle into target_repo and moves the bundle to to_stage (admin only). Items are copied as metadata that references the same stored blobs (no bytes are duplicated), in one transaction: either every item lands and the promotion is recorded, or nothing changes. The target's storage quota is charged, its license policies and immutable_releases setting are enforced, and quarantined source artifacts are refused. An artifact already present in the target with the same content counts as existing (so a retry is idempotent); different content at the same coordinates is a 409. Emits the bundle.promoted webhook event.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-
forcequerybooleannoAdministrators only: true replaces content that the target already holds at the same coordinates, including released versions of a repository with immutable_releases, instead of answering 409. The replaced rows go to the target's trash.

Request body (required)

application/json: object

FieldTypeRequiredDescription
notesstringno-
target_repostringnoRepository to promote into. May be omitted when the pipeline stage fixes a repository.
to_stagestringno-

Responses

StatusDescriptionBody
200Promotedapplication/json: object
400Invalid request, or an item's repository and the target are not hosted repositories of the same formatapplication/json: Error
403Not an admin; an item is quarantined in its source (ARTIFACT_QUARANTINED); or a license policy of the target blocks it (LICENSE_BLOCKED)application/json: Error
404Bundle or target repository not foundapplication/json: Error
409Bundle not sealed or changed concurrently; to_stage does not follow the current stage; an item no longer exists in its source repository (artifact_missing); the target holds different content at the same coordinates (artifact_conflict), or the target has immutable releases and the version is a release (immutable_release)application/json: Error
507The target repository's storage quota would be exceeded (quota_exceeded)application/json: Error
defaultErrorapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
copiedintegernoArtifacts newly written to the target
existingintegernoArtifacts the target already held with the same content
itemsarray of objectno-
items[].artifact_pathstringno-
items[].copiedarray of objectno-
items[].copied[].namestringno-
items[].copied[].pathstringno-
items[].copied[].sha256stringno-
items[].copied[].sizeinteger (int64)no-
items[].copied[].versionstringno-
items[].existingarray of objectno-
items[].existing[].namestringno-
items[].existing[].pathstringno-
items[].existing[].sha256stringno-
items[].existing[].sizeinteger (int64)no-
items[].existing[].versionstringno-
items[].formatstringno-
items[].replacedarray of objectno-
items[].replaced[].namestringno-
items[].replaced[].pathstringno-
items[].replaced[].sha256stringno-
items[].replaced[].sizeinteger (int64)no-
items[].replaced[].versionstringno-
items[].sha256stringno-
promotionobjectnoThe recorded bundle promotion (status success)
replacedintegernoArtifacts a forced promotion moved to the target's trash because they held different content

GET /api/v1/bundles/{name}/{version}/promotions ​

List promotions

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Responses

StatusDescriptionBody
200Successapplication/json: object
defaultErrorapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
promotionsarray of BundlePromotionno-

POST /api/v1/bundles/{name}/{version}/seal ​

Seal bundle

Seals a draft bundle. With gpg_key_id (a key id from the admin GPG list, a fingerprint, or config) the bundle manifest is signed and the armored detached signature stored with the bundle (gpg_key_id = signer fingerprint, gpg_signature). An unknown key answers 400 validation_failed.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
versionpathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
gpg_key_idstringno-

Responses

StatusDescriptionBody
200Successapplication/json: ReleaseBundle
defaultErrorapplication/json: Error

GET /api/v1/pipelines ​

List pipelines

Responses

StatusDescriptionBody
200Successapplication/json: object
defaultErrorapplication/json: Error

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
pipelinesarray of PromotionPipelineno-

POST /api/v1/pipelines ​

Create pipeline

Request body (required)

application/json: object

FieldTypeRequiredDescription
descriptionstringno-
namestringno-
stagesarray of objectno-

Responses

StatusDescriptionBody
201Createdapplication/json: PromotionPipeline
defaultErrorapplication/json: Error

GET /api/v1/pipelines/{name} ​

Get pipeline

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200Successapplication/json: PromotionPipeline
defaultErrorapplication/json: Error

PATCH /api/v1/pipelines/{name} ​

Update pipeline

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: object

FieldTypeRequiredDescription
descriptionstringno-
stagesarray of objectno-

Responses

StatusDescriptionBody
200Successapplication/json: PromotionPipeline
defaultErrorapplication/json: Error

DELETE /api/v1/pipelines/{name} ​

Delete pipeline

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
204No content-
defaultErrorapplication/json: Error

Free software under the AGPL-3.0-or-later.