diff --git a/API-backend-pull-notifications.md b/API-backend-pull-notifications.md new file mode 100644 index 0000000..971247c --- /dev/null +++ b/API-backend-pull-notifications.md @@ -0,0 +1,47 @@ +# backend-pull-notifications + +Base URL: `https://notifier.gansejunge.com/internal/backend-pull-notifications` + +### `POST /notifications/pull` + +**Pull Notifications** + +| Name | In | Type | Required | +|---|---|---|---| +| `X-User-Id` | header | integer | yes | + +**Example:** + +```bash +curl -X POST 'https://notifier.gansejunge.com/internal/backend-pull-notifications/notifications/pull' \ + -H 'X-API-Key: ' +``` + +**Responses:** + +- `200`: Successful Response + ```json + { + "messages": [ + {} + ], + "count": 0, + "has_more": true + } + ``` +- `422`: Validation Error + ```json + { + "detail": [ + { + "loc": [ + "string" + ], + "msg": "string", + "type": "string", + "input": null, + "ctx": {} + } + ] + } + ``` diff --git a/sources/backend-pull-notifications-openapi.json b/sources/backend-pull-notifications-openapi.json new file mode 100644 index 0000000..b1ecf2f --- /dev/null +++ b/sources/backend-pull-notifications-openapi.json @@ -0,0 +1,144 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "backend-pull-notifications", + "version": "0.1.0" + }, + "paths": { + "/notifications/pull": { + "post": { + "summary": "Pull Notifications", + "operationId": "pull_notifications_notifications_pull_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "X-User-Id", + "in": "header", + "required": true, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "X-User-Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PullResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "PullResponse": { + "properties": { + "messages": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array", + "title": "Messages" + }, + "count": { + "type": "integer", + "title": "Count" + }, + "has_more": { + "type": "boolean", + "title": "Has More" + } + }, + "type": "object", + "required": [ + "messages", + "count", + "has_more" + ], + "title": "PullResponse" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + }, + "input": { + "title": "Input" + }, + "ctx": { + "type": "object", + "title": "Context" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + } + }, + "securitySchemes": { + "HTTPBearer": { + "type": "http", + "scheme": "bearer" + } + } + } +} \ No newline at end of file