Add Scheduler Jobs to a Scheduler Job Group
Headers
Authorization: OAuth the-session-uuidBody
{
"params": {
"schedulerJobUuids": [
"ed43fba83eb63a1cacb38c113e2bd38a"
]
},
"systemTags": [],
"userTags": []
}The systemTags and userTags fields in the above example are optional. They are listed to indicate that the body can contain these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"schedulerJobUuids":["ed43fba83eb63a1cacb38c113e2bd38a"]}}' \
http://localhost:8080/zstack/v1/scheduler/jobgroups/280d3a22ab363006b61b4a6c0318056f/jobParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| schedulerJobGroupUuid | String | url | Scheduler job group UUID | 3.4.0 | |
| schedulerJobUuids | List | body (included in the params structure) | Scheduler job UUID list | 3.4.0 | |
| priorities (optional) | Map | body (included in the params structure) | Scheduler job priority | 4.3.0 | |
| systemTags (optional) | List | body | System tags | 3.4.0 | |
| userTags (optional) | List | body | User tags | 3.4.0 |
API Response
On success, this API returns an empty JSON structure {}. On failure, the returned JSON structure contains an error field, for example:
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
Java SDK
AddSchedulerJobsToSchedulerJobGroupAction action = new AddSchedulerJobsToSchedulerJobGroupAction();
action.schedulerJobGroupUuid = "280d3a22ab363006b61b4a6c0318056f";
action.schedulerJobUuids = asList("ed43fba83eb63a1cacb38c113e2bd38a");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSchedulerJobsToSchedulerJobGroupAction.Result res = action.call();Python SDK
AddSchedulerJobsToSchedulerJobGroupAction action = AddSchedulerJobsToSchedulerJobGroupAction()
action.schedulerJobGroupUuid = "280d3a22ab363006b61b4a6c0318056f"
action.schedulerJobUuids = [ed43fba83eb63a1cacb38c113e2bd38a]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddSchedulerJobsToSchedulerJobGroupAction.Result res = action.call()