Skip to content

Updates ​

Update offers from the hub and the request to install one.

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

Operations ​

Get the update state ​

GET HEAD /api/v1/system/updates

Access: Administrator · Retry: Safe to repeat (read)

Returns what the host updater reports: the installed version and schema, the newest release found (latest), the automatic update settings (automatic, hourUTC, pin, channel, statistics), the phase (idle, checking, updating, failed), the last error, the last heartbeat and the settings revision, plus the request still waiting in the updater's mailbox (pending). snapshot is null when no host updater is connected. Pass revision to requestSystemUpdate.

Response 200

FieldTypeRequiredRules
snapshotobjectyesmay be null
snapshot.revisionintegeryes0–2147483646
snapshot.currentVersionstringyesmatches ^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$
snapshot.currentSchemaintegeryes0–2147483647
snapshot.automaticbooleanyes—
snapshot.hourUTCintegeryes0–23
snapshot.pinstringyesmatches ^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$; may be null
snapshot.heartbeatAtstring (date-time)yes—
snapshot.checkedAtstring (date-time)yesmay be null
snapshot.latestobjectyesmay be null
snapshot.latest.versionstringyesmatches ^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$
snapshot.latest.schemaintegeryes0–2147483647
snapshot.latest.sha256stringyesSHA-256: 64 lowercase hexadecimal digits
snapshot.phasestringyesone of idle, checking, updating, failed
snapshot.errorstringyesone of check_failed, update_failed, conflict, maintenance_required, recovery_required, null; may be null
snapshot.lastAttemptDaystringyesmay be null
snapshot.lastRequestIdstring (uuid)yesmay be null
snapshot.statisticsbooleanno—
snapshot.channelstringnoone of stable, beta
pendingobjectyesone of null
pending.idstring (uuid)yes—
pending.expectedRevisionintegeryes0–2147483646
pending.kindstringyesone of check
pending.versionstringyesmatches ^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$
pending.sha256stringyesSHA-256: 64 lowercase hexadecimal digits
pending.automaticbooleanyes—
pending.hourUTCintegeryes0–23
pending.statisticsbooleanno—

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

Example

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

Request an update action ​

POST /api/v1/system/updates/requests

Access: Administrator · Retry: Repeat only with the expected revision (compare-and-swap)

Hands one command to the host updater, which does the work: kind check looks for a new release, apply installs the given stable version with its sha256, configure sets automatic, hourUTC and optionally statistics. Send a new UUID as id and the expectedRevision from getSystemUpdates; 409 revision_mismatch means the settings changed, 503 busy that a request is pending or the updater is working, 503 unavailable that no updater is connected or its heartbeat is older than five minutes. The answer 202 only means the request was queued: follow phase, currentVersion and lastRequestId in getSystemUpdates. Repeating the same id and body is safe.

Request body (application/json)

FieldTypeRequiredRules
idstring (uuid)yes—
expectedRevisionintegeryes0–2147483646
kindstringyesone of check
versionstringyesmatches ^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$
sha256stringyesSHA-256: 64 lowercase hexadecimal digits
automaticbooleanyes—
hourUTCintegeryes0–23
statisticsbooleanno—

Response 202

FieldTypeRequiredRules
idstring (uuid)yes—

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

Example

bash
curl -X POST "$ARKVORY_URL/api/v1/system/updates/requests" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"00000000-0000-4000-8000-000000000000","expectedRevision":0,"kind":"check"}'

Arkvory · ProAnimaStudio