本文へスキップ

更新 ​

ハブから提供される更新と、そのインストールの要求。

このグループの操作と、それぞれのアクセスルール、再試行ルール、パラメーター、レスポンスです。すべてのリクエストにはキーを付けます:Authorization: Bearer <key>(「認証」を参照)。

操作 ​

アップデート状態の取得 ​

GET HEAD /api/v1/system/updates

アクセス: 管理者 · 再試行: 再試行しても安全(読み取り)

ホストのアップデーターが報告する内容を返します。内容は、インストール済みのバージョンとスキーマ、見つかった最新のリリース(latest)、自動アップデートの設定(automatic、hourUTC、pin、channel、statistics)、phase(idle、checking、updating、failed)、最後のerror、最後のハートビート、設定のrevision、そしてアップデーターのメールボックスで待機中のリクエスト(pending)です。ホストのアップデーターが接続されていない場合、snapshotはnullです。revisionをrequestSystemUpdateに渡してください。

レスポンス 200

フィールド型必須ルール
snapshotobjectはいnullも可
snapshot.revisionintegerはい0~2147483646
snapshot.currentVersionstringはい^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$に一致
snapshot.currentSchemaintegerはい0~2147483647
snapshot.automaticbooleanはい—
snapshot.hourUTCintegerはい0~23
snapshot.pinstringはい^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$に一致; nullも可
snapshot.heartbeatAtstring (date-time)はい—
snapshot.checkedAtstring (date-time)はいnullも可
snapshot.latestobjectはいnullも可
snapshot.latest.versionstringはい^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$に一致
snapshot.latest.schemaintegerはい0~2147483647
snapshot.latest.sha256stringはいSHA-256:小文字の16進数字64桁
snapshot.phasestringはい次のいずれか:idle, checking, updating, failed
snapshot.errorstringはい次のいずれか:check_failed, update_failed, conflict, maintenance_required, recovery_required, null; nullも可
snapshot.lastAttemptDaystringはいnullも可
snapshot.lastRequestIdstring (uuid)はいnullも可
snapshot.statisticsbooleanいいえ—
snapshot.channelstringいいえ次のいずれか:stable, beta
pendingobjectはい次のいずれか:null
pending.idstring (uuid)はい—
pending.expectedRevisionintegerはい0~2147483646
pending.kindstringはい次のいずれか:check
pending.versionstringはい^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$に一致
pending.sha256stringはいSHA-256:小文字の16進数字64桁
pending.automaticbooleanはい—
pending.hourUTCintegerはい0~23
pending.statisticsbooleanいいえ—

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

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

アップデート操作の要求 ​

POST /api/v1/system/updates/requests

アクセス: 管理者 · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)

実際の処理を行うホストのアップデーターに、コマンドを1つ渡します。kindがcheckなら新しいリリースを確認し、applyなら指定した安定版のversionをsha256とともにインストールし、configureならautomatic、hourUTC、および任意のstatisticsを設定します。idには新しいUUIDを、expectedRevisionにはgetSystemUpdatesで取得した値を送ります。409 revision_mismatchは設定が変更されたこと、503 busyはリクエストが保留中かアップデーターが作業中であること、503 unavailableはアップデーターが接続されていないか、ハートビートが5分より古いことを意味します。202の応答は、リクエストがキューに入ったことだけを意味します。getSystemUpdatesのphase、currentVersion、lastRequestIdで経過を確認してください。同じidとボディで繰り返しても安全です。

リクエスト本文 (application/json)

フィールド型必須ルール
idstring (uuid)はい—
expectedRevisionintegerはい0~2147483646
kindstringはい次のいずれか:check
versionstringはい^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$に一致
sha256stringはいSHA-256:小文字の16進数字64桁
automaticbooleanはい—
hourUTCintegerはい0~23
statisticsbooleanいいえ—

レスポンス 202

フィールド型必須ルール
idstring (uuid)はい—

レスポンス: 202, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

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