- URL:
- https://<root>/services/<folderName>/<ServiceName>.<ServiceType>/jobs/query
- Methods:
GET- Version Introduced:
- 10.9.1
Access requirements
Required privileges
The Enterprise Administrator API requires privilege-based access. An administrator must be assigned a specific user privilege, or role, to access any given endpoint. Listed below are the user privileges or roles an administrator can be assigned that provides access to this endpoint. If multiple privileges are listed, only one needs to be assigned to gain access.
Tokens
This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Enterprise Administrator API directory's HTML interface. Tokens generated in this way are stored for the entirety of the session.
Those accessing the API directory outside of the HTML interface will need to acquire a session token from the generate operation in the Enterprise Directory API. For security reasons, all POST requests made to the Enterprise Administrator API must include a token in the request body.
Description
The query operation allows you to query jobs pertaining to a geoprocessing service, using a combination of the following parameters:
Request parameters
| Parameter | Details |
|---|---|
(Optional) | The earliest time to query, formatted as either a timestamp ( Examples |
(Optional) | The most recent time to query, formatted as either a timestamp ( Examples |
(Optional) | The current status of a job. The value set with this parameter will be used to filter the jobs by that set job status. Values: |
(Optional) | The name of the user who submitted the job. Example |
(Optional) | The number of jobs to display in the response. The default value is 10. Example |
| The response format. The default format is Values: |
Response properties
| Property | Details |
|---|---|
| The total number of jobs found by the query. |
| The parameter specified by your query, including the |
| The number of jobs returned on each result page. |
| The order number of the job with which the response begins. |
| The order number of the job that will be the first response on the next results page if the query returns more responses than the value specified for the number parameter. This property is intended to be used as the |
| The jobs found by the query matching your specifications. This returns the |
Example usage
The following is a sample request URL for the query operation:
https://organization.example.com/<context>/admin/services/System/PublishingTools.GPServer/jobs/query?startTime=&endTime=&jobStatus=esriJobSucceeded&userName=&number=10&f=pjsonJSON Response example
{
"total": 41,
"query": {
"serviceName": "PublishingTools",
"userName": "",
"status": ["esriJobSucceeded"]
},
"num": 10,
"start": 1,
"nextStart": 11,
"results": {
"j0550714f334d4114af9f7a5d05cb145e": "Succeeded",
"j6123787782ba45f7a65d215630fe931b": "Succeeded",
"j9bbbb5e272e946fdaf844e86cc6d513a": "Succeeded",
"j4f0095e5b9a145aeb3783050d2b04fe0": "Succeeded",
"j73318a2d534c4241b53559068ababdba": "Succeeded",
"j52db3d9281f84038aafed219ef8a94ca": "Succeeded",
"j42e60c06389b4b7295ea21490e92bc74": "Succeeded",
"j8c18f527a1d34b40b0e8fa7cb271e176": "Succeeded",
"j8420a05a6faf4bce971b6f621f69881c": "Succeeded",
"j5c501b3c20fb49f585dfe1b3a29ce641": "Succeeded"
}
}