# quarry API
Generated from the op registry by `quarry docs` — edit the ops, not this file; regenerate with `make docs`.
Every op also appears in the OpenAPI document (`quarry spec`). Query inputs ride the query string; the same names work as JSON.
## checkin.diff
`GET /api/v1/r/{repo}/checkin/{hash}/diff` — query, anonymous
Diff one check-in against its primary parent.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `hash` | string | `required,min=4,max=64` |
Output fields:
- `from` (string)
- `to` (string)
- `files` (array of object {status: string, name: string})
- `unified` (string)
- `note` (string)
## checkin.get
`GET /api/v1/r/{repo}/checkin/{hash}` — query, anonymous
Describe one check-in: metadata, parents, and its file set.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `hash` | string | `required,min=4,max=64` |
Output fields:
- `hash` (string)
- `branch` (string)
- `date` (string)
- `user` (string)
- `comment` (string)
- `parents` (array of string)
- `files` (array of object {blob: string, name: string})
## file.get
`GET /api/v1/r/{repo}/file/{hash}/{path...}` — query, anonymous
Fetch one file's content at a check-in.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `hash` | string | `required,min=4,max=64` |
| `path` | string | `required,max=512` |
Output fields:
- `hash` (string)
- `path` (string)
- `size` (integer)
- `binary` (boolean)
- `content` (string)
- `html` (string)
## meta.docs
`GET /api/v1/docs` — query, anonymous
The API reference, generated from this registry and rendered.
Output fields:
- `markdown` (string)
- `html` (string)
## meta.version
`GET /api/v1/version` — query, anonymous
Report the quarry build version.
Output fields:
- `version` (string)
## repo.list
`GET /api/v1/repos` — query, anonymous
List the served repositories with their tip check-in.
Output fields:
- `repos` (array of object {name: string, checkins: integer, tipDate: string, tipComment: string})
- `count` (integer)
## search.query
`GET /api/v1/r/{repo}/search` — query, anonymous
Full-text search over a repository's check-ins, wiki, and tickets.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `q` | string | `required,max=200` |
| `limit` | integer | `min=0,max=200,default=50` |
Output fields:
- `results` (array of object {kind: string, ref: string, label: string, snippet: string})
- `count` (integer)
## ticket.get
`GET /api/v1/r/{repo}/ticket/{id}` — query, anonymous
Fetch one ticket: folded state plus change history.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `id` | string | `required,min=4,max=40` |
Output fields:
- `ticket` (object {id: string, created: string, updated: string, fields: array of object {name: string, value: string}, changes: array of object {hash: string, date: string, user: string, fields: array of object {name: string, value: string}}})
## ticket.list
`GET /api/v1/r/{repo}/ticket` — query, anonymous
List a repository's tickets with their folded current state.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `limit` | integer | `min=0,max=200,default=50` |
| `before` | string | `max=96` |
Output fields:
- `tickets` (array of object {id: string, title: string, status: string, updated: string})
- `count` (integer)
- `next` (string)
## timeline.list
`GET /api/v1/r/{repo}/timeline` — query, anonymous
List a repository's events — check-ins, wiki edits, ticket changes — newest first, paged by `before`.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `limit` | integer | `min=0,max=200,default=50` |
| `before` | string | `max=96` |
| `branch` | string | `max=64` |
| `y` | string | `oneof=all\|ci\|w\|t` |
Output fields:
- `entries` (array of object {kind: string, hash: string, ref: string, date: string, user: string, comment: string, branch: string, isLeaf: boolean, isMerge: boolean, parents: array of string})
- `count` (integer)
- `next` (string)
## wiki.get
`GET /api/v1/r/{repo}/wiki/{name}` — query, anonymous
Fetch one wiki page, rendered — latest, or the revision named by rev.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `name` | string | `required,max=100` |
| `rev` | string | `max=64` |
Output fields:
- `hash` (string)
- `title` (string)
- `date` (string)
- `user` (string)
- `mimetype` (string)
- `source` (string)
- `html` (string)
## wiki.history
`GET /api/v1/r/{repo}/wiki/{name}/history` — query, anonymous
List every recorded edit of one wiki page, newest first.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
| `name` | string | `required,max=100` |
Output fields:
- `title` (string)
- `edits` (array of object {hash: string, date: string, user: string})
- `count` (integer)
## wiki.list
`GET /api/v1/r/{repo}/wiki` — query, anonymous
List a repository's wiki pages with their latest edit.
Input:
| field | type | rules |
|---|---|---|
| `repo` | string | `required,max=64` |
Output fields:
- `pages` (array of object {title: string, date: string, user: string})
- `count` (integer)