Skip to main content

list-ticket-comments

dci list-ticket-comments ticketId

Returns all comments on a support request. For customers, only public comments are returned. For DoiT employees, both public and private comments are returned. All comments are returned in a single response (no pagination).

Output

OK - List of comments returned.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
commentsarray of object
comments[].idinteger (int64)Comment ID.
comments[].bodystringThe text content of the comment.
comments[].authorstringStable comment-author attribution. User callers are represented by their verified email address; service-account callers use sa:<serviceAccountId>.
comments[].createdinteger (int64)The time when this comment was created, in milliseconds since the epoch.
comments[].attachmentsarray of objectFile attachments on the comment.
comments[].attachments[].idinteger (int64)
comments[].attachments[].file_namestring
comments[].attachments[].content_urlstring
Raw JSON schema
{
"type": "object",
"description": "Response containing all comments on a support ticket.",
"properties": {
"comments": {
"type": "array",
"items": {
"type": "object",
"description": "A comment on a support ticket.",
"properties": {
"id": {
"type": "integer",
"description": "Comment ID.",
"format": "int64"
},
"body": {
"type": "string",
"description": "The text content of the comment."
},
"author": {
"type": "string",
"description": "Stable comment-author attribution. User callers are represented by\ntheir verified email address; service-account callers use\n`sa:<serviceAccountId>`."
},
"created": {
"type": "integer",
"description": "The time when this comment was created, in milliseconds since the epoch.",
"format": "int64"
},
"attachments": {
"type": "array",
"description": "File attachments on the comment.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"file_name": {
"type": "string"
},
"content_url": {
"type": "string"
}
}
}
}
}
}
}
}
}

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
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.
502, 50340API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: id-of-ticket-comments-list