AddIAM2TicketFlow
API Request
URLs
POST zstack/v1/tickets/flow
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"approverUuid": "92b1b555f19531df9a94ce42c8959fa9",
"approverTitle": "SystemAdmin",
"name": "example flow",
"collectionUuid": "d72760c4e3b24c45be267f5aa0a2c5a1"
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"approverUuid":"92b1b555f19531df9a94ce42c8959fa9","approverTitle":"SystemAdmin","name":"example flow","collectionUuid":"82b6111a0d7f47bd955f385f959b1eb7"}}' http://localhost:8080/zstack/v1/tickets/flow
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
approverUuid | String | body (contained in the params structure) | 3.0.0 | ||
approverTitle | String | body (contained in the params structure) | Optional. | 3.0.0 | |
name | String | body (contained in the params structure) | Optional. The resource name. | 3.0.0 | |
description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 3.0.0 | |
collectionUuid | String | body (contained in the params structure) | 3.0.0 | ||
parentFlowUuid | String | body (contained in the params structure) | Optional. | 3.0.0 | |
resourceUuid | String | body (contained in the params structure) | Optional. | 3.0.0 | |
systemTags | List | body | Optional. | 3.0.0 | |
userTags | List | body | Optional. | 3.0.0 |
API Response
Sample
Response
{
"inventory": {
"uuid": "f9b5298fc4d2429294513ffe340215c8",
"name": "flow1",
"description": "flow description",
"parentFlowUuid": "4ca39493ec06407cb50fa92880f9bcbc",
"flowContextType": "{\"approverUuid\":\"99a8ba4f86564f0787ab2c8b11bfadb0\"}",
"createDate": "Dec 28, 2018 6:38:25 PM",
"lastOpDate": "Dec 28, 2018 6:38:25 PM",
"collectionUuid": "5d32a7a22ea645409dd7b12b5223f723"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.0.0 |
inventory | TicketFlowInventory | See inventory. | 3.0.0 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 3.0.0 |
description | String | The brief description of the error. | 3.0.0 |
details | String | The details about the error. | 3.0.0 |
elaboration | String | The reserved field. Default value: null. | 3.0.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.0.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.0.0 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.0.0 |
name | String | The resource name. | 3.0.0 |
description | String | The detailed description of the resource. | 3.0.0 |
parentFlowUuid | String | 3.0.0 | |
flowContext | String | 3.0.0 | |
flowContextType | String | 3.0.0 | |
createDate | Timestamp | The creation date. | 3.0.0 |
lastOpDate | Timestamp | The last operation date. | 3.0.0 |
collectionUuid | String | 3.0.0 |
SDK Sample
Java
SDK
AddIAM2TicketFlowAction action = new AddIAM2TicketFlowAction();
action.approverUuid = "92b1b555f19531df9a94ce42c8959fa9";
action.approverTitle = "SystemAdmin";
action.name = "example flow";
action.collectionUuid = "4913282e13a64fe29b802c78b67e2c84";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddIAM2TicketFlowAction.Result res = action.call();
Python
SDK
AddIAM2TicketFlowAction action = AddIAM2TicketFlowAction()
action.approverUuid = "92b1b555f19531df9a94ce42c8959fa9"
action.approverTitle = "SystemAdmin"
action.name = "example flow"
action.collectionUuid = "12d574495c074cf59de72c911391b8bb"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddIAM2TicketFlowAction.Result res = action.call()