REST API: Notifications
Generated from the daemon’s OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on API.
GET /api/notifications
Section titled “GET /api/notifications”The signed-in user’s notifications, newest first: at most 200, none older than 30 days. Live through the notifications topic, whose snapshot is the same list.
Responses
- 200:
application/json: NotificationList
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
DELETE /api/notifications
Section titled “DELETE /api/notifications”Deletes every notification of the signed-in user. Storage alerts are not notifications and stay.
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
DELETE /api/notifications/{id}
Section titled “DELETE /api/notifications/{id}”Deletes one notification of the signed-in user. Someone else’s answers 404 notifications.notification.not_found.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer (int64) | yes |
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/notifications/app
Section titled “POST /api/notifications/app”What a core app’s SDK notify call becomes: a notification for the signed-in user with the app’s plain text, stored as app.message. Only for core apps (org.pithyx.*, auth.permission.denied otherwise); third-party apps send theirs to /api/app/notifications with their token. Invalid fields answer 400 notifications.message.invalid.
Request body: application/json: AppNotificationRequest
Responses
- 201:
application/json: Notification
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/notifications/read
Section titled “POST /api/notifications/read”Marks the given notifications of the signed-in user as read, or all of them without ids. Unknown ids are ignored.
Request body: application/json: MarkNotificationsReadRequest
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.