Select to view content in your preferred language

ArcGIS Monitor API inquiry

652
1
09-29-2021 07:17 PM
klandicho
Emerging Contributor

Hi,

One of our clients' IT group is looking to integrate the ArcGIS Monitor API with their IT monitoring tool. 

The following are their inquiries on the ArcGIS Monitor API:

  • Is it possible to Generate a non-expiring token in ArcGIS Monitor? If not, is it possible to use Username and Password to query the APIs instead of Tokens?
  • Instead of filtering the Alerts by startTime and endTime, can we use filters such as "alertCategory" and "isOpen". They plan to query only Open alerts with severity level of CRITCAL and SEVERE.

Highly appreciated if anyone can share any similar experience. 

 

Thanks,

Karen

0 Kudos
1 Reply
LongDinh
Frequent Contributor

Hi Karen,

Is it possible to Generate a non-expiring token in ArcGIS Monitor? If not, is it possible to use Username and Password to query the APIs instead of Tokens?

Generated a non-expiring token is less secure as it may be intercepted by a malicious user. Instead, you should regenerate your token. To get your token, you can send a POST request to the https://<ArcGISMonitorServerHostName>/rest/api/auth/token with the POST Body example in at /api e.g:

 

{ "username" : "Site", "password" : "ArcGISMonitor" }

 

 Instead of filtering the Alerts by startTime and endTime, can we use filters such as "alertCategory" and "isOpen". They plan to query only Open alerts with severity level of CRITCAL and SEVERE.

I believe the API philosophy is that you get your Alerts filtered by Time and/or CollectionId. This might be to limit the number of alerts returned. If you were looking to filter by alertCategory, you would have to post process the JSON response from the API. The Monitor site already has an Alerts page with the filters for you. It looks something like this:

LongDinh_0-1632976649664.png

Hope this helps