diff --git a/quotesdb/api/openapi.yaml b/quotesdb/api/openapi.yaml index b4d04fa..9b28061 100644 --- a/quotesdb/api/openapi.yaml +++ b/quotesdb/api/openapi.yaml @@ -179,6 +179,17 @@ components: type: integer description: Total number of quotes matching the current filters. + # Response body for GET /api/status. + StatusResponse: + type: object + required: + - submissions_locked + properties: + submissions_locked: + type: boolean + description: Whether new quote submissions are currently disabled. + example: false + # Standard error envelope used by all error responses. Error: type: object @@ -213,6 +224,29 @@ paths: type: object description: Raw OpenAPI 3.1 document. + /api/status: + get: + operationId: getStatus + summary: API status + description: > + Returns the current operational status of the API. Callers can check + submissions_locked to determine whether the PUT /api/quotes endpoint + is accepting new submissions. + tags: [meta] + responses: + "200": + description: Current API status. + content: + application/json: + schema: + $ref: "#/components/schemas/StatusResponse" + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /api/quotes: get: operationId: listQuotes