FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<task-url>/jobs/<job-id> |
---|---|
Supported Operations | Cancel Job |
Parent Resource | Task |
Child Resources | Result Input |
The GP job resource represents a job submitted using the submit job operation. It provides basic information about the job such as the job ID, status and messages. Additionally, if the job has successfully completed, it provides information about the result parameters as well as input parameters.
All result values can be accessed via the GP result resource. The JSON response specifies a relative URL to the
result resource with a paramUrl
field. Similarly, all input parameter values are accessed via the GP input resource. The JSON response specifies a relative URL to the input resource with a paramUrl
field as well.
You can specify whether you want the messages to be returned or not by using returnMessages
.
The Job resource newly supports a Cancel job operation. This operation can be used to cancel a job before it is completed.
Parameter | Details |
---|---|
f | Description: The
response format. The default response format is html. Values: html | json | kmz |
returnMessages | Description: If true,
the job messages are included in the response. The default is true. Values: true | false |
Example 1: When you submit a job to the ERGByChemical task as shown in the Submit Job doc's Examples section and output format is html(f=html), you'll be redirected to the Job resource page whose URL will be similar to:
http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/PublicSafety/EMModels/GPServer/ERGByChemical/jobs/jf082fc6d926043fda44169444963fe46
Note that jf082fc6d926043fda44169444963fe46
is an example Job ID and the Job ID when you submit the job might vary.
{
"jobId" : "<jobId>",
"jobStatus" : "<jobStatus>",
"results" : {
"<param1>" : {"paramUrl" : "<relativeUrlToParam1>"},
"<param2>" : {"paramUrl" : "<relativeUrlToParam2>"}
},
"inputs" : {
"<param1>" : {"paramUrl" : "<relativeUrlToParam1>"},
"<param2>" : {"paramUrl" : "<relativeUrlToParam2>"}
},
"messages" : [
{"type" : "<type1>", "description" : "<description1>"},
{"type" : "<type2>", "description" : "<description2>"}
]
}
{
"jobId" : "JE30155054C2C416EA3CF6C88A40B94FF",
"jobStatus" : "esriJobSucceeded",
"results" : {
"Output_Long" : {"paramUrl" : "results/Output_Long"},
"Output_Feature_Class" : {"paramUrl" : "results/Output_Feature_Class"}
},
"inputs" : {
"Input_String" : {"paramUrl" : "inputs/Input_String"},
"Input_Feature_Class" : {"paramUrl" : "inputs/Input_Feature_Class"}
},
"messages" : [
{"type" : "esriJobMessageTypeInformative", "description" : "Executing (TestTask)"},
{"type" : "esriJobMessageTypeInformative", "description" : "Start Time: Thu Jul 05 16:36:25 2007"},
{"type" : "esriJobMessageTypeInformative", "description" : "Executing Copy Features..."},
{"type" : "esriJobMessageTypeInformative", "description" : "Start Time: Thu Jul 05 16:36:25 2007"},
{"type" : "esriJobMessageTypeInformative", "description" : "Executed (Copy Features) successfully."},
{"type" : "esriJobMessageTypeInformative", "description" : "End Time: Thu Jul 05 16:36:26 2007 (Elapsed Time: 1.00 seconds)"},
{"type" : "esriJobMessageTypeInformative", "description" : "Executed (TestTask) successfully."},
{"type" : "esriJobMessageTypeInformative", "description" : "End Time: Thu Jul 05 16:36:26 2007 (Elapsed Time: 1.00 seconds)"}
]
}