Count my unread notifications
import requests
url = "https://platform.ankra.app/api/v1/org/notifications/count"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/notifications/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/notifications/count \
--header 'Authorization: Bearer <token>'{
"open": 123,
"critical": 123,
"warning": 123,
"info": 123,
"total_unread": 123,
"personal_unread": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Notifications
Count my unread notifications
Returns the token’s member’s open and unread notification counts in the organisation, split by severity and with the share addressed to them personally, for an inbox badge. A token whose scope allowlist leaves out clusters.read is refused.
GET
/
api
/
v1
/
org
/
notifications
/
count
Count my unread notifications
import requests
url = "https://platform.ankra.app/api/v1/org/notifications/count"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/notifications/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/notifications/count \
--header 'Authorization: Bearer <token>'{
"open": 123,
"critical": 123,
"warning": 123,
"info": 123,
"total_unread": 123,
"personal_unread": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Count only notifications of clusters the caller subscribes to, plus organisation-wide ones.
The organisation the caller believes it is reading; a different organisation answers 409.
The user the caller believes it is reading as; a different user answers 409.