API v2: Notification Filter¶
Data Structures¶
Attribute | Type | Required | Description |
---|---|---|---|
id | string | Unique and read-only object Identifier | |
user_id | string | yes | Immutable. Uniqueness is required in the combination of attribute user_id with attributes event_name, event_transport and safe_id . |
safe_id | string | yes | Immutable. Uniqueness is required in the combination of attribute safe_id with attributes event_name, event_transport and user_id . |
event_name | 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 event_name with attributes event_transport, safe_id and user_id . |
event_transport | string {mail, push, slack} | yes | Case-insensitive. Uniqueness is required in the combination of attribute event_transport with attributes event_name, safe_id and user_id . |
created_at | datetime | Read-only. Timestamp of creation. | |
modified_at | datetime | Read-only. Timestamp of modification. | |
removed | boolean | Read-only |
Request for Retrieving Available Attributes of the NotificationFilterModel
Method | GET
|
Path | /api/v2/objspec/notification_filter
|
Note
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
The next chapter describes procedures for creating separate requests.
Retrieving Notifications List¶
Request
Method | GET
|
Path | /api/v2/notification_filter
|
Example Request
Sending GET https://10.0.0.0/api/v2/notification_filter
curl -s -k -X GET -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' '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"
}
}
Retrieving Notification Filter by ID¶
Request
Method | GET
|
Path | /api/v2/notification_filter/<id>
|
Example Request
Sending GET https://10.0.0.0/api/v2/notification_filter/9124292845052624897
curl -s -k -X GET -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' '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"
}
}
Creating Notification Filter¶
Request
Method | POST
|
Path | /api/v2/notification_filter
|
Headers | Content-Type: Application/HTML
|
Body | NotificationFilterModel
|
Example Request
Sending POST https://10.0.0.0/api/v2/notification_filter
curl -s -k -X POST -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/notification_filter -H 'Content-Type: application/json' -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 | DELETE
|
Path | /api/v2/notification_filter/<id>
|
Example Request
Sending DELETE https://10.0.0.0/api/v2/notification_filter/9124292845052624897
curl -s -k -X DELETE -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/notification_filter/9124292845052624897
Response
{
"result": "success"
}