ストレージポリシーと保持
クォータ、使用量、保持ポリシーとそのプレビューおよび実行、クリーンアップ、アーティファクトの削除。
このグループの操作と、それぞれのアクセスルール、再試行ルール、パラメーター、レスポンスです。すべてのリクエストにはキーを付けます:Authorization: Bearer <key>(「認証」を参照)。
操作
アーティファクトを削除できるかの確認
GET HEAD /api/v1/repositories/{repository}/artifacts/{id}/deletion
アクセス: リポジトリ権限:artifact.delete · 再試行: 再試行しても安全(読み取り)
アーティファクトの名前、サイズ、公開時刻、現在のannotationRevision、および削除を妨げるblockersを返します。blockersは、reference(外部からの参照、またはコンテナイメージ、Git LFS、npmによる使用)、asset_history(現在または以前のファイルパスのリビジョン)、attachment_history、promotion_stageのいずれかです。何も変更されません。このリビジョンをdeleteArtifactのexpectedAnnotationRevisionとして渡してください。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
id | パス | string (uuid) | はい | — |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
id | string (uuid) | はい | — |
name | string | はい | 1~240文字 |
size | string | はい | 10進数字で表した整数(文字列として送信) |
publishedAt | string (date-time) | はい | — |
annotationRevision | integer | はい | 0~2147483647 |
blockers | stringの配列 | はい | 4個以内の要素; 要素の重複なし; 各要素:次のいずれか:reference, asset_history, attachment_history, protected_label, promotion_stage |
レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507
例
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/artifacts/$ID/deletion" \
-H "Authorization: Bearer $ARKVORY_TOKEN"保持ルールによる削除候補のプレビュー
POST /api/v1/repositories/{repository}/retention/preview
アクセス: リポジトリ権限:artifact.delete · 再試行: 再試行しても安全(読み取り)
criteria.publishedBefore(ミリ秒を含む過去のUTC時刻)より前に公開された公開済みアーティファクトをID順に列挙します。各項目にはアノテーションのリビジョンと削除を妨げるものが含まれ、protected_labelはcriteria.protectedLabels(最大32個までの明示的なリスト)のいずれかに該当することを意味します。ページにはlimit件(1〜100、既定は50)が含まれ、続きはafterにnextを設定して取得します。何も予約されません。削除する項目を選び、リビジョンとともにapplyRetentionに渡してください。そこで改めて確認されます。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
リクエスト本文 (application/json)
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
criteria | object | はい | — |
criteria.publishedBefore | string (date-time) | はい | ^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$に一致 |
criteria.protectedLabels | stringの配列 | はい | 32個以内の要素; 要素の重複なし; 各要素:1~64文字 |
limit | integer | いいえ | 1~100 |
after | string (uuid) | いいえ | — |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
items | objectの配列 | はい | 100個以内の要素 |
items[].id | string (uuid) | はい | — |
items[].name | string | はい | 1~240文字 |
items[].size | string | はい | 10進数字で表した整数(文字列として送信) |
items[].publishedAt | string (date-time) | はい | — |
items[].annotationRevision | integer | はい | 0~2147483647 |
items[].blockers | stringの配列 | はい | 4個以内の要素; 要素の重複なし; 各要素:次のいずれか:reference, asset_history, attachment_history, protected_label, promotion_stage |
next | string (uuid) | はい | nullも可 |
レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507
例
curl -X POST "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/retention/preview" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"criteria":{"publishedBefore":"2026-01-01T00:00:00.000Z","protectedLabels":[]}}'選択した削除候補の保持ルールによる削除
POST /api/v1/repositories/{repository}/retention/apply
アクセス: リポジトリ権限:artifact.delete · 再試行: 再試行しても安全:同じリクエストは同じ効果になる
previewRetentionから選んだ1〜100件のアーティファクト(idとexpectedAnnotationRevisionを持つitems)を同じcriteriaで再確認し、対象となるものを1つのトランザクションで論理削除します。各項目にはoutcomeが付き、deleted、already_deleted、changed(アノテーションが変更された)、not_eligible(基準時刻より後に公開された)、削除を妨げるものを伴うprotected、not_foundのいずれかです。バイト列は、リポジトリの物理クリーンアップが回収するまで予約されたままです。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
リクエスト本文 (application/json)
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
criteria | object | はい | — |
criteria.publishedBefore | string (date-time) | はい | ^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$に一致 |
criteria.protectedLabels | stringの配列 | はい | 32個以内の要素; 要素の重複なし; 各要素:1~64文字 |
items | objectの配列 | はい | 1~100個の要素 |
items[].id | string (uuid) | はい | — |
items[].expectedAnnotationRevision | integer | はい | 0~2147483647 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
items | objectの配列 | はい | 1~100個の要素 |
items[].id | string (uuid) | はい | — |
items[].outcome | string | はい | 次のいずれか:deleted, already_deleted, protected, changed, not_eligible, not_found |
items[].blockers | stringの配列 | はい | 4個以内の要素; 要素の重複なし; 各要素:次のいずれか:reference, asset_history, attachment_history, protected_label, promotion_stage |
レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507
例
curl -X POST "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/retention/apply" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"criteria":{"publishedBefore":"2026-01-01T00:00:00.000Z","protectedLabels":[]},"items":[{"id":"00000000-0000-4000-8000-000000000000","expectedAnnotationRevision":0}]}'ストレージポリシーの取得
GET HEAD /api/v1/repositories/{repository}/storage/policy
アクセス: リポジトリ権限:storage.read · 再試行: 再試行しても安全(読み取り)
リポジトリの自動クリーンアップとクォータの設定をrevisionとともに返します。あわせて、次回と前回のスケジュール実行、前回の実行で削除したビルド数、およびそのエラーも返します。既定ではポリシーは無効で、リポジトリのクォータもありません(サーバー全体の容量の制限は引き続き適用されます)。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
revision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.grouping | string | はい | 次のいずれか:package-channel, package, repository |
policy.keepLast | integer | はい | 1~100000 |
policy.channels | objectの配列 | はい | 32個以内の要素 |
policy.channels[].label | string | はい | 1~64文字 |
policy.channels[].keepLast | integer | はい | 1~100000 |
policy.protectedLabels | stringの配列 | はい | 32個以内の要素; 要素の重複なし; 各要素:1~64文字 |
policy.minAgeHours | integer | はい | 0~87600 |
policy.intervalMinutes | integer | はい | 1~10080 |
policy.quotaBytes | string | はい | 10進数字で表した整数(文字列として送信); nullも可 |
policy.warningPercent | integer | はい | 1~98 |
policy.criticalPercent | integer | はい | 2~99 |
nextRunAt | string (date-time) | はい | nullも可 |
lastRunAt | string (date-time) | はい | nullも可 |
lastDeleted | integer | はい | 0~100 |
lastError | string | はい | 64文字以内; nullも可 |
レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507
例
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/policy" \
-H "Authorization: Bearer $ARKVORY_TOKEN"ストレージポリシーの置換
PUT /api/v1/repositories/{repository}/storage/policy
アクセス: リポジトリ権限:storage.manage · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)
ポリシー全体を置き換えます。パッケージごと、チャンネルラベルごと(channels)、またはリポジトリごと(grouping)に登録済みのUPackビルドを直近のkeepLast件だけ保持し、protectedLabelsを持つビルドやminAgeHoursより新しいビルドは削除せず、intervalMinutesごとに実行します。また、quotaBytes(10進数の文字列、なしの場合はnull)とその警告しきい値でリポジトリを制限します。expectedRevisionは現在のリビジョンでなければならず、そうでない場合は409 revision_mismatchになります。有効にするにはartifact.deleteも必要で、スケジュールは呼び出したマネージドキーに結び付けられます。そのキーが失効するか、期限切れになるか、これらの権限を失うと、ポリシーが別のキーで保存されるまでスケジュールされた削除は停止します。通常のファイルはクォータには計上されますが、クォータによって削除されることはありません。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
リクエスト本文 (application/json)
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
expectedRevision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.grouping | string | はい | 次のいずれか:package-channel, package, repository |
policy.keepLast | integer | はい | 1~100000 |
policy.channels | objectの配列 | はい | 32個以内の要素 |
policy.channels[].label | string | はい | 1~64文字 |
policy.channels[].keepLast | integer | はい | 1~100000 |
policy.protectedLabels | stringの配列 | はい | 32個以内の要素; 要素の重複なし; 各要素:1~64文字 |
policy.minAgeHours | integer | はい | 0~87600 |
policy.intervalMinutes | integer | はい | 1~10080 |
policy.quotaBytes | string | はい | 10進数字で表した整数(文字列として送信); nullも可 |
policy.warningPercent | integer | はい | 1~98 |
policy.criticalPercent | integer | はい | 2~99 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
revision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.grouping | string | はい | 次のいずれか:package-channel, package, repository |
policy.keepLast | integer | はい | 1~100000 |
policy.channels | objectの配列 | はい | 32個以内の要素 |
policy.channels[].label | string | はい | 1~64文字 |
policy.channels[].keepLast | integer | はい | 1~100000 |
policy.protectedLabels | stringの配列 | はい | 32個以内の要素; 要素の重複なし; 各要素:1~64文字 |
policy.minAgeHours | integer | はい | 0~87600 |
policy.intervalMinutes | integer | はい | 1~10080 |
policy.quotaBytes | string | はい | 10進数字で表した整数(文字列として送信); nullも可 |
policy.warningPercent | integer | はい | 1~98 |
policy.criticalPercent | integer | はい | 2~99 |
nextRunAt | string (date-time) | はい | nullも可 |
lastRunAt | string (date-time) | はい | nullも可 |
lastDeleted | integer | はい | 0~100 |
lastError | string | はい | 64文字以内; nullも可 |
レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507
例
curl -X PUT "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/policy" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedRevision":0,"policy":{"enabled":false,"grouping":"package-channel","keepLast":1,"channels":[],"protectedLabels":[],"minAgeHours":0,"intervalMinutes":1,"quotaBytes":"1024","warningPercent":1,"criticalPercent":2}}'リポジトリのストレージ使用量の取得
GET HEAD /api/v1/repositories/{repository}/storage/usage
アクセス: リポジトリ権限:storage.read · 再試行: 再試行しても安全(読み取り)
リポジトリが予約しているバイト数を10進数の文字列で返します。内訳は、公開済み、保留中のアップロード、廃棄済み(削除またはキャンセルされ、まだ回収されていないもの)で、その合計がreservedBytesです。あわせてクォータとstate(unlimited、normal、warning、critical、exceeded)も返します。これはクォータに対して計上される論理的な予約量であり、ディスク上の使用量ではありません。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
publishedBytes | string | はい | 10進数字で表した整数(文字列として送信) |
pendingBytes | string | はい | 10進数字で表した整数(文字列として送信) |
retiredBytes | string | はい | 10進数字で表した整数(文字列として送信) |
reservedBytes | string | はい | 10進数字で表した整数(文字列として送信) |
quotaBytes | string | はい | 10進数字で表した整数(文字列として送信); nullも可 |
state | string | はい | 次のいずれか:unlimited, normal, warning, critical, exceeded |
レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507
例
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/usage" \
-H "Authorization: Bearer $ARKVORY_TOKEN"ストレージポリシーによる削除対象のプレビュー
GET HEAD /api/v1/repositories/{repository}/storage/preview
アクセス: リポジトリ権限:artifact.delete · 再試行: 再試行しても安全(読み取り)
保存済みのポリシーが現時点で削除するはずの登録済みビルドを最大100件、ポリシーのrevisionとhasMoreとともに返します(ポリシーが無効でも返します)。参照、ファイルパス、添付ファイル、保護ラベル、経過期間によって保持されるビルドは含まれません。何も予約されません。実行時にはビルドが改めてランク付けされます。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
revision | integer | はい | 0~2147483647 |
items | objectの配列 | はい | 100個以内の要素 |
items[].id | string (uuid) | はい | — |
items[].name | string | はい | 240文字以内 |
items[].size | string | はい | 10進数字で表した整数(文字列として送信) |
items[].publishedAt | string (date-time) | はい | — |
items[].annotationRevision | integer | はい | 0~2147483647 |
items[].blockers | stringの配列 | はい | 0個以内の要素 |
hasMore | boolean | はい | — |
レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507
例
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/preview" \
-H "Authorization: Bearer $ARKVORY_TOKEN"ストレージポリシーの即時実行
POST /api/v1/repositories/{repository}/storage/run
アクセス: リポジトリ権限:storage.manage, artifact.delete · 再試行: 自動的に再試行しない
有効なポリシーを、スケジュールを待たずに1バッチ分すぐに実行します。ビルドを改めてランク付けし、権限と依存関係を確認して、最大100件を論理削除し、それぞれの結果を返します。expectedRevisionは現在のポリシーのリビジョンでなければならず、ポリシーが有効である必要があります。そうでない場合は409です。バイト列は、独自のポリシー(setCleanup)を持つリポジトリの物理クリーンアップによって、後で回収されます。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
リクエスト本文 (application/json)
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
expectedRevision | integer | はい | 0~2147483647 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
items | objectの配列 | はい | 100個以内の要素 |
items[].id | string (uuid) | はい | — |
items[].outcome | string | はい | 次のいずれか:deleted, already_deleted, protected, changed, not_eligible, not_found |
items[].blockers | stringの配列 | はい | 4個以内の要素; 各要素:次のいずれか:reference, asset_history, attachment_history, protected_label, promotion_stage |
レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507
例
curl -X POST "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/run" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedRevision":0}'リポジトリのストレージイベントの一覧表示
GET HEAD /api/v1/repositories/{repository}/storage/events
アクセス: リポジトリ権限:diagnostics.read · 再試行: 再試行しても安全(読み取り)
ストレージポリシー、クォータ、保持、クリーンアップの診断イベントを、シーケンスafter(既定は0)より後から古いものの順に最大100件返します。各イベントにはレベル、コード、いくつかの詳細が含まれます。level(info、warning、error)で絞り込め、続きはafterにnextを設定して取得します。保持されるのはリポジトリごとに最新の1000件、全体で20,000件のみです。より長く保持したい場合はエクスポートしてください。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
after | クエリ | string | いいえ | 10進数字で表した整数(文字列として送信) |
level | クエリ | string | いいえ | 次のいずれか:info, warning, error |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
items | objectの配列 | はい | 100個以内の要素 |
items[].sequence | string | はい | 10進数字で表した整数(文字列として送信) |
items[].occurredAt | string (date-time) | はい | — |
items[].level | string | はい | 次のいずれか:info, warning, error |
items[].code | string | はい | 96文字以内 |
items[].details | string | integerのマップ | はい | 16個以内のエントリ |
next | string | はい | 10進数字で表した整数(文字列として送信); nullも可 |
レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507
例
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/events" \
-H "Authorization: Bearer $ARKVORY_TOKEN"物理クリーンアップ設定の取得
GET HEAD /api/v1/repositories/{repository}/storage/cleanup
アクセス: リポジトリ権限:storage.read · 再試行: 再試行しても安全(読み取り)
リポジトリの物理クリーンアップポリシーをrevision(enabled、graceHours、batchSize、intervalSeconds、delayMilliseconds)とともに返します。あわせて前回と次回の実行、直近のバッチで回収、延期、失敗したオブジェクト数、解放したバイト数も返します。物理クリーンアップは、キャンセルされたアップロードと削除されたアーティファクトを物理的に削除する処理で、既定ではオフです。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
revision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.graceHours | integer | はい | 0~8760 |
policy.batchSize | integer | はい | 1~100 |
policy.intervalSeconds | integer | はい | 5~86400 |
policy.delayMilliseconds | integer | はい | 0~1000 |
lastRunAt | string (date-time) | はい | nullも可 |
nextRunAt | string (date-time) | はい | nullも可 |
lastCollected | integer | はい | 0~100 |
lastDeferred | integer | はい | 0~100 |
lastFailed | integer | はい | 0~100 |
lastReclaimedBytes | string | はい | 10進数字で表した整数(文字列として送信) |
lastError | string | はい | nullも可 |
レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507
例
curl -X GET "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/cleanup" \
-H "Authorization: Bearer $ARKVORY_TOKEN"物理クリーンアップの設定
PUT /api/v1/repositories/{repository}/storage/cleanup
アクセス: リポジトリ権限:storage.manage · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)
サーバーの稼働中にクリーンアップポリシーを置き換えます。enabled(一時停止にも使用)、graceHours(0〜8760。削除されたコンテンツが物理的に削除されるまでの猶予期間)、batchSize(1〜100オブジェクト)、intervalSeconds(5〜86400)、delayMilliseconds(オブジェクト間で0〜1000)を指定します。expectedRevisionは現在のリビジョン(最初の変更前は0)でなければならず、そうでない場合は409 revision_mismatchになります。変更はオブジェクトの処理の合間に反映され、1つのオブジェクトの処理の途中で反映されることはありません。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
リクエスト本文 (application/json)
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
expectedRevision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.graceHours | integer | はい | 0~8760 |
policy.batchSize | integer | はい | 1~100 |
policy.intervalSeconds | integer | はい | 5~86400 |
policy.delayMilliseconds | integer | はい | 0~1000 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
revision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.graceHours | integer | はい | 0~8760 |
policy.batchSize | integer | はい | 1~100 |
policy.intervalSeconds | integer | はい | 5~86400 |
policy.delayMilliseconds | integer | はい | 0~1000 |
lastRunAt | string (date-time) | はい | nullも可 |
nextRunAt | string (date-time) | はい | nullも可 |
lastCollected | integer | はい | 0~100 |
lastDeferred | integer | はい | 0~100 |
lastFailed | integer | はい | 0~100 |
lastReclaimedBytes | string | はい | 10進数字で表した整数(文字列として送信) |
lastError | string | はい | nullも可 |
レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507
例
curl -X PUT "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/cleanup" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedRevision":0,"policy":{"enabled":false,"graceHours":0,"batchSize":1,"intervalSeconds":5,"delayMilliseconds":0}}'クリーンアップバッチの即時実行の要求
POST /api/v1/repositories/{repository}/storage/cleanup/run
アクセス: リポジトリ権限:storage.manage · 再試行: 自動的に再試行しない
有効なクリーンアップポリシーの次のバッチを、ただちに開始するようスケジュールします。応答はクリーンアップの状態で、バイトが解放されるのはバッチが実行された後だけです(getCleanupのlastRunAtを参照)。expectedRevisionは現在のリビジョンでなければならず、クリーンアップが無効な場合は409 state_conflictになります。読み取り中または書き込み中のオブジェクトは、後のバッチに持ち越されます。
パラメーター
| 名前 | 場所 | 型 | 必須 | ルール |
|---|---|---|---|---|
repository | パス | string | はい | ^[a-z0-9][a-z0-9_-]{0,63}$に一致 |
リクエスト本文 (application/json)
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
expectedRevision | integer | はい | 0~2147483647 |
レスポンス 200
| フィールド | 型 | 必須 | ルール |
|---|---|---|---|
revision | integer | はい | 0~2147483647 |
policy | object | はい | — |
policy.enabled | boolean | はい | — |
policy.graceHours | integer | はい | 0~8760 |
policy.batchSize | integer | はい | 1~100 |
policy.intervalSeconds | integer | はい | 5~86400 |
policy.delayMilliseconds | integer | はい | 0~1000 |
lastRunAt | string (date-time) | はい | nullも可 |
nextRunAt | string (date-time) | はい | nullも可 |
lastCollected | integer | はい | 0~100 |
lastDeferred | integer | はい | 0~100 |
lastFailed | integer | はい | 0~100 |
lastReclaimedBytes | string | はい | 10進数字で表した整数(文字列として送信) |
lastError | string | はい | nullも可 |
レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507
例
curl -X POST "$ARKVORY_URL/api/v1/repositories/$REPOSITORY/storage/cleanup/run" \
-H "Authorization: Bearer $ARKVORY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedRevision":0}'