import requests
url = "https://platform.ankra.app/api/v1/org/notifications"
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', 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 \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"severity": "critical",
"title": "<string>",
"state": "open",
"created_at": "2023-11-07T05:31:56Z",
"audience": "organisation",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"body": "<string>",
"dedupe_key": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"route_hint": {},
"data": {},
"recurrence_count": 123,
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"dismissed_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"center_view": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List my notifications
Lists the notification inbox the token’s member sees in the organisation: organisation-wide notifications and the ones addressed to them personally, with their own read and dismissed state. A token whose scope allowlist leaves out clusters.read is refused.
import requests
url = "https://platform.ankra.app/api/v1/org/notifications"
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', 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 \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"severity": "critical",
"title": "<string>",
"state": "open",
"created_at": "2023-11-07T05:31:56Z",
"audience": "organisation",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"body": "<string>",
"dedupe_key": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"route_hint": {},
"data": {},
"recurrence_count": 123,
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"dismissed_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"center_view": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Only organisation-wide notifications, or only the ones addressed to the caller.
organisation, user Only notifications in these states (repeat the parameter for several).
open, acknowledged, auto_resolved, dismissed Only notifications of these kinds (repeat the parameter for several).
Only notifications of these severities (repeat the parameter for several).
critical, warning, info Only notifications the caller has not read.
Only notifications of clusters the caller subscribes to, plus organisation-wide ones.
Free-text search over the title and body.
200Only notifications seen at or after this time.
The page to return.
x >= 1Notifications per page.
1 <= x <= 100A notification centre view instead of the plain list.
inbox, needs_you, history Cursor: only notifications before this time (with before_id).
Cursor: the notification id the before time belongs to.
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.