Query Scheduler Job Groups
Headers
Authorization: OAuth the-session-uuidCurl 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=Enabledcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/scheduler/jobgroups/c5cb16296a1334d2ac3cd666e1deeca3Queryable 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"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 3.4.0 |
| inventories | List | For details, see inventories | 3.4.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001 | 3.4.0 |
| description | String | Brief description of the error | 3.4.0 |
| details | String | Detailed information about the error | 3.4.0 |
| elaboration | String | Reserved field. Default is null | 3.4.0 |
| opaque | LinkedHashMap | Reserved field. Default is null | 3.4.0 |
| cause | ErrorCode | Root error. The source error that caused the current error. This field is null if there is no source error | 3.4.0 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the scheduler job group. Uniquely identifies the resource | 3.4.0 |
| name | String | Scheduler job group name | 3.4.0 |
| description | String | Detailed description of the scheduler job group | 3.4.0 |
| state | String | State of the scheduler job group | 3.4.0 |
| createDate | Timestamp | Creation time | 3.4.0 |
| lastOpDate | Timestamp | Last modification time | 3.4.0 |
| jobData | String | Job parameters | 3.4.0 |
| triggersUuid | List | Trigger UUID | 3.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()