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:

FieldDefault ValueDescription
isDescendingOrder={true/false}trueList preference indicating whether descending order is required.
sortName={sortName}idUnique ID allotted to a view when an alert view is created.
viewTypeallSupported values:
  • All: Provides private and shared alert views of a client.
  • Private: Provides alerts that are private to the logged-in user.
  • Shared: Provides alerts that are shared across the client.
defaultViewtrueDisplays 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
  }
]