diff options
| author | tv <tv@krebsco.de> | 2026-11-16 22:25:47 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 23:32:53 +0100 |
| commit | 18387cb68094b167a30371b62beda93627c2c467 (patch) | |
| tree | 9320bcdf1b44ca513f0eedb41f55d1b201db83d5 /docs/openapi.yaml | |
| parent | c77f4a88dfd0f4ed423951da6535244aea4a0fa1 (diff) | |
api: a vote by hand, through the node that votes for its party
A party that has a node vote by itself votes by hand only through that node, which
keeps its one record (`docs/federation.md`, Votes a node casts by itself):
`POST /admin/events/vote`, `{"proposal": <hash>, "yes": <bool>}`, by the record and, with
a `true`, by the voters' rule; signed with the party's key the node keeps, recorded, and
put. Refused (`422`) where the record or the rule forbids it, or the node votes for no
party. Putting an event through the API puts it into the document as the node's own
votes are put (`held::write`).
Diffstat (limited to 'docs/openapi.yaml')
| -rw-r--r-- | docs/openapi.yaml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 1bb69e3..c99cb65 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1649,6 +1649,46 @@ paths: $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' + /admin/events/vote: + post: + tags: [Events] + summary: Vote by hand, through the node that votes for its party + description: | + A vote by hand through this node, which votes for its party by itself + (`--store-vote-key`) and keeps its party's one record of its votes: `yes` on the + proposal of hash `proposal` on the current version, by that record (one `true` at + a time, never `true` and `false` on one proposal, a `true` only for a version) and, + with a `true` on a version naming a checkpoint, by the voters' rule (it changes + nothing else, and its heads leave out nothing the node held for a while before it + was proposed). Signed with the party's key the node keeps, recorded, and put. + Needs `write` on `_continuum`. + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [proposal, yes] + properties: + proposal: + type: string + yes: + type: boolean + responses: + '200': + description: Cast; `id` is the vote's. + content: + application/json: + schema: + type: object + required: [id] + properties: + id: + type: string + '400': + $ref: '#/components/responses/Error' + '422': + $ref: '#/components/responses/Error' /admin/remakes: get: tags: [Remakes] |
