Saltar al contenido

Paquetes ​

Paquetes UPack: registro, listado, versiones y descargas por nombre, versión o rango.

Operaciones de este grupo con su regla de acceso, su regla de reintento, sus parámetros y sus respuestas. Cada solicitud lleva una clave: Authorization: Bearer <clave> (consulte «Autenticación»).

Operaciones ​

Listar versiones de paquetes ​

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

Acceso: Permiso de repositorio: package.read; claves de archivo: read · Reintento: Se puede repetir (lectura)

Enumera las versiones de UPack registradas con sus manifiestos, filtradas por group y name (exactos, sin distinguir mayúsculas; group= con un valor vacío selecciona el grupo raíz y omitirlo selecciona todos los grupos). sort (group, name, version), direction (asc, desc) y groupBy (none, group, package, que añade groups con los artifactIds de la página) dan forma al resultado. Las páginas contienen limit elementos (1–100, 50 por defecto); continúe pasando next como after con los mismos filtros. Las páginas no son una instantánea: las versiones registradas entretanto pueden omitirse hasta la siguiente pasada.

Parámetros

NombreUbicaciónTipoObligatorioReglas
repositoryrutastringsícoincide con ^[a-z0-9][a-z0-9_-]{0,63}$
groupconsultastringno—
nameconsultastringno—
sortconsultastringnouno de group, name, version
directionconsultastringnouno de asc, desc
groupByconsultastringnouno de none, group, package
afterconsultastringno—
limitconsultaintegerno1–100

Respuesta 200

CampoTipoObligatorioReglas
itemsarray de objectsí—
items[].groupstringno—
items[].namestringno—
items[].versionstringno—
items[].artifactIdstring (uuid)no—
items[].manifestobjectno—
nextstringsípuede ser null
groupsarray de objectsí—
groups[].groupstringsí—
groups[].namestringsípuede ser null
groups[].artifactIdsarray de string (uuid)sí—

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

Ejemplo

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

Descargar un paquete por nombre y versión ​

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

Acceso: Permiso de repositorio: content.read; claves de archivo: read · Reintento: Se puede repetir (lectura)

Resuelve name (en group, el grupo raíz por defecto) a una versión registrada y la transmite como downloadArtifact; X-Arkvory-Artifact-Id y X-Arkvory-Package-Version indican la elección. Seleccione por version exacta o por range SemVer (como ^1.4 o >=1.0.0 <2.0.0), opcionalmente solo las versiones con stage; sin ninguno de los dos toma la versión estable más alta, prerelease=true admite versiones preliminares y order=promoted toma la versión a la que se asignó stage más recientemente. El nombre se resuelve en cada solicitud, así que reanude con If-Range igual al ETag devuelto, o descargue por ID de artefacto; resolvePackage da la misma elección sin los bytes.

Parámetros

NombreUbicaciónTipoObligatorioReglas
repositoryrutastringsícoincide con ^[a-z0-9][a-z0-9_-]{0,63}$
RangeencabezadostringnoSingle bytes range; multi-range is unsupported. HEAD ignores Range.
If-RangeencabezadostringnoExact strong ETag; a mismatch causes a full response.
If-None-MatchencabezadostringnoMatching ETag returns 304, including HEAD.
Arkvory-Download-Idencabezadostringnocoincide con ^[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-Ticketencabezadostringnohasta 80 caracteres; 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-Classencabezadostringnouno de 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.
groupconsultastringnohasta 128 caracteres
nameconsultastringsí1–128 caracteres
versionconsultastringnohasta 128 caracteres; Exact version; excludes range.
rangeconsultastringnohasta 256 caracteres; SemVer range: 1.2.3, ^1.2, ~1.2.3, 1.x, >=1.0.0 <2.0.0, a || b.
stageconsultastringnocoincide con ^[a-z0-9][a-z0-9_.-]{0,31}$; Only versions promoted to this stage.
prereleaseconsultastringnouno de true, false; Include prereleases.
orderconsultastringnouno de version, promoted; promoted picks the most recently staged version and requires stage.

Respuestas: 200, 206, 304, 400, 401, 403, 404, 409, 416, 422, 503, 507

Ejemplo

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

Arkvory · ProAnimaStudio