API v2: Notification Filterยถ
Data Structuresยถ
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Unique and read-only object Identifier |
|
|
string |
yes |
Immutable. Uniqueness is required in the combination of attribute |
|
string |
yes |
Immutable. Uniqueness is required in the combination of attribute |
|
string {safe_add_server, safe_add_user, safe_blocked, safe_create, safe_remove, safe_unblocked, server_blocked, server_create, server_remove, server_unblocked, user_blocked, user_create, user_remove, user_unblocked, session_finish, session_ml, session_regexp, session_start, session_waiting, session_inject_close, session_inject_open, disk_failure, filesystem_full, access_request_pending, access_request_accepted, access_request_rejected} |
yes |
Case-insensitive. Immutable. Uniqueness is required in the combination of attribute |
|
string {mail, push, slack} |
yes |
Case-insensitive. Uniqueness is required in the combination of attribute |
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only |
Retrieve Available Attributes of the NotificationFilterModelยถ
Request
Method |
|
Path |
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Get Notifications Listยถ
Request
Method |
|
Path |
|
Example Request
GET /api/v2/notification_filter`
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/notification_filter'
Response
{
"result": "success",
"notification_filter": {
"id": "9124292845052624897",
"user_id": "9124292845052624898",
"safe_id": "9124292845052624898",
"event_name": "access_request_accepted",
"event_transport": "mail",
"created_at": "2024-06-11 22:21:15.750371-07",
"modified_at": "2024-06-11 22:21:15.750371-07"
}
}
Get Notification Filter by IDยถ
Request
Method |
|
Path |
|
Example Request
GET /api/v2/notification_filter/<id>`
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/notification_filter/9124292845052624897'
Response
{
"result": "success",
"notification_filter": {
"id": "9124292845052624897",
"user_id": "9124292845052624898",
"safe_id": "9124292845052624898",
"event_name": "access_request_accepted",
"event_transport": "mail",
"created_at": "2024-06-11 22:21:15.750371-07",
"modified_at": "2024-06-11 22:21:15.750371-07"
}
}
Create Notification Filterยถ
Request
Method |
|
Path |
|
Headers |
|
Body |
|
Example Request
POST /api/v2/notification_filter`
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
'https://10.0.214.98/api/v2/notification_filter' \
-d'{"safe_id":"9124292845052624898","user_id":"9124292845052624903","event_name":"safe_add_server","event_transport":"mail"}'
Response
{
"result": "success",
"notification_filter": {
"id": "9124292845052624914"
}
}
Deleting Notification Filterยถ
Request
Method |
|
Path |
|
Example Request
DELETE /api/v2/notification_filter/<id>`
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/notification_filter/9124292845052624897'
Response
{
"result": "success"
}