AddTicketTypesToTicketFlowCollection
API Request
URLs
POST zstack/v1/tickets/flow-collections/{ticketFlowCollectionUuid}/ticket-types
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": {
"ticketTypeUuids": [
"3b933e9aaf2d49b9a3dcf0c92867790f",
"ef064ef45fb446d381db7b7d5f71695c"
]
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"ticketTypeUuids":["3b933e9aaf2d49b9a3dcf0c92867790f","ef064ef45fb446d381db7b7d5f71695c"]}}' http://localhost:8080/zstack/v1/tickets/flow-collections/4f4bf50d510f4bf1959d8c5baa218cc4/ticket-types
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
ticketFlowCollectionUuid | String | url | The ticket process UUID. | 3.6.0 | |
ticketTypeUuids | List | body (contained in the params structure) | The ticket type UUIDs. | 3.6.0 | |
systemTags | List | body | Optional. The system tags. | 3.6.0 | |
userTags | List | body | Optional. The user tags. | 3.6.0 |
API Response
When the API succeeded, an empty JSON structure {} is returned. When the API
failed, the returned JSON structure includes an error field. For
example,
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
SDK Sample
Java
SDK
AddTicketTypesToTicketFlowCollectionAction action = new AddTicketTypesToTicketFlowCollectionAction();
action.ticketFlowCollectionUuid = "d8aa14d3ea224e36bd071b2355c94882";
action.ticketTypeUuids = asList("3b933e9aaf2d49b9a3dcf0c92867790f","ef064ef45fb446d381db7b7d5f71695c");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddTicketTypesToTicketFlowCollectionAction.Result res = action.call();
Python
SDK
AddTicketTypesToTicketFlowCollectionAction action = AddTicketTypesToTicketFlowCollectionAction()
action.ticketFlowCollectionUuid = "5682400944cd4ca0acb82ff8d67462a6"
action.ticketTypeUuids = [3b933e9aaf2d49b9a3dcf0c92867790f, ef064ef45fb446d381db7b7d5f71695c]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddTicketTypesToTicketFlowCollectionAction.Result res = action.call()