The ArcGIS Monitor API provides access to collection, alert, and availability data in JSON format. It allows you to extract specific data for use in external applications and reports. The overview steps to access data in the ArcGIS Monitor API are as follows and are described in full in the sections below:
Generate a token
You need to generate a token to access the ArcGIS Monitor API.
- Follow the steps in Access the ArcGIS Monitor Server application.
- Click API on the main menu.
The ArcGIS Monitor API page appears.
- Update the credentials in the Post Body text box to match your ArcGIS Monitor Server application credentials.
- Click Query Token.
The token is generated and appears in the Response text box.
Obtain a collectionId
You need to obtain a collectionId before you can access data for a specific collection.
- Follow the steps in Access the ArcGIS Monitor Server application.
- Click the Collections tab on the ArcGIS Monitor API page.
The Url text box is automatically populated with the ArcGIS Monitor API URL and token.
- Click Query Collection.
Collection information appears in the Response text box.
- Locate the collection you want to query in the Response text box and copy the collectionId to access alert and availability information.
Access alert data
Complete these steps to access alert information for all collections or specific collections using the collectionId:
- Click the Alerts tab on the ArcGIS Monitor API page.
- Use the following sample queries to update the query in the Post Body text box:
Remarque :
The startTime and endTime parameters are in epoch milliseconds format.
All collections:
{ "where": { "startTime": startTime, "endTime": endTime } }
Single collection:
{ "where": { "collectionId": ["d359fb23-0299-4e8a-863f-a7d467e54f50"], "startTime": startTime, "endTime": endTime } }
Multiple collections:
{ "where": { "collectionId": ["d359fb23-0299-4e8a-863f-a7d467e54f50","5bc9b869-78f9-476f-96bc-7d45fa63cc10"], "startTime": startTime, "endTime": endTime } }
- Click Query Alerts.
Alert information appears in the Response text box.
Access availability data
Complete these steps to access availability information for all collections or specific collections using the collectionId:
- Click the Availability tab on the ArcGIS Monitor API page.
- Use the following sample queries to update the query in the Post Body text box:
Remarque :
The startTime and endTime parameters are in epoch milliseconds format.
All collections:
{ "where": { "startTime": startTime, "endTime": endTime } }
Single collection:
{ "where": { "collectionId": ["d359fb23-0299-4e8a-863f-a7d467e54f50"], "startTime": startTime, "endTime": endTime } }
Multiple collections:
{ "where": { "collectionId": ["d359fb23-0299-4e8a-863f-a7d467e54f50","5bc9b869-78f9-476f-96bc-7d45fa63cc10"], "startTime": startTime, "endTime": endTime } }
- Click Query Alerts.
Availability information appears in the Response text box.
Vous avez un commentaire à formuler concernant cette rubrique ?