- URL:
- https://<BatchValidation-url>/scheduleNewJob
- Methods:
GET
- Required Capability:
- Data Reviewer Server
- Version Introduced:
- 10.1
Description
A REST resource that schedules a new job for execution. Execution does not start until the date and time you specify. Use a cron time and date string to indicate time of execution.
The batch
parameter contains the following name/value pairs:
-
batch
: TheJ o b File Item I d item
of an uploaded batch job file. Use the Data Reviewer map server's upload operation to upload the batch job file to the server. The upload operation returns theI d item
. See the ArcGIS REST API documentation for more information about uploading.I d -
session
: The session in which validation will occur. Use the full string format of session Id:I d Session 1 : Session 1
. -
production
: This parameter is optional. A path to a production workspace. A production workspace allows you to validate data in a different workspace than what is referenced in the batch job file (Workspace .rbj
). The workspace path can be absolute or UNC. The ArcGIS server account must have access to the folder that contains the workspace (fGdb) or the connection file that references the workspace (eGdb). Example:c:
.\\arcgisserver\\data\\arcsde_ connection_ file.sde -
production
: This parameter is optional. This parameter applies only if a production workspace is specified and it is an enterprise geodatabase. TheWorkspace Version production
parameter allows you to validate data in a particular version. If theWorkspace Version production
parameter is not specified, the version saved in the production workspace connection file is validated. Example: "Workspace Version production
" :Workspace Version "SDE.DEFAULT"
. -
analysis
: This parameter is optional. JSON polygon features that will be joined to create a processing area. Features that intersect this area will be validated by the Reviewer batch job. Features outside this area will not be validated. Example JSON structure:"Area analysis
": {"rings":[[[-97.74, 30.303],[-97.738,30.303 ], [-97.738, 30.305],[-97.74, 30.305],[-97.74, 30.303]]],"spatialReference":{"wkid": 4326}}Area -
changed
: This parameter is optional and only applies to multiversioned eGdb data. The default value is false. If true, validation is limited to features that have changed from a parent to the child version. Changes between versions include the following:Features Only - Features inserted in the child version but not the parent
- Features changed in the child version and unchanged in the parent
- Features changed in both child and parent versions
- Features changed in the child version and deleted in the parent
The schedule parameter contains the following name/value pairs:
- cronExpression : A cron string indicating time and date of execution. The time is in UTC. Cron expressions follow this format: seconds, minutes, hours, day-of-month, month, day-of-week, year. For example: a cron schedule of 0 30 10 * * ? executes the job every day at 10:30 UTC. The server will return an error if you try to schedule a job that executes more frequently than once every 15 minutes.
executions
(optional): specifies ending date, in epoch time in milliseconds, for a batch validation schedule. If both this property andE n d Date max
are set, the Batch Validation schedule will finish with whichever condition happens first. For example: "Number Of Executions executions
":"1349817000000" equates to October 9, 2012 at 21:10:00.E n d Date max
(optional): specifies the maximum number of batch validation executions that can run. If both this property andNumber Of Executions executions
are set, the Batch Validation schedule will finish with whichever condition happens first.E n d Date
Request parameters
Parameter | Details |
---|---|
| JSON object with four name/value pairs Values: {" |
| JSON object with one required name/value pair and two optional name/value pairs. Values: {" |
| The batch validation job title. This information is stored in the scheduler database with the adhoc job information. It is not stored in the Data Reviewer workspace. The getJobDetails operation returns information that includes the job title. |
| Indicates the user name that executes the adhoc job. This information is stored in the scheduler database with the adhoc job information. It is not stored in the Reviewer workspace. The getJobDetails operation returns information that includes the job created by name. |
| The response format. The default response format is Values: |
Example usage
Schedules a batch job. The request specifies a production workspace, an upload item
, a session, and an execution schedule of every day at 10:30 (0 30 10 * * ?). Submitting this request will return an scheduled job id, but actual batch validation execution may fail if you don't have this production workspace or session. To use this sample request:
- Change the production workspace (or remove it).
- Change the session id if your Data Reviewer workspace does not have a session called "
Session 1 : Session 1
." - Upload a batch job file. The upload operation returns an
item
. Change theI d batch
to your uploadedJ o b File Item I d item
.I d
https://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/BatchValidation/scheduleNewJob?batchValidationSettings={"batchJobFileItemId":"ifff042a8-cbc5-43e7-b1ad-1a4edd593c0e","sessionId":"Session 1 : Session 1","productionWorkspace":"c:\\data\\LocalGovernment.gdb"}&schedule={"cronExpression":"0 30 10 * * ?"}&batchValidationJobTitle=&batchValidationJobCreatedBy=&f=pjson
JSON Response example
{
"scheduledJobId": "f43570ee-c9db-4a6c-bcd1-54bf6f9627c7"
}