Invoking a Job with the REST Service URL
You can invoke an import or a deployment job with or without any payload.
If you invoke the job without any payload, OneData executes all job steps in the job. If you invoke the job with payload, OneData executes only the job steps selected in the payload.
To invoke a job with a REST web service
1. In the browser, enter the RESTful web service link with a POST request.
Example: Invoke import job
http://localhost:1101/onedataVVT/rest/onedatamd/Standard%20Project/JOB/import/IM_Location_Job
Example: Invoke deployment job
http://localhost:1101/onedataVVT/rest/onedatamd/Standard%20Project/JOB/import/Exp_Deplyt_Job
The REST response you receive depends on whether you included a payload or not in your invoke request and the success of your request. If the REST request is completed successfully, then the response includes the job log ID and the success status message.
???
Example: Successful import job invocation response (with payload)
{
"jobStepList":[
"IM_JobStep_Country","IM_JobStep_State", "IM_JobStep_City"
]
}
Response: {
"jobOutput": {
"status": "200",
"jobLogId": "6160",
"statusMessage": "Job started successfully. Please view the log for the
execution results."
}
Example: Successful deployment job invocation response (with payload)
{
"jobStepList":[
"Exp_JobStep_Country","Exp_JobStep_State", "Exp_JobStep_City"
]
}
Response: {
"jobOutput": {
"status": "200",
"jobLogId": "6160",
"statusMessage": "Job started successfully. Please view the log for the
execution results."
}
}
If your job fails, the response includes the failure status message and theOneData indicates the point of error (invalid job step or invalid job).
Example: Failed import job invocation response
{
"jobOutput": {
"status": "500",
"errorDetails": {
"errorMessage": "Invalid job step name. Provide a valid name and retry."
}
}
}
Example: Failed deployment job invocation response
{
"jobOutput": {
"status": "500",
"errorDetails": {
"errorMessage": "Invalid job step name. Provide a valid name and retry."
}
}
If you invoke the job again before the previous invocation request is completed, an error message appears in the response to your additional request
Example: Duplicate job invocation error in response
{
"jobOutput": {
"status": "202",
"statusMessage": "Cannot submit your request while the job is running. Wait
until the job completes and retry."
}
}