From b9b54f318a7f7892a9f6e2a4f4fcf2a276492b8c Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2026 22:29:07 +0100 Subject: api: allow reading past versions --- docs/openapi.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'docs/openapi.yaml') diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 0c24110..cc898e6 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -55,11 +55,16 @@ paths: - $ref: '#/components/parameters/conflicts' - $ref: '#/components/parameters/heads' - $ref: '#/components/parameters/shallow' + - $ref: '#/components/parameters/at' responses: '200': $ref: '#/components/responses/Value' + '400': + description: '`at` doesn''t name heads.' '401': $ref: '#/components/responses/Unauthorized' + '404': + description: This node lacks the heads `at` names. '500': description: Reading or serializing failed. '503': @@ -79,6 +84,7 @@ paths: - $ref: '#/components/parameters/conflicts' - $ref: '#/components/parameters/heads' - $ref: '#/components/parameters/shallow' + - $ref: '#/components/parameters/at' responses: '200': $ref: '#/components/responses/Value' @@ -87,7 +93,7 @@ paths: '401': $ref: '#/components/responses/Unauthorized' '404': - description: No value at this path. + description: No value at this path (with `at`, then), or this node lacks the heads `at` names. '500': description: Reading or serializing failed. '503': @@ -1213,6 +1219,16 @@ components: schema: type: boolean default: false + at: + name: at + in: query + description: | + Read as the document was at these heads (comma-separated hex, as + `x-continuum-heads` gives them), not as it is now; a negative index counts from + the list's end then. `404` if this node lacks one of them (not synced yet, or + of another epoch). Combines with `conflicts` and `shallow`. + schema: + type: string shallow: name: shallow in: query -- cgit v1.3.1