View Alerts Query

NowSecure utilizes the Apollo Sandbox that provides an environment to perform GraphQL API queries and mutations on completed assessments, organization details, apps, and much more in NowSecure Platform to obtain detailed results.

For all API calls, replace the $API_TOKEN with your own token. Create a token by selecting the Profile icon on the top right corner of Platform > select Tokens. See Creating an API Bearer Token in NowSecure Platform for further information.

Alerts

The myAlerts query node takes two arguments: the isRead parameter allows filtering strictly for alerts that have been either read or unread (if unspecified, both read and unread alerts will be returned.) The sortDescending parameter allows for fetching alerts by most recent first, rather than the default chronological order (the order alerts were created).

To query for alerts for the authenticated user, use the myAlerts query node. For example, use this query for all unread alerts with most recent alerts sorted first.

POST
query {
  alerts {
    myAlerts(isRead: false, sortDescending: true) {
      id
      eventType
      createdAt
      readAt
    }
  }
}

Comments

0 comments

Article is closed for comments.