Query Scheduler Job History

GET/zstack/v1/scheduler/job/history

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/job/history?q=schedulerJobGroupUuid=7ae6456c0b01324dae6d4bef358a5772

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "id": 1.0,
      "triggerUuid": "add8c5eea85f41999baff295e47567bc",
      "schedulerJobUuid": "d7696913343040d8b98de04d59727711",
      "startTime": "Nov 14, 2017 10:20:57 PM",
      "executeTime": 900.0,
      "targetResourceUuid": "7cd923fa779044fd8510e8ee97aa579e",
      "requestDump": "{\"bsUuid\":\"716078c20a0047a69102174c6097a690\"}",
      "resultDump": "{\"apiId\":\"f8cf5b6281164e519c0575a73b1b0d9c\",\"success\":true,\"headers\":{},\"id\":\"d70a61ab1b20407c8df94ba7d90be081\",\"createdTime\":1557305707668}",
      "success": true
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error3.5.0
inventoriesListFor details, see inventories3.5.0

error

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

inventories

NameTypeDescriptionStarting Version
idlong 3.5.0
triggerUuidStringTrigger UUID3.5.0
schedulerJobUuidStringScheduler job UUID3.5.0
schedulerJobGroupUuidStringScheduler job group UUID3.5.0
startTimeTimestampStart time3.5.0
executeTimelongExecution duration3.5.0
targetResourceUuidStringTarget resource UUID3.5.0
requestDumpStringJob request3.5.0
resultDumpStringJob result3.5.0
successboolean 3.5.0

SDK Examples

Java SDK

QuerySchedulerJobHistoryAction action = new QuerySchedulerJobHistoryAction();
action.conditions = asList("schedulerJobGroupUuid=7ae6456c0b01324dae6d4bef358a5772");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySchedulerJobHistoryAction.Result res = action.call();

Python SDK

QuerySchedulerJobHistoryAction action = QuerySchedulerJobHistoryAction()
action.conditions = ["schedulerJobGroupUuid=7ae6456c0b01324dae6d4bef358a5772"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySchedulerJobHistoryAction.Result res = action.call()