Skip to content

Stages and promotion ​

Stages of an artifact (for example release), promotion between repositories and resolution of a stage to a version.

Operations of this group with their access rule, retry rule, parameters and answers. Every request carries a key: Authorization: Bearer <key> (see Authentication).

Operations ​

List the stages of an artifact ​

GET HEAD /api/v1/repositories/{repository}/artifacts/{id}/stages

Access: Repository permission: artifact.read; file keys: read · Retry: Safe to repeat (read)

Returns the current promotion stages of a published artifact (at most 16), each with the time it was added, the actor and the comment.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
idpathstring (uuid)yes—

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 16 items
items[].artifactIdstring (uuid)yes—
items[].stagestringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$
items[].promotedAtstring (date-time)yes—
items[].actorstringyes—
items[].commentstringyesup to 1024 characters; may be null

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/artifacts/$ID/stages" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Add a stage to an artifact ​

PUT /api/v1/repositories/{repository}/artifacts/{id}/stages/{stage}

Access: Repository permission: artifact.promote, artifact.read; file keys: read, write · Retry: Safe to repeat: the same request has the same effect

Marks a published artifact with stage (1–32 lower-case letters, digits or _.-, starting with a letter or digit), with an optional comment of up to 1024 characters, and records the event in the promotion journal. Adding a stage the artifact already has changes nothing and keeps the original time, so to promote the same version again (for a rollback with order=promoted) remove the stage first. An artifact has at most 16 stages (409 stage_limit).

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
idpathstring (uuid)yes—
stagepathstringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$

Request body (application/json)

FieldTypeRequiredRules
commentstringnoup to 1024 characters; may be null

Response 200

FieldTypeRequiredRules
artifactIdstring (uuid)yes—
stagestringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$
promotedAtstring (date-time)yes—
actorstringyes—
commentstringyesup to 1024 characters; may be null

Responses: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X PUT "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/artifacts/$ID/stages/$STAGE" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Remove a stage from an artifact ​

DELETE /api/v1/repositories/{repository}/artifacts/{id}/stages/{stage}

Access: Repository permission: artifact.promote, artifact.read; file keys: read, write · Retry: Safe to repeat: the same request has the same effect

Removes stage from a published artifact and records the event in the promotion journal; removing a stage the artifact does not have succeeds too. Package resolution by this stage stops choosing the artifact at once.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
idpathstring (uuid)yes—
stagepathstringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$

Responses: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

Example

bash
curl -X DELETE "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/artifacts/$ID/stages/$STAGE" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

List the promotion history of an artifact ​

GET HEAD /api/v1/repositories/{repository}/artifacts/{id}/promotions

Access: Repository permission: artifact.read; file keys: read · Retry: Safe to repeat (read)

Returns the journal of one artifact, oldest first: stages added and removed, promotions to and from other repositories with the peer artifact, actor, comment and time. Pages hold limit events (1–100, default 50); continue with after set to next.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
idpathstring (uuid)yes—
afterquerystringnoa whole number in decimal digits, sent as a string
limitquerystringnoa whole number in decimal digits, sent as a string; At most 100.

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 100 items
items[].sequencestringyesa whole number in decimal digits, sent as a string
items[].repositorystringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
items[].artifactIdstring (uuid)yes—
items[].actionstringyesone of stage.added, stage.removed, promoted, received
items[].stagestringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$; may be null
items[].modestringyesone of copy, move, null; may be null
items[].peerRepositorystringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$; may be null
items[].peerArtifactIdstring (uuid)yesmay be null
items[].actorstringyes—
items[].commentstringyesup to 1024 characters; may be null
items[].occurredAtstring (date-time)yes—
nextstringyesmay be null

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/artifacts/$ID/promotions" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Promote an artifact to another repository ​

POST /api/v1/repositories/{repository}/artifacts/{id}/promote

Access: Repository permission: artifact.read, content.read; file keys: read · Retry: Safe to repeat: the same request has the same effect

Publishes the artifact in target without sending the bytes again, optionally with stages and a comment; the caller also needs artifact.promote in the target. mode copy (default) keeps the source; move, which needs artifact.promote here as well, retires the source in the same transaction, carries its stages over and is refused with 409 when the source cannot be deleted. The answer is 201 with the copy; a repeat returns the same copy with 200, and a target that already has this package version returns that artifact when the SHA-256 matches and a 409 version_exists when it does not. Build attachments and file paths are not carried over.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
idpathstring (uuid)yes—

Request body (application/json)

FieldTypeRequiredRules
targetstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
modestringnoone of copy, move
stagesarray of stringnoup to 16 items; no repeated items; each: matches ^[a-z0-9][a-z0-9_.-]{0,31}$
commentstringnoup to 1024 characters; may be null

Response 200

FieldTypeRequiredRules
repositorystringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
artifactIdstring (uuid)yes—
sourceRepositorystringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
sourceArtifactIdstring (uuid)yes—
modestringyesone of copy, move
createdbooleanyes—
stagesarray of stringyesup to 16 items; no repeated items; each: matches ^[a-z0-9][a-z0-9_.-]{0,31}$

Responses: 200, 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/artifacts/$ID/promote" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target":"<target>"}'

List artifacts with stages ​

GET HEAD /api/v1/repositories/{repository}/stages

Access: Repository permission: artifact.list; file keys: read · Retry: Safe to repeat (read)

Lists the stage entries of the repository (artifact, stage, time, actor, comment) ordered by artifact and stage, optionally only stage, or only the artifacts in ids (1–100 comma-separated IDs, for example to show the stages of a page of packages at once). Pages hold limit entries (1–100, default 100); continue with after set to next (<artifactId>/<stage>).

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
stagequerystringnomatches ^[a-z0-9][a-z0-9_.-]{0,31}$
afterquerystringno—
limitquerystringnoa whole number in decimal digits, sent as a string; At most 100.
idsquerystringnoup to 3699 characters; Up to 100 comma-separated artifact ids.

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 100 items
items[].artifactIdstring (uuid)yes—
items[].stagestringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$
items[].promotedAtstring (date-time)yes—
items[].actorstringyes—
items[].commentstringyesup to 1024 characters; may be null
nextstringyesmay be null

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/stages" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Follow the promotion journal of a repository ​

GET HEAD /api/v1/repositories/{repository}/promotions

Access: Repository permission: artifact.list; file keys: read · Retry: Safe to repeat (read)

Returns the stage and promotion events of every artifact in the repository, oldest first, for CI/CD to poll: stage added or removed, promoted to another repository, received from one. Pages hold limit events (1–100, default 50); store the last sequence and continue with after set to next.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
afterquerystringnoa whole number in decimal digits, sent as a string
limitquerystringnoa whole number in decimal digits, sent as a string; At most 100.

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 100 items
items[].sequencestringyesa whole number in decimal digits, sent as a string
items[].repositorystringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
items[].artifactIdstring (uuid)yes—
items[].actionstringyesone of stage.added, stage.removed, promoted, received
items[].stagestringyesmatches ^[a-z0-9][a-z0-9_.-]{0,31}$; may be null
items[].modestringyesone of copy, move, null; may be null
items[].peerRepositorystringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$; may be null
items[].peerArtifactIdstring (uuid)yesmay be null
items[].actorstringyes—
items[].commentstringyesup to 1024 characters; may be null
items[].occurredAtstring (date-time)yes—
nextstringyesmay be null

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/promotions" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Resolve a package version ​

GET HEAD /api/v1/repositories/{repository}/packages/resolve

Access: Repository permission: package.read; file keys: read · Retry: Safe to repeat (read)

Chooses one registered UPack version by the same rules as downloadPackageContent and returns it without the bytes: version, artifact ID, SHA-256, size, publication time and current stages. name is required, group defaults to the root group; select by exact version or SemVer range, optionally stage, prerelease=true and order=promoted (needs stage); without version and range it is the highest stable version. No match is a 404; download the result by artifact ID to stay on that version.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$
groupquerystringnoup to 128 characters
namequerystringyes1–128 characters
versionquerystringnoup to 128 characters; Exact version; excludes range.
rangequerystringnoup to 256 characters; SemVer range: 1.2.3, ^1.2, ~1.2.3, 1.x, >=1.0.0 <2.0.0, a || b.
stagequerystringnomatches ^[a-z0-9][a-z0-9_.-]{0,31}$; Only versions promoted to this stage.
prereleasequerystringnoone of true, false; Include prereleases.
orderquerystringnoone of version, promoted; promoted picks the most recently staged version and requires stage.

Response 200

FieldTypeRequiredRules
groupstringyes—
namestringyes—
versionstringyes—
artifactIdstring (uuid)yes—
sha256stringyesSHA-256: 64 lowercase hexadecimal digits
sizestringyesa whole number in decimal digits, sent as a string
publishedAtstring (date-time)yes—
stagedAtstring (date-time)yesmay be null
stagesarray of stringyesup to 16 items; no repeated items; each: matches ^[a-z0-9][a-z0-9_.-]{0,31}$

Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507

Example

bash
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/packages/resolve?name=$NAME" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

Arkvory · ProAnimaStudio