create-ticket
dci create-ticket
Creates a new support request
Request
Content-Type: application/json
Schema
{
"type": "object",
"description": "Wrapper object for creating support tickets via the external API.",
"x-cloudflow-labels": {
"ticket": "Ticket details"
},
"properties": {
"ticket": {
"type": "object",
"description": "Payload to create a support ticket via API.",
"required": [
"body",
"platform",
"product",
"severity",
"subject"
],
"properties": {
"body": {
"type": "string",
"description": "The body of the ticket (can include html formatting).",
"x-cloudflow-format": "multiReference"
},
"created": {
"type": "string",
"description": "Ticket creation time."
},
"platform": {
"type": "string",
"description": "Platform of the ticket.",
"enum": [
"doit",
"google_cloud_platform",
"amazon_web_services",
"microsoft_azure"
]
},
"product": {
"type": "string",
"description": "Ticket product details."
},
"requester": {
"type": "string",
"format": "email",
"description": "Human contact email used as the Zendesk ticket requester. Required\nwhen the caller is a service account. User callers must omit this\nfield; their verified email remains the requester."
},
"severity": {
"type": "string",
"description": "Ticket severity.",
"enum": [
"low",
"normal",
"high",
"urgent"
],
"x-cloudflow-format": "noReference"
},
"subject": {
"type": "string",
"description": "The subject of the ticket."
}
}
}
},
"required": [
"ticket"
]
}
Output
Created - New support request created.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
created | integer (int64) | Ticket creation time. |
id | integer (int64) | Ticket ID. |
platform | string | Ticket platform. One of: "doit", "google_cloud_platform", "amazon_web_services", "microsoft_azure". |
product | string | Ticket product. |
requester | string | Email address of the requester. |
severity | string | Severity of the ticket. One of: "low", "normal", "high", "urgent". |
status | string | Ticket status. |
subject | string | Ticket subject. |
urlUI | string | URL to access the ticket in DoiT console. |
Raw JSON schema
{
"type": "object",
"description": "Response returned after creating a ticket.",
"properties": {
"created": {
"type": "integer",
"description": "Ticket creation time.",
"format": "int64"
},
"id": {
"type": "integer",
"description": "Ticket ID.",
"format": "int64"
},
"platform": {
"type": "string",
"description": "Ticket platform.",
"enum": [
"doit",
"google_cloud_platform",
"amazon_web_services",
"microsoft_azure"
]
},
"product": {
"type": "string",
"description": "Ticket product."
},
"requester": {
"type": "string",
"description": "Email address of the requester."
},
"severity": {
"type": "string",
"description": "Severity of the ticket.",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"status": {
"type": "string",
"description": "Ticket status."
},
"subject": {
"type": "string",
"description": "Ticket subject."
},
"urlUI": {
"type": "string",
"description": "URL to access the ticket in DoiT console."
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
Aliases: id-of-tickets-post