Mark all notifications as read
POST/notifications/ actions/ read-all/
v2
POST
notifications-read-all-notifications
Mark all notifications for the authenticated user as read.
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-d '{}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/notifications/actions/read-all?severities=success&referenceId=f0f86186-0a5a-45b2-aa33-502777496347&referenceAggregate=string&referenceDomain=string
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.notification.notificationsReadAllNotifications({
"data": {},
"queryParameters": {
"severities": [
"success"
],
"referenceId": "f0f86186-0a5a-45b2-aa33-502777496347",
"referenceAggregate": "string",
"referenceDomain": "string"
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Notification\NotificationsReadAllNotifications\NotificationsReadAllNotificationsRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Notification\NotificationsReadAllNotifications\NotificationsReadAllNotificationsRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// NotificationsReadAllNotificationsRequestBody to learn how to construct a valid instance
$body = new NotificationsReadAllNotificationsRequestBody(/* TODO: ... */);
$request = (new NotificationsReadAllNotificationsRequest(
body: $body
))
->withSeverities(["success"])
->withReferenceId("f0f86186-0a5a-45b2-aa33-502777496347")
->withReferenceAggregate("string")
->withReferenceDomain("string");
$response = $client->notification()->notificationsReadAllNotifications($request);
var_dump($response->getBody();