Reference

Endpoint Read Ticket Comments


Name

get_ticket_comments

Description

Returns comments for specified ticket ID. [API reference]

Parameters

Parameter Required Options
Name: ticket_id

Label: Ticket ID

YES
Name: sort_order

Label: Sort Order

Sort order
Option Value
desc desc
asc asc
Name: include_inline_images

Label: Include inline images

Default is false. When true, inline images are also listed as attachments in the response
Option Value
false false
true true

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
id DT_I8 bigint
author_id DT_I8 bigint
body DT_NTEXT nvarchar(MAX)
plain_body DT_NTEXT nvarchar(MAX)
html_body DT_NTEXT nvarchar(MAX)
created_at DT_DBTIMESTAMP datetime
attachments DT_WSTR nvarchar(4000) 4000
type DT_WSTR nvarchar(100) 100
public DT_BOOL bit
attachments_1_id DT_I8 bigint
attachments_2_id DT_I8 bigint
attachments_3_id DT_I8 bigint
attachments_4_id DT_I8 bigint
attachments_5_id DT_I8 bigint
attachments_1_file_name DT_WSTR nvarchar(255) 255
attachments_2_file_name DT_WSTR nvarchar(255) 255
attachments_3_file_name DT_WSTR nvarchar(255) 255
attachments_4_file_name DT_WSTR nvarchar(255) 255
attachments_5_file_name DT_WSTR nvarchar(255) 255
attachments_1_content_url DT_WSTR nvarchar(500) 500
attachments_2_content_url DT_WSTR nvarchar(500) 500
attachments_3_content_url DT_WSTR nvarchar(500) 500
attachments_4_content_url DT_WSTR nvarchar(500) 500
attachments_5_content_url DT_WSTR nvarchar(500) 500
via_channel DT_WSTR nvarchar(100) 100
via_source_rel DT_WSTR nvarchar(255) 255
via_source_from_address DT_WSTR nvarchar(500) 500
via_source_from_name DT_WSTR nvarchar(500) 500
via_source_from_original_recipients DT_WSTR nvarchar(2000) 2000
via_source_to_name DT_WSTR nvarchar(500) 500
via_source_to_address DT_WSTR nvarchar(500) 500
If the column you are looking for is missing, consider customizing Zendesk Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
author_id DT_I8 bigint
body DT_NTEXT nvarchar(MAX)
Required columns that you need to supply are bolded.

Examples

SSIS

Use Zendesk Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Zendesk
Zendesk Connector can be used to integrate Zendesk REST API in your App / BI Tools. You can read/write data about Tickets, Activity, Users, Organizations and more.
Zendesk
Read Ticket Comments
Required Parameters
Ticket ID Fill-in the parameter...
Optional Parameters
Sort Order
Include inline images
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Zendesk
Zendesk Connector can be used to integrate Zendesk REST API in your App / BI Tools. You can read/write data about Tickets, Activity, Users, Organizations and more.
Zendesk
Read Ticket Comments
Required Parameters
Ticket ID Fill-in the parameter...
Optional Parameters
Sort Order
Include inline images
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Read ticket comments

SELECT * FROM get_ticket_comments
WITH
(
    "ticket_id" = 'abcd-1234-ticket_id'
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Read ticket comments

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_ticket_comments
WITH
(
    "ticket_id" = ''abcd-1234-ticket_id''
)';

EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];