Skip to content

Mirrors ​

The state of a mirrored repository and the feed a mirror follows.

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 mirrors and imports of this installation ​

GET HEAD /api/v1/mirrors

Access: Repositories the caller may see (repository.read) · Retry: Safe to repeat (read)

Returns, for every repository this server mirrors or imports from another Arkvory and the caller may read, the same state as the mirror status of one repository: source, mode, phase, cursor and head, caughtUp, the last check, sync and error, and the artifacts and bytes copied. Repositories the caller cannot read are left out; an installation without mirrors answers an empty list.

Response 200

FieldTypeRequiredRules
itemsarray of objectyesup to 64 items
items[].repositorystringyes—
items[].upstreamstring (uri)yes—
items[].sourceRepositorystringyes—
items[].modestringyesone of mirror, import
items[].stagesarray of stringyesup to 16 items
items[].phasestringyesone of pending, seeding, following
items[].seedStepstringyesone of artifacts, packages, assets; may be null
items[].cursorstringyesa whole number in decimal digits, sent as a string
items[].headstringyesa whole number in decimal digits, sent as a string; may be null
items[].caughtUpbooleanyesmay be null
items[].checkedAtstring (date-time)yesmay be null
items[].syncedAtstring (date-time)yesmay be null
items[].errorCodestringyesmay be null
items[].errorAtstring (date-time)yesmay be null
items[].copiedArtifactsintegeryesat least 0
items[].copiedBytesstringyesa whole number in decimal digits, sent as a string
items[].conflictsobjectyes—
items[].conflicts.countintegeryesat least 0
items[].conflicts.oldestAtstring (date-time)yesmay be null
items[].conflicts.samplearray of objectyesup to 10 items

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

Example

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

Get the synchronization state of a mirror ​

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

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

For a repository this server mirrors from another Arkvory (configured in ARKVORY_MIRRORS_FILE), returns the source, the mode (mirror, a read-only copy, or import, which takes over versions with the listed stages), the phase (pending, seeding, following), the applied cursor and the source head, caughtUp, the last check, sync and error, and the artifacts and bytes copied. Sequences are journal numbers of the source, so their difference is not a count of changes. An ordinary repository answers 404.

Parameters

NameInTypeRequiredRules
repositorypathstringyesmatches ^[a-z0-9][a-z0-9_-]{0,63}$

Response 200

FieldTypeRequiredRules
repositorystringyes—
upstreamstring (uri)yes—
sourceRepositorystringyes—
modestringyesone of mirror, import
stagesarray of stringyesup to 16 items
phasestringyesone of pending, seeding, following
seedStepstringyesone of artifacts, packages, assets; may be null
cursorstringyesa whole number in decimal digits, sent as a string
headstringyesa whole number in decimal digits, sent as a string; may be null
caughtUpbooleanyesmay be null
checkedAtstring (date-time)yesmay be null
syncedAtstring (date-time)yesmay be null
errorCodestringyesmay be null
errorAtstring (date-time)yesmay be null
copiedArtifactsintegeryesat least 0
copiedBytesstringyesa whole number in decimal digits, sent as a string
conflictsobjectyes—
conflicts.countintegeryesat least 0
conflicts.oldestAtstring (date-time)yesmay be null
conflicts.samplearray of objectyesup to 10 items
conflicts.sample[].artifactIdstring (uuid)yes—
conflicts.sample[].actionstringyes—
conflicts.sample[].detailstringyesmay be null
conflicts.sample[].codestringyes—
conflicts.sample[].firstAtstring (date-time)yes—
conflicts.sample[].lastAtstring (date-time)yes—
conflicts.sample[].attemptsintegeryesat least 1

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

Example

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

Arkvory · ProAnimaStudio