Add Scheduler Job Group to Scheduler Trigger

POST/zstack/v1/scheduler/jobgroups/{schedulerJobGroupUuid}/scheduler/triggers/{schedulerTriggerUuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "triggerNow": false
  },
  "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":{"triggerNow":false}}' http://localhost:8080/zstack/v1/scheduler/jobgroups/997c126bb3db39f6bbda1ffe90008f51/scheduler/triggers/78341d4e8f683a3291527f4944fa6831

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
schedulerJobGroupUuidStringurlScheduler job group UUID 3.4.0
schedulerTriggerUuidStringurlTrigger UUID 3.4.0
triggerNow (Optional)booleanbody (Contained in the params structure)Whether to trigger immediately 3.4.0
systemTags (Optional)ListbodySystem tag list 3.4.0
userTags (Optional)ListbodyUser tag list 3.4.0

API Response

Response Example

{
  "inventory": {
    "schedulerJobGroupUuid": "ec8d2952f8f13747bbbf24f93585a63d",
    "schedulerTriggerUuid": "4b5bc56b58623324afe0a57951a96064"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. For details, seeerror3.4.0
inventorySchedulerJobGroupSchedulerTriggerRefInventoryFor details, seeinventory3.4.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10013.4.0
descriptionStringA brief description of the error3.4.0
detailsStringThe detailed error information3.4.0
elaborationStringReserved field. Default is null3.4.0
opaqueLinkedHashMapReserved field. Default is null3.4.0
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error3.4.0

inventory

NameTypeDescriptionStarting Version
schedulerJobGroupUuidStringScheduler job group UUID3.4.0
schedulerTriggerUuidStringTrigger UUID3.4.0
createDateTimestampCreation time3.4.0
lastOpDateTimestampLast modification time3.4.0

SDK Examples

Java SDK

AddSchedulerJobGroupToSchedulerTriggerAction action = new AddSchedulerJobGroupToSchedulerTriggerAction();
action.schedulerJobGroupUuid = "997c126bb3db39f6bbda1ffe90008f51";
action.schedulerTriggerUuid = "78341d4e8f683a3291527f4944fa6831";
action.triggerNow = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSchedulerJobGroupToSchedulerTriggerAction.Result res = action.call();

Python SDK

AddSchedulerJobGroupToSchedulerTriggerAction action = AddSchedulerJobGroupToSchedulerTriggerAction()
action.schedulerJobGroupUuid = "997c126bb3db39f6bbda1ffe90008f51"
action.schedulerTriggerUuid = "78341d4e8f683a3291527f4944fa6831"
action.triggerNow = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddSchedulerJobGroupToSchedulerTriggerAction.Result res = action.call()