Change a prompt of one's own, or share it, or take its share back
Changes the caller's own prompt. revision is required (the one the last read gave) and at least one other member must follow: a member given replaces the whole member (variables is the whole list, audience the whole set). The checks run in this order: 401, 403 no_access, 415, the shape (400 bad_request), 404 (the prompt is not the caller's: another person's, shared with them, or not there), 403 forbidden (the resulting audience is not empty and the caller lacks prompts.share: a person who lost it can still send audience: [], and nothing that leaves a share in place), 409 stale_revision (the prompt changed since the revision), then the values of the whole prompt as it would be (the codes of createPrompt), and last 409 name_taken. A request that changes nothing writes nothing and keeps the revision. A write is one statement.
Authorizations
A JWT signed by the configured issuer (RS256, RS384, ES256 or EdDSA), with the configured audience. Read when auth.mode is jwt or jwt_or_proxy_header. A missing or refused token gets 401 with WWW-Authenticate: Bearer; an issuer whose keys cannot be fetched gets 503.
A JWT as bearerToken, bound to the key of the client (cnf.jkt, RFC 7638), sent as Authorization: DPoP <token> with one DPoP header holding a proof signed by that key (RFC 9449, ADR 0054). Read only when auth.dpop is configured. A bad proof gets 401 with WWW-Authenticate: DPoP error="invalid_dpop_proof", algs="ES256 EdDSA", a bad or unbound token error="invalid_token".
Set by oauth2-proxy after OIDC login; requests without it get 401. Read when auth.mode is proxy_header (the default) or jwt_or_proxy_header without a bearer token.
Request Body
Responses
The prompt as it is now