URL
GET https://{api-url}/api/v2/tenants/{orgId}/users/{userId}/alertViews
URL example
https://{api-url}/api/v2/tenants/msp_5/users/USR0000001876/alertViews
Parameters
All of the following parameters are optional:
Field | Default Value | Description |
---|---|---|
isDescendingOrder={true/false} | true | List preference indicating whether descending order is required. |
sortName={sortName} | id | Unique ID allotted to a view when an alert view is created. |
viewType | all | Supported values:
|
defaultView | true | Displays the default alert view. |
Status code
200 OK
Sample 1: request and response
Sample 1 request URL
To request alert view with descending order, sort name ID, and view type as shared:
https://{api-url}/api/v2/tenants/client_93/users/USR0000002115/alertViews?isDescendingOrder=true&sortName=id&viewType=Shared
Sample 1 response
[
{
"id" : 35,
"name" : "Warning and critical alerts",
"description" : "Testing 3",
"viewType": "Shared",
"defaultView": true
}
]
Sample 2: request and response
Sample 2 request URL
To request alert views with descending order, sort name, and default view as true:
https://{api-url}/api/v2/tenants/client_93/users/USR0000002115/alertViews?isDescendingOrder=true&sortName=id&defaultView=true
Sample 2 response
[
{
"id" : 33,
"name" : "Last One Day Alerts",
"description" : "Testing 1",
"viewType": "Private",
"defaultView": true
},
{
"id" : 34,
"name" : "Ticketed Alerts",
"description" : "Testing 2",
"viewType": "Private",
"defaultView": true
},
{
"id" : 35,
"name" : "Warning and critical alerts",
"description" : "Testing 3",
"viewType": "Shared",
"defaultView": true
}
]