Query Scheduler Job Groups

GET/zstack/v1/scheduler/jobgroups
GET/zstack/v1/scheduler/jobgroups/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/scheduler/jobgroups?q=name=TestJobGroup&q=state=Enabled
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/scheduler/jobgroups/c5cb16296a1334d2ac3cd666e1deeca3

Queryable Fields

Run the CLI command line tool, enter QuerySchedulerJobGroup, and press Tab to view all queryable fields and the resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "03dd26d45bb43bb094f3fdec29d78829",
      "name": "test",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error3.4.0
inventoriesListFor details, see inventories3.4.0

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.10013.4.0
descriptionStringBrief description of the error3.4.0
detailsStringDetailed information about the error3.4.0
elaborationStringReserved field. Default is null3.4.0
opaqueLinkedHashMapReserved field. Default is null3.4.0
causeErrorCodeRoot error. The source error that caused the current error. This field is null if there is no source error3.4.0

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the scheduler job group. Uniquely identifies the resource3.4.0
nameStringScheduler job group name3.4.0
descriptionStringDetailed description of the scheduler job group3.4.0
stateStringState of the scheduler job group3.4.0
createDateTimestampCreation time3.4.0
lastOpDateTimestampLast modification time3.4.0
jobDataStringJob parameters3.4.0
triggersUuidListTrigger UUID3.4.0

SDK Examples

Java SDK

QuerySchedulerJobGroupAction action = new QuerySchedulerJobGroupAction();
action.conditions = asList("name=TestJobGroup","state=Enabled");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySchedulerJobGroupAction.Result res = action.call();

Python SDK

QuerySchedulerJobGroupAction action = QuerySchedulerJobGroupAction()
action.conditions = ["name=TestJobGroup","state=Enabled"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySchedulerJobGroupAction.Result res = action.call()