Updated docs for notifier/backend-pull-notifications
Linked build commit: c4a5e07344
This commit is contained in:
1 parent
8a1c62fa83
commit
54eea87ffd
2 files changed
+191
No files matched your search
@@ -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: <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": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user