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
| Field | Type | Required | Rules |
|---|---|---|---|
items | array of object | yes | up to 64 items |
items[].repository | string | yes | — |
items[].upstream | string (uri) | yes | — |
items[].sourceRepository | string | yes | — |
items[].mode | string | yes | one of mirror, import |
items[].stages | array of string | yes | up to 16 items |
items[].phase | string | yes | one of pending, seeding, following |
items[].seedStep | string | yes | one of artifacts, packages, assets; may be null |
items[].cursor | string | yes | a whole number in decimal digits, sent as a string |
items[].head | string | yes | a whole number in decimal digits, sent as a string; may be null |
items[].caughtUp | boolean | yes | may be null |
items[].checkedAt | string (date-time) | yes | may be null |
items[].syncedAt | string (date-time) | yes | may be null |
items[].errorCode | string | yes | may be null |
items[].errorAt | string (date-time) | yes | may be null |
items[].copiedArtifacts | integer | yes | at least 0 |
items[].copiedBytes | string | yes | a whole number in decimal digits, sent as a string |
items[].conflicts | object | yes | — |
items[].conflicts.count | integer | yes | at least 0 |
items[].conflicts.oldestAt | string (date-time) | yes | may be null |
items[].conflicts.sample | array of object | yes | up to 10 items |
Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507
Example
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
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
repository | path | string | yes | matches ^[a-z0-9][a-z0-9_-]{0,63}$ |
Response 200
| Field | Type | Required | Rules |
|---|---|---|---|
repository | string | yes | — |
upstream | string (uri) | yes | — |
sourceRepository | string | yes | — |
mode | string | yes | one of mirror, import |
stages | array of string | yes | up to 16 items |
phase | string | yes | one of pending, seeding, following |
seedStep | string | yes | one of artifacts, packages, assets; may be null |
cursor | string | yes | a whole number in decimal digits, sent as a string |
head | string | yes | a whole number in decimal digits, sent as a string; may be null |
caughtUp | boolean | yes | may be null |
checkedAt | string (date-time) | yes | may be null |
syncedAt | string (date-time) | yes | may be null |
errorCode | string | yes | may be null |
errorAt | string (date-time) | yes | may be null |
copiedArtifacts | integer | yes | at least 0 |
copiedBytes | string | yes | a whole number in decimal digits, sent as a string |
conflicts | object | yes | — |
conflicts.count | integer | yes | at least 0 |
conflicts.oldestAt | string (date-time) | yes | may be null |
conflicts.sample | array of object | yes | up to 10 items |
conflicts.sample[].artifactId | string (uuid) | yes | — |
conflicts.sample[].action | string | yes | — |
conflicts.sample[].detail | string | yes | may be null |
conflicts.sample[].code | string | yes | — |
conflicts.sample[].firstAt | string (date-time) | yes | — |
conflicts.sample[].lastAt | string (date-time) | yes | — |
conflicts.sample[].attempts | integer | yes | at least 1 |
Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507
Example
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/mirror" \
-H "Authorization: Bearer $ARKVORY_TOKEN"