QueryTicketType

API Request

URLs
GET zstack/v1/ticket-types
GET zstack/v1/ticket-types/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/ticket-types?q=uuid=8cab296e0d8e3c86aef43d7e76c874c6
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/ticket-types/e3e9345750b93455ad7336be8bd60420

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryTicketType, and pressing the Tab key.

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "3b933e9aaf2d49b9a3dcf0c92867790f",
      "name": "CREATE_VM_INSTANCE_TICKET_TYPE",
      "adminOnly": false,
      "createDate": "Jul 18, 2019 4:09:46 PM",
      "lastOpDate": "Jul 18, 2019 4:09:46 PM"
    }
  ]
}
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.6.0
inventories List See inventories. 3.6.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.6.0
description String The brief description of the error. 3.6.0
details String The details about the error. 3.6.0
elaboration String The reserved field. Default value: null. 3.6.0
opaque LinkedHashMap The reserved field. Default value: null. 3.6.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.6.0
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 3.6.0
name String The resource name. 3.6.0
description String The detailed description of the resource. 3.6.0
type String 3.6.0
requests String 3.6.0
createDate Timestamp The creation date. 3.6.0
lastOpDate Timestamp The last operation date. 3.6.0

SDK Sample

Java SDK
QueryTicketTypeAction action = new QueryTicketTypeAction();
action.conditions = asList("uuid=bbeba1e02a88309192252bbfe409df4f");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryTicketTypeAction.Result res = action.call();
Python SDK
QueryTicketTypeAction action = QueryTicketTypeAction()
action.conditions = ["uuid=60ebfd64ef4238f9bbdd77c3c0569d64"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryTicketTypeAction.Result res = action.call()