본문으로 건너뛰기

스토리지 정책 및 보존 ​

할당량, 사용량, 보존 정책과 그 미리 보기 및 실행, 정리, 아티팩트 삭제.

이 그룹의 작업과 각 작업의 액세스 규칙, 재시도 규칙, 매개 변수, 응답입니다. 모든 요청에는 키가 포함됩니다: Authorization: Bearer <키>(“인증” 참조).

작업 ​

아티팩트를 삭제할 수 있는지 확인 ​

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

필드형식필수규칙
idstring (uuid)예—
namestring예1–240자
sizestring예10진수 숫자로 쓴 정수이며 문자열로 전송
publishedAtstring (date-time)예—
annotationRevisioninteger예0–2147483647
blockersstring 배열예요소 4개 이하; 중복 항목 없음; 각 요소: reference, asset_history, attachment_history, protected_label, promotion_stage 중 하나

응답: 200, 400, 401, 403, 404, 409, 422, 503, 507

예제

bash
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)

필드형식필수규칙
criteriaobject예—
criteria.publishedBeforestring (date-time)예^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$ 패턴과 일치
criteria.protectedLabelsstring 배열예요소 32개 이하; 중복 항목 없음; 각 요소: 1–64자
limitinteger아니요1–100
afterstring (uuid)아니요—

응답 200

필드형식필수규칙
itemsobject 배열예요소 100개 이하
items[].idstring (uuid)예—
items[].namestring예1–240자
items[].sizestring예10진수 숫자로 쓴 정수이며 문자열로 전송
items[].publishedAtstring (date-time)예—
items[].annotationRevisioninteger예0–2147483647
items[].blockersstring 배열예요소 4개 이하; 중복 항목 없음; 각 요소: reference, asset_history, attachment_history, protected_label, promotion_stage 중 하나
nextstring (uuid)예null일 수 있음

응답: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

예제

bash
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로 다시 검사하여, 대상이 되는 항목을 한 트랜잭션에서 논리적으로 삭제합니다. 각 항목의 outcome은 deleted, already_deleted, changed(어노테이션이 변경됨), not_eligible(너무 늦게 게시됨), 차단 요인을 포함한 protected, not_found 중 하나입니다. 바이트는 리포지토리의 온라인 물리적 정리가 회수할 때까지 예약된 상태로 남습니다.

매개 변수

이름위치형식필수규칙
repository경로string예^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치

요청 본문 (application/json)

필드형식필수규칙
criteriaobject예—
criteria.publishedBeforestring (date-time)예^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$ 패턴과 일치
criteria.protectedLabelsstring 배열예요소 32개 이하; 중복 항목 없음; 각 요소: 1–64자
itemsobject 배열예요소 1–100개
items[].idstring (uuid)예—
items[].expectedAnnotationRevisioninteger예0–2147483647

응답 200

필드형식필수규칙
itemsobject 배열예요소 1–100개
items[].idstring (uuid)예—
items[].outcomestring예deleted, already_deleted, protected, changed, not_eligible, not_found 중 하나
items[].blockersstring 배열예요소 4개 이하; 중복 항목 없음; 각 요소: reference, asset_history, attachment_history, protected_label, promotion_stage 중 하나

응답: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

예제

bash
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

필드형식필수규칙
revisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.groupingstring예package-channel, package, repository 중 하나
policy.keepLastinteger예1–100000
policy.channelsobject 배열예요소 32개 이하
policy.channels[].labelstring예1–64자
policy.channels[].keepLastinteger예1–100000
policy.protectedLabelsstring 배열예요소 32개 이하; 중복 항목 없음; 각 요소: 1–64자
policy.minAgeHoursinteger예0–87600
policy.intervalMinutesinteger예1–10080
policy.quotaBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송; null일 수 있음
policy.warningPercentinteger예1–98
policy.criticalPercentinteger예2–99
nextRunAtstring (date-time)예null일 수 있음
lastRunAtstring (date-time)예null일 수 있음
lastDeletedinteger예0–100
lastErrorstring예64자 이하; null일 수 있음

응답: 200, 400, 401, 403, 404, 409, 422, 503, 507

예제

bash
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)로 최근 keepLast개의 등록된 UPack 빌드를 유지하고, protectedLabels가 있는 빌드와 minAgeHours보다 새로운 빌드는 삭제하지 않으며, intervalMinutes마다 실행합니다. 또한 quotaBytes(10진 문자열, 없으면 null)와 경고 임계값으로 리포지토리를 제한합니다. expectedRevision은 현재 리비전이어야 하며 그렇지 않으면 409 revision_mismatch입니다. 활성화하려면 artifact.delete 권한도 필요하고, 일정이 호출한 관리형 키에 묶입니다. 그 키가 폐기되거나 만료되거나 이 권한을 잃으면, 정책을 다른 키로 저장할 때까지 예약된 삭제가 중지됩니다. 일반 파일은 할당량에 포함되지만 할당량 때문에 삭제되지는 않습니다.

매개 변수

이름위치형식필수규칙
repository경로string예^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치

요청 본문 (application/json)

필드형식필수규칙
expectedRevisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.groupingstring예package-channel, package, repository 중 하나
policy.keepLastinteger예1–100000
policy.channelsobject 배열예요소 32개 이하
policy.channels[].labelstring예1–64자
policy.channels[].keepLastinteger예1–100000
policy.protectedLabelsstring 배열예요소 32개 이하; 중복 항목 없음; 각 요소: 1–64자
policy.minAgeHoursinteger예0–87600
policy.intervalMinutesinteger예1–10080
policy.quotaBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송; null일 수 있음
policy.warningPercentinteger예1–98
policy.criticalPercentinteger예2–99

응답 200

필드형식필수규칙
revisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.groupingstring예package-channel, package, repository 중 하나
policy.keepLastinteger예1–100000
policy.channelsobject 배열예요소 32개 이하
policy.channels[].labelstring예1–64자
policy.channels[].keepLastinteger예1–100000
policy.protectedLabelsstring 배열예요소 32개 이하; 중복 항목 없음; 각 요소: 1–64자
policy.minAgeHoursinteger예0–87600
policy.intervalMinutesinteger예1–10080
policy.quotaBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송; null일 수 있음
policy.warningPercentinteger예1–98
policy.criticalPercentinteger예2–99
nextRunAtstring (date-time)예null일 수 있음
lastRunAtstring (date-time)예null일 수 있음
lastDeletedinteger예0–100
lastErrorstring예64자 이하; null일 수 있음

응답: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

예제

bash
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

필드형식필수규칙
publishedBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
pendingBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
retiredBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
reservedBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
quotaBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송; null일 수 있음
statestring예unlimited, normal, warning, critical, exceeded 중 하나

응답: 200, 400, 401, 403, 404, 409, 422, 503, 507

예제

bash
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

필드형식필수규칙
revisioninteger예0–2147483647
itemsobject 배열예요소 100개 이하
items[].idstring (uuid)예—
items[].namestring예240자 이하
items[].sizestring예10진수 숫자로 쓴 정수이며 문자열로 전송
items[].publishedAtstring (date-time)예—
items[].annotationRevisioninteger예0–2147483647
items[].blockersstring 배열예요소 0개 이하
hasMoreboolean예—

응답: 200, 400, 401, 403, 404, 409, 422, 503, 507

예제

bash
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 · 재시도: 자동으로 반복하지 않음

예약된 시각을 기다리지 않고 활성화된 정책의 한 배치를 즉시 실행합니다. 빌드의 순위를 다시 매기고, 권한과 의존 관계를 확인한 뒤 최대 100개를 논리적으로 삭제하며 각각의 결과를 반환합니다. expectedRevision은 현재 정책 리비전이어야 하고 정책이 활성화되어 있어야 하며, 그렇지 않으면 409입니다. 바이트는 나중에 리포지토리의 온라인 물리적 정리가 회수하며, 이 정리에는 별도의 정책(setCleanup)이 있습니다.

매개 변수

이름위치형식필수규칙
repository경로string예^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치

요청 본문 (application/json)

필드형식필수규칙
expectedRevisioninteger예0–2147483647

응답 200

필드형식필수규칙
itemsobject 배열예요소 100개 이하
items[].idstring (uuid)예—
items[].outcomestring예deleted, already_deleted, protected, changed, not_eligible, not_found 중 하나
items[].blockersstring 배열예요소 4개 이하; 각 요소: reference, asset_history, attachment_history, protected_label, promotion_stage 중 하나

응답: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

예제

bash
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 값을 넣어 이어서 조회합니다. 이벤트는 리포지토리당 최신 1,000개, 전체 20,000개까지만 보관되므로 더 오래 보관하려면 내보내야 합니다.

매개 변수

이름위치형식필수규칙
repository경로string예^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치
after쿼리string아니요10진수 숫자로 쓴 정수이며 문자열로 전송
level쿼리string아니요info, warning, error 중 하나

응답 200

필드형식필수규칙
itemsobject 배열예요소 100개 이하
items[].sequencestring예10진수 숫자로 쓴 정수이며 문자열로 전송
items[].occurredAtstring (date-time)예—
items[].levelstring예info, warning, error 중 하나
items[].codestring예96자 이하
items[].detailsstring | integer 맵예항목 16개 이하
nextstring예10진수 숫자로 쓴 정수이며 문자열로 전송; null일 수 있음

응답: 200, 400, 401, 403, 404, 409, 422, 503, 507

예제

bash
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 · 재시도: 반복해도 안전함(읽기)

리포지토리의 온라인 물리적 정리 정책(enabled, graceHours, batchSize, intervalSeconds, delayMilliseconds)을 revision과 함께 반환하며, 마지막 실행과 다음 실행, 마지막 배치에서 회수했거나 보류했거나 실패한 객체 수와 확보한 바이트도 포함합니다. 물리적 정리는 취소된 업로드와 삭제된 아티팩트를 실제로 제거하는 작업이며 기본값은 꺼짐입니다.

매개 변수

이름위치형식필수규칙
repository경로string예^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치

응답 200

필드형식필수규칙
revisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.graceHoursinteger예0–8760
policy.batchSizeinteger예1–100
policy.intervalSecondsinteger예5–86400
policy.delayMillisecondsinteger예0–1000
lastRunAtstring (date-time)예null일 수 있음
nextRunAtstring (date-time)예null일 수 있음
lastCollectedinteger예0–100
lastDeferredinteger예0–100
lastFailedinteger예0–100
lastReclaimedBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
lastErrorstring예null일 수 있음

응답: 200, 400, 401, 403, 404, 409, 422, 503, 507

예제

bash
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입니다. 변경은 객체 사이에 적용되며 객체 하나를 처리하는 도중에는 적용되지 않습니다.

매개 변수

이름위치형식필수규칙
repository경로string예^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치

요청 본문 (application/json)

필드형식필수규칙
expectedRevisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.graceHoursinteger예0–8760
policy.batchSizeinteger예1–100
policy.intervalSecondsinteger예5–86400
policy.delayMillisecondsinteger예0–1000

응답 200

필드형식필수규칙
revisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.graceHoursinteger예0–8760
policy.batchSizeinteger예1–100
policy.intervalSecondsinteger예5–86400
policy.delayMillisecondsinteger예0–1000
lastRunAtstring (date-time)예null일 수 있음
nextRunAtstring (date-time)예null일 수 있음
lastCollectedinteger예0–100
lastDeferredinteger예0–100
lastFailedinteger예0–100
lastReclaimedBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
lastErrorstring예null일 수 있음

응답: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

예제

bash
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)

필드형식필수규칙
expectedRevisioninteger예0–2147483647

응답 200

필드형식필수규칙
revisioninteger예0–2147483647
policyobject예—
policy.enabledboolean예—
policy.graceHoursinteger예0–8760
policy.batchSizeinteger예1–100
policy.intervalSecondsinteger예5–86400
policy.delayMillisecondsinteger예0–1000
lastRunAtstring (date-time)예null일 수 있음
nextRunAtstring (date-time)예null일 수 있음
lastCollectedinteger예0–100
lastDeferredinteger예0–100
lastFailedinteger예0–100
lastReclaimedBytesstring예10진수 숫자로 쓴 정수이며 문자열로 전송
lastErrorstring예null일 수 있음

응답: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

예제

bash
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}'

Arkvory · ProAnimaStudio