Packages
UPack packages: registration, listing, versions and downloads by name, version or range.
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 package versions
GET HEAD /api/v1/repositories/{repository}/packages
Access: Repository permission: package.read; file keys: read · Retry: Safe to repeat (read)
Lists the registered UPack versions with their manifests, filtered by group and name (exact, ignoring case; group= with an empty value selects the root group, leaving it out selects all groups). sort (group, name, version), direction (asc, desc) and groupBy (none, group, package, which adds groups listing the artifactIds of the page) shape the result. Pages hold limit items (1–100, default 50); continue with after set to next and the same filters. Pages are not a snapshot: versions registered in between can be missed until the next pass.
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
repository | path | string | yes | matches ^[a-z0-9][a-z0-9_-]{0,63}$ |
group | query | string | no | — |
name | query | string | no | — |
sort | query | string | no | one of group, name, version |
direction | query | string | no | one of asc, desc |
groupBy | query | string | no | one of none, group, package |
after | query | string | no | — |
limit | query | integer | no | 1–100 |
Response 200
| Field | Type | Required | Rules |
|---|---|---|---|
items | array of object | yes | — |
items[].group | string | no | — |
items[].name | string | no | — |
items[].version | string | no | — |
items[].artifactId | string (uuid) | no | — |
items[].manifest | object | no | — |
next | string | yes | may be null |
groups | array of object | yes | — |
groups[].group | string | yes | — |
groups[].name | string | yes | may be null |
groups[].artifactIds | array of string (uuid) | yes | — |
Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507
Example
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/packages" \
-H "Authorization: Bearer $ARKVORY_TOKEN"Download a package by name and version
GET HEAD /api/v1/repositories/{repository}/packages/content
Access: Repository permission: content.read; file keys: read · Retry: Safe to repeat (read)
Resolves name (in group, the root group by default) to one registered version and streams it like downloadArtifact; X-Arkvory-Artifact-Id and X-Arkvory-Package-Version name the choice. Select by exact version or SemVer range (such as ^1.4 or >=1.0.0 <2.0.0), optionally only versions with stage; without either it takes the highest stable version, prerelease=true admits prereleases and order=promoted takes the version most recently given stage. The name is resolved on every request, so resume with If-Range set to the returned ETag, or download by artifact ID; resolvePackage gives the same choice without the bytes.
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
repository | path | string | yes | matches ^[a-z0-9][a-z0-9_-]{0,63}$ |
Range | header | string | no | Single bytes range; multi-range is unsupported. HEAD ignores Range. |
If-Range | header | string | no | Exact strong ETag; a mismatch causes a full response. |
If-None-Match | header | string | no | Matching ETag returns 304, including HEAD. |
Arkvory-Download-Id | header | string | no | matches ^[A-Za-z0-9_-]{16,64}$; The client own id of one download, the same on every range of it: the queue keys the session by it instead of the client address, answers a waiting request at once with 503 download_queued, and may ask it to yield its place at a range boundary. Without it, a waiting request is held until its turn for a bounded time. |
Arkvory-Queue-Ticket | header | string | no | up to 80 characters; The last Arkvory-Queue-Ticket the server sent for this download: after a server restart the download takes its old turn. A ticket that is wrong, expired or of another download is ignored. |
Arkvory-Download-Class | header | string | no | one of interactive, release, bulk, background; Queue class of the download. Only a class lower than the caller own one applies (people: interactive, services and links: release); an unknown value is 400. The response names the class applied. |
group | query | string | no | up to 128 characters |
name | query | string | yes | 1–128 characters |
version | query | string | no | up to 128 characters; Exact version; excludes range. |
range | query | string | no | up to 256 characters; SemVer range: 1.2.3, ^1.2, ~1.2.3, 1.x, >=1.0.0 <2.0.0, a || b. |
stage | query | string | no | matches ^[a-z0-9][a-z0-9_.-]{0,31}$; Only versions promoted to this stage. |
prerelease | query | string | no | one of true, false; Include prereleases. |
order | query | string | no | one of version, promoted; promoted picks the most recently staged version and requires stage. |
Responses: 200, 206, 304, 400, 401, 403, 404, 409, 416, 422, 503, 507
Example
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/packages/content?name=$NAME" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-o file