- URL:
- https://<root>/<serviceName>/TopographicProductionServer/jobs/query
- Methods:
GET
- Required Capability:
- Requires an ArcGIS GIS Server Advanced license and a Production Mapping or Defense Mapping server extension license
- Version Introduced:
- 10.9
Description
The query
operation retrieves the status of jobs executed by the generate
REST operation and returns the status, start date, last modified date, and messages for a set of jobs.
Request parameters
Parameter | Details |
---|---|
(Optional) | Retrieves all the jobs with a particular status if the status parameter and value is specified and appended to the URL, for example, https://< mapservice-url >/TopographicProductionServer/jobs/query?status=5. The
|
(Optional) | Retrieves all the jobs that started on or after the start date and time if the start date and time is specified. The date and time should be UTC and in ISO 8601 format. It is added to the URL using the following format: YYYY-MM-DDThh:mm:ssZ. If time is not specified, then midnight is used in the following format: 00:00:00. |
(Optional) | Retrieves all the jobs that ended on or before the end date and time if the end date and time is specified. The date and time should be UTC and in ISO 8601 format. It is added to the URL using the following format: YYYY-MM-DDThh:mm:ssZ. If time is not specified, then 23:59:59 is used. |
(Optional) |
The message level associated with the job. The values are the following:
When constructing a query URL, the |
JSON Response syntax
The following is the syntax of a response:
{
"count": <the number of jobs that have been returned in the response>
"jobs": [
{
"status": <untranslated string representing general status of the job>,
"statusCode": <code representing specific status of the job>,
"submissionTime": <time and date in UTC and ISO 8601 format of the job submission YYYY-MM-DDThh:mm:ssZ>,
"lastUpdatedTime": <time and date in UTC and ISO 8601 format of the last job update YYYY-MM-DDThh:mm:ssZ>,
"percentComplete": <percent of the job completed>,
"aoiLayer": <URL of AOI layer>,
"aoiFeatureId": <AOI feature ID>,
"outputUrl": <URL of output>,
"user": <username>,
"jobId": <job identifier>,
"productName": <name of the product>,
"productVersion": <version of the product>,
"outputType": <type/format of the output>,
"messages": {
<informative | error | warning>
}
},
...]
}
Example usage
Query the jobs
REST resource to review jobs by start date and message level using the start
and msg
parameters.
Request URL and parameters:
https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/jobs
f=json
startDate=09-21-2020
msgLevel=info
JSON Response example
The following is an example of a response:
{
"count": 3
"jobs": [
{
"status": "InProgress",
"statusCode": 3,
"submissionTime": "2020-09-21T15:48:22Z",
"lastUpdatedTime": "2020-09-21T15:48:22Z",
"percentComplete": 0.052631578947368418,
"aoiLayer": "https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/5",
"aoiFeatureId": 120733
"outputUrl":
"user": "user1",
"jobId": "5F9E1EE1-CB27-48E6-8B11-FEF9B9B281CA",
"productName": "MTM50",
"productVersion": "Test",
"outputType": "PDF",
"messages": {
"informative": [
"Submitted.",
"Executing..."
"Start Time: Monday, September 21, 2020 03:48:22 PM",
"Starting to generate product MTM50.",
"Start Time: Monday, September 21, 2020 03:48:22 PM",
"Executing Import Template and Extract Features",
"Start Time: Monday, September 21, 2020 03:48:22 PM"
]
}
},
{
"status": "Failed",
"statusCode": 5,
"submissionTime": "2020-09-21T15:49:14Z",
"lastUpdatedTime": "2020-09-21T15:49:14Z",
"aoiLayer": "https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/5",
"aoiFeatureId": 120733
"outputUrl":
"user": "user2",
"jobId": "38913E2C-B655-4085-B59F-4A5B0D20224E",
"productName": "MTM50",
"productVersion": "Test",
"outputType": "PDF",
"messages": {
"informative": [
"Submitted.",
"Executing..."
],
"errors": [
"ERROR 000824: The tool is not licensed.",
"Failed."
]
}
},
{
"status": "Pending",
"statusCode": 2,
"submissionTime": "2020-09-21T16:17:19Z",
"lastUpdatedTime": "2020-09-21T16:17:19Z",
"percentComplete": 0,
"aoiLayer": "https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/5",
"aoiFeatureId": 120733
"outputUrl":
"user": "user3",
"jobId": "91CAF47B-A26F-4F43-ABC7-78DDC3EDBF7A",
"productName": "MTM50",
"productVersion": "Test",
"outputType": "PDF",
"messages": {
}
}
]
}
Example usage
Query the jobs
REST resource to review jobs by start date with a failed status using the start
and status
parameters.
Request URL and parameters:
https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/jobs
f=json
startDate=09-21-2020
status=5
JSON Response example
The following is an example of a response:
{
"count": 3
"jobs": [
{
"status": "Failed",
"statusCode": 5,
"submissionTime": "2020-09-21T16:29:32Z",
"lastUpdatedTime": "2020-09-21T16:29:32Z",
"aoiLayer": "https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/5",
"aoiFeatureId": 120733
"outputUrl":
"user": "user1",
"jobId": "7187043F-C096-4610-9DA9-15469A71DA79",
"productName": "MTM50",
"productVersion": "Test",
"outputType": "PDF",
"messages": {
"errors": [
"ERROR 000824: The tool is not licensed.",
"Failed."
]
}
},
{
"status": "Failed",
"statusCode": 5,
"submissionTime": "2020-09-21T16:29:39Z",
"lastUpdatedTime": "2020-09-21T16:29:39Z",
"aoiLayer": "https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/5",
"aoiFeatureId": 120733
"outputUrl":
"user": "user2",
"jobId": "4F7D692F-5BD4-4276-9B6B-88818F8B5B39",
"productName": "MTM50",
"productVersion": "Test",
"outputType": "PDF",
"messages": {
"errors": [
"ERROR 000824: The tool is not licensed.",
"Failed."
]
}
},
{
"status": "Failed",
"statusCode": 5,
"submissionTime": "2020-09-21T16:29:44Z",
"lastUpdatedTime": "2020-09-21T16:29:44Z",
"aoiLayer": "https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/5",
"aoiFeatureId": 120733
"outputUrl":
"user": "user3",
"jobId": "36A6CA20-9095-42FF-A4C7-FE3C6AEE8988",
"productName": "MTM50",
"productVersion": "Test",
"outputType": "PDF",
"messages": {
"errors": [
"ERROR 000824: The tool is not licensed.",
"Failed."
]
}
}
]
}