Add documentation for `/api/v1/notifications/requests/merged` (#1516)

* Add documentation for `/api/v1/notifications/requests/merged`

* Apply review suggestions

Co-authored-by: David Roetzel <david@roetzel.de>

---------

Co-authored-by: David Roetzel <david@roetzel.de>
This commit is contained in:
Claire 2024-08-23 10:36:44 +02:00 committed by GitHub
parent d94ac10884
commit a98ee3515a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 45 additions and 0 deletions

View File

@ -939,6 +939,51 @@ Invalid or missing Authorization header.
---
## Check if accepted notification requests have been merged {#requests-merged}
```http
GET /api/v1/notifications/requests/merged
```
Check whether accepted notification requests have been merged.
Accepting notification requests schedules a background job to merge the filtered notifications back into the normal notification list. When that process has finished, the client should refresh the notifications list at its earliest convenience. This is communicated by the `notifications_merged` streaming event but can also be polled using this endpoint.
***Returns:** Hash with a single boolean attribute `merged`\
**OAuth:** User token + `read:notifications`\
**Version history:**\
4.3.0 - added
#### Request
##### Headers
Authorization
: {{<required>}} Provide this header with `Bearer <user token>` to gain authorized access to this API method.
#### Response
##### 200: OK
A successful call returns whether the notifications have been merged and are ready for being loaded.
```json
{
"merged": false
}
```
##### 401: Unauthorized
Invalid or missing Authorization header.
```json
{
"error": "The access token is invalid"
}
```
---
## See also
{{< page-relref ref="methods/push" caption="push API methods" >}}