이벤트
커서 이후 설치의 이벤트 피드와 이벤트 유형 목록.
이 그룹의 작업과 각 작업의 액세스 규칙, 재시도 규칙, 매개 변수, 응답입니다. 모든 요청에는 키가 포함됩니다: Authorization: Bearer <키>(“인증” 참조).
작업
설치의 이벤트 읽기
GET HEAD /api/v1/events
액세스: 유효한 키 또는 세션 · 재시도: 반복해도 안전함(읽기)
커서 after 이후의 이벤트를 오래된 순으로 최대 limit개(1–500, 기본 100) CloudEvents 1.0으로 반환합니다. 호출자가 목록을 볼 수 있는(artifact.list) 모든 리포지토리의 게시, 삭제, 파일 리비전, 패키지 등록, 어노테이션, 첨부 파일, 스테이지, 승격, 이미지·npm·Git LFS 변경이 포함됩니다. after가 없으면 보관된 가장 오래된 이벤트부터 시작합니다. 이어서 읽으려면 next를 after로 전달하세요. 호출자가 볼 수 없는 이벤트도 지나가며, 요청당 최대 5000개입니다. types는 지정한 유형이나 artifact.* 같은 접두사만, repository는 리포지토리 하나만 남깁니다. oldest보다 오래된 커서는 410 events_cursor_expired, 다른 epoch(서버가 백업에서 복원됨)의 커서는 409 events_epoch_changed를 받으며, 둘 다 events에 현재 epoch, oldest, head를 담습니다. id로 중복을 제거하세요. 이벤트는 힌트이며 현재 상태는 일반 경로로 읽습니다.
매개 변수
| 이름 | 위치 | 형식 | 필수 | 규칙 |
|---|---|---|---|---|
after | 쿼리 | string | 아니요 | ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:(0|[1-9][0-9]{0,18})$ 패턴과 일치; Event id or next of a page; without it the feed starts at oldest |
limit | 쿼리 | integer | 아니요 | 1–500 |
types | 쿼리 | string | 아니요 | 2048자 이하; Comma-separated names or prefixes such as artifact.* |
repository | 쿼리 | string | 아니요 | ^[a-z0-9][a-z0-9_-]{0,63}$ 패턴과 일치 |
응답 200
| 필드 | 형식 | 필수 | 규칙 |
|---|---|---|---|
epoch | string (uuid) | 예 | — |
items | object 배열 | 예 | 요소 500개 이하 |
items[].specversion | string | 예 | 1.0 중 하나 |
items[].id | string | 예 | ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:(0|[1-9][0-9]{0,18})$ 패턴과 일치; 이벤트 ID, <epoch>:<position>. 이것으로 중복을 제거합니다 |
items[].source | string | 예 | — |
items[].type | string | 예 | — |
items[].subject | string | 예 | 아티팩트 ID, 파일 이벤트에서는 경로 |
items[].time | string (date-time) | 예 | — |
items[].datacontenttype | string | 예 | application/json 중 하나 |
items[].dataschema | string | 예 | — |
items[].partitionkey | string | 예 | repository:<repository>. 한 파티션의 이벤트는 커밋 순서를 유지합니다 |
items[].arkvoryposition | string | 예 | 10진수 숫자로 쓴 정수이며 문자열로 전송 |
items[].arkvoryepoch | string (uuid) | 예 | — |
items[].data | object | 예 | 유형의 데이터. JSON Schema는 유형 목록에 있습니다 |
next | string | 예 | ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:(0|[1-9][0-9]{0,18})$ 패턴과 일치 |
head | string | 예 | 10진수 숫자로 쓴 정수이며 문자열로 전송 |
oldest | string | 예 | 10진수 숫자로 쓴 정수이며 문자열로 전송 |
응답: 200, 400, 401, 403, 404, 409, 410, 422, 503, 507
예제
curl -X GET "$ARKVORY_URL/api/v1/events" \
-H "Authorization: Bearer $ARKVORY_TOKEN"이벤트 유형 나열
GET HEAD /api/v1/events/types
액세스: 유효한 키 또는 세션 · 재시도: 반복해도 안전함(읽기)
이 서버가 기록하는 모든 이벤트 유형을 반환합니다. 이름, schemaVersion, 범위, 읽는 쪽에 필요한 권한, 순서를 유지하는 파티션, data의 JSON Schema입니다. CloudEvents type은 arkvory.<name>.v<schemaVersion>입니다.
응답 200
| 필드 | 형식 | 필수 | 규칙 |
|---|---|---|---|
items | object 배열 | 예 | — |
items[].name | string | 예 | — |
items[].schemaVersion | integer | 예 | 1 이상 |
items[].scope | string | 예 | repository, system 중 하나 |
items[].permission | string | 예 | artifact.list, administrator 중 하나 |
items[].partition | string | 예 | — |
items[].description | string | 예 | — |
items[].dataSchema | object | 아니요 | — |
응답: 200, 400, 401, 403, 404, 409, 422, 503, 507
예제
curl -X GET "$ARKVORY_URL/api/v1/events/types" \
-H "Authorization: Bearer $ARKVORY_TOKEN"