メインコンテンツへスキップ

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.

FieldTypeDescription
createdinteger (int64)Ticket creation time.
idinteger (int64)Ticket ID.
platformstringTicket platform. One of: "doit", "google_cloud_platform", "amazon_web_services", "microsoft_azure".
productstringTicket product.
requesterstringEmail address of the requester.
severitystringSeverity of the ticket. One of: "low", "normal", "high", "urgent".
statusstringTicket status.
subjectstringTicket subject.
urlUIstringURL 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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.

Aliases: id-of-tickets-post