Events
The installation's event feed after a cursor and the list of event types.
Operations of this group with their access rule, retry rule, parameters and answers. Every request carries a key: Authorization: Bearer <key> (see Authentication).
Operations
Read the events of the installation
GET HEAD /api/v1/events
Access: Any valid key or session · Retry: Safe to repeat (read)
Returns, oldest first, up to limit events (1–500, default 100) after the cursor after, as CloudEvents 1.0: publications, deletions, file revisions, package registrations, annotations, attachments, stages, promotions, image, npm and Git LFS changes of every repository the caller may list (artifact.list). Without after the feed starts at the oldest kept event. Pass next as after to continue: it also moves past events the caller may not see, at most 5000 per request. types keeps the named types or prefixes such as artifact.*, repository one repository. A cursor older than oldest answers 410 events_cursor_expired; a cursor of another epoch (the server was restored from a backup) answers 409 events_epoch_changed; both carry the current epoch, oldest and head in events. Deduplicate by id; an event is a hint, read the current state through the ordinary routes.
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
after | query | string | no | matches ^[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 | query | integer | no | 1–500 |
types | query | string | no | up to 2048 characters; Comma-separated names or prefixes such as artifact.* |
repository | query | string | no | matches ^[a-z0-9][a-z0-9_-]{0,63}$ |
Response 200
| Field | Type | Required | Rules |
|---|---|---|---|
epoch | string (uuid) | yes | — |
items | array of object | yes | up to 500 items |
items[].specversion | string | yes | one of 1.0 |
items[].id | string | yes | matches ^[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, <epoch>:<position>; deduplicate by it |
items[].source | string | yes | — |
items[].type | string | yes | — |
items[].subject | string | yes | Artifact id, or the path of a file event |
items[].time | string (date-time) | yes | — |
items[].datacontenttype | string | yes | one of application/json |
items[].dataschema | string | yes | — |
items[].partitionkey | string | yes | repository:<repository>; events of one partition keep their commit order |
items[].arkvoryposition | string | yes | a whole number in decimal digits, sent as a string |
items[].arkvoryepoch | string (uuid) | yes | — |
items[].data | object | yes | Data of the type; its JSON Schema is in the type list |
next | string | yes | matches ^[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 | yes | a whole number in decimal digits, sent as a string |
oldest | string | yes | a whole number in decimal digits, sent as a string |
Responses: 200, 400, 401, 403, 404, 409, 410, 422, 503, 507
Example
curl -X GET "$ARKVORY_URL/api/v1/events" \
-H "Authorization: Bearer $ARKVORY_TOKEN"List the event types
GET HEAD /api/v1/events/types
Access: Any valid key or session · Retry: Safe to repeat (read)
Returns every event type this server writes: name, schemaVersion, scope, the permission a reader needs, the partition that keeps its order and the JSON Schema of data. The CloudEvents type is arkvory.<name>.v<schemaVersion>.
Response 200
| Field | Type | Required | Rules |
|---|---|---|---|
items | array of object | yes | — |
items[].name | string | yes | — |
items[].schemaVersion | integer | yes | at least 1 |
items[].scope | string | yes | one of repository, system |
items[].permission | string | yes | one of artifact.list, administrator |
items[].partition | string | yes | — |
items[].description | string | yes | — |
items[].dataSchema | object | no | — |
Responses: 200, 400, 401, 403, 404, 409, 422, 503, 507
Example
curl -X GET "$ARKVORY_URL/api/v1/events/types" \
-H "Authorization: Bearer $ARKVORY_TOKEN"