Use this object to manage jobs running on the 'WS_API' for one or more VDC.
|
Method |
Description |
|
Retrieve list of jobs |
|
|
Retrieve information for a job |
Retrieve list of jobs
/api/v2/job/list?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Retrieve list of jobs
GET http://192.168.123.200/api/v2/job/list?vdc=mygrid
<jobs> <job>0fee1fe8-795d-4e2b-bdf8-501891d65263</job> <job>15f58426-a625-459a-9bbf-042996464d65</job> <job>1a7f7c3c-3d90-4946-9257-3a9960c356b6</job> . . . <job>f6612181-1fb2-4e12-9b83-6517c28ceb8f</job> <job>ff45c672-7fbb-4a79-a237-3d95b41e84d8</job> </jobs>
{
"jobs" : [
{
"job" : "0fee1fe8-795d-4e2b-bdf8-501891d65263"
},
.
.
.
{
"job" : "f6612181-1fb2-4e12-9b83-6517c28ceb8f"
},
{
"job" : "ff45c672-7fbb-4a79-a237-3d95b41e84d8"
}
]
}
Retrieve information for a job
/api/v2/job/info?job=job-id&console=console&vdc=controller-name
Job ID
The values specify additional output included in the response:
Console=0 gives no additional information. Default: 0
console=1 gives stdout
console=2 gives stderr
console=3 gives stdout and stderr
When set to 1, the job is not deleted from the list of completed jobs. By default, when a job/info query is executed against a completed job, it is removed from the job list.
Default: 0
Name of the target virtual data center
synchronous
GET
Retrieve information for job=c4830d52-b523-4a3f-933a-34c9c5a4766a
GET http://192.168.123.200/api/v2/job/info?job=c4830d52-b523-4a3f-933a-34c9c5a4766a&vdc=mygrid
<opt> <completed>1</completed> <status>0</status> <time_completed>1271810563</time_completed> <time_started>1271810562</time_started> </opt>
{
"status" : "0\n",
"time_started" : "1271810371",
"time_completed" : "1271810372",
"completed" : 1
}
Entity job c4830d52-b523-4a3f-933a-34c9c5a4766a not found - ID for the job specified is invalid or job is complete.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|