Rerun Long Job

PUT/zstack/v1/longjobs/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "cleanLongJob": {},
  "systemTags": [],
  "userTags": []
}

In the above example, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"rerunLongJob":{}}' \
http://localhost:8080/zstack/v1/longjobs/6b0baa24019d331fad1548dbd3ec3eb1/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlThe UUID of the resource. Uniquely identifies the resource. 3.0.1
systemTags (Optional)ListbodySystem tags 3.0.1
userTags (Optional)ListbodyUser tags 3.0.1

API Response

Response example

{
  "inventory": {
    "uuid": "bdff1ecf1cab3029ace943626708678a"
  }
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error3.0.1
inventoryLongJobInventoryFor details, see inventory3.0.1

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001.0.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringA reserved field. Default is null.0.6
opaqueLinkedHashMapA reserved field. Default is null.0.6
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error.0.6

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource.2.2.4
nameStringResource name2.2.4
descriptionStringDetailed description of the resource2.2.4
apiIdStringThe API ID used to associate with TaskProgress2.2.4
jobNameStringJob name2.2.4
jobDataStringJob data2.2.4
jobResultStringJob result2.2.4
targetResourceUuidStringTarget resource UUID2.2.4
managementNodeUuidStringManagement node UUID2.2.4
createDateTimestampCreation time2.2.4
lastOpDateTimestampLast modification time2.2.4
stateLongJobStateFor details, see state2.2.4

state

NameTypeDescriptionStarting Version
nameStringResource name2.2.4
ordinalint 2.2.4

SDK Examples

Java SDK

RerunLongJobAction action = new RerunLongJobAction();
action.uuid = "6b0baa24019d331fad1548dbd3ec3eb1";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RerunLongJobAction.Result res = action.call();

Python SDK

RerunLongJobAction action = RerunLongJobAction()
action.uuid = "6b0baa24019d331fad1548dbd3ec3eb1"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RerunLongJobAction.Result res = action.call()