Endpoint Read Ticket(s) by ID
Name
get_tickets_by_ids
Description
Get a list of all tickets in your account [API reference]
Related Tables
Tickets (Row by Row)
, Tickets (Bulk)
Parameters
| Parameter | Required | Options |
|---|---|---|
|
Name:
Label: Ticket ID(S) - Use Comma for multiple (e.g. 111,222) |
YES |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| id |
DT_I8
|
bigint
|
||
| recipient |
DT_WSTR
|
nvarchar(255)
|
255 | |
| subject |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| status |
DT_WSTR
|
nvarchar(28)
|
28 | |
| type |
DT_WSTR
|
nvarchar(255)
|
255 | |
| priority |
DT_WSTR
|
nvarchar(24)
|
24 | |
| description |
DT_NTEXT
|
nvarchar(MAX)
|
||
| external_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| created_at |
DT_DBTIMESTAMP
|
datetime
|
||
| updated_at |
DT_DBTIMESTAMP
|
datetime
|
||
| raw_subject |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| url |
DT_WSTR
|
nvarchar(500)
|
500 | |
| comment_count |
DT_I8
|
bigint
|
||
| requester_id |
DT_I8
|
bigint
|
||
| submitter_id |
DT_I8
|
bigint
|
||
| assignee_id |
DT_I8
|
bigint
|
||
| organization_id |
DT_I8
|
bigint
|
||
| group_id |
DT_I8
|
bigint
|
||
| collaborator_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| collaborator_ids_1 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| collaborator_ids_2 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| collaborator_ids_3 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| follower_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| follower_ids_1 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| follower_ids_2 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| follower_ids_3 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| email_cc_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| email_cc_ids_1 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| email_cc_ids_2 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| email_cc_ids_3 |
DT_WSTR
|
nvarchar(20)
|
20 | |
| forum_topic_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| problem_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| has_incidents |
DT_BOOL
|
bit
|
||
| is_public |
DT_BOOL
|
bit
|
||
| due_at |
DT_DBTIMESTAMP
|
datetime
|
||
| tags |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| tags_1 |
DT_WSTR
|
nvarchar(50)
|
50 | |
| tags_2 |
DT_WSTR
|
nvarchar(50)
|
50 | |
| tags_3 |
DT_WSTR
|
nvarchar(50)
|
50 | |
| tags_4 |
DT_WSTR
|
nvarchar(50)
|
50 | |
| tags_5 |
DT_WSTR
|
nvarchar(50)
|
50 | |
| custom_fields |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields_1_id |
DT_WSTR
|
nvarchar(20)
|
20 | |
| custom_fields_1_value |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields_2_id |
DT_WSTR
|
nvarchar(20)
|
20 | |
| custom_fields_2_value |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields_3_id |
DT_WSTR
|
nvarchar(20)
|
20 | |
| custom_fields_3_value |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields_4_id |
DT_WSTR
|
nvarchar(20)
|
20 | |
| custom_fields_4_value |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields_5_id |
DT_WSTR
|
nvarchar(20)
|
20 | |
| custom_fields_5_value |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| via_followup_source_id |
DT_I8
|
bigint
|
||
| satisfaction_rating_id |
DT_I8
|
bigint
|
||
| satisfaction_rating_score |
DT_WSTR
|
nvarchar(20)
|
20 | |
| satisfaction_rating_comment |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| sharing_agreement_ids |
DT_WSTR
|
nvarchar(255)
|
255 | |
| fields |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| followup_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| brand_id |
DT_I8
|
bigint
|
||
| allow_channelback |
DT_BOOL
|
bit
|
||
| allow_attachments |
DT_BOOL
|
bit
|
||
| 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_to_name |
DT_WSTR
|
nvarchar(500)
|
500 | |
| via_source_to_address |
DT_WSTR
|
nvarchar(500)
|
500 | |
| via_source_from_ticket_id |
DT_I8
|
bigint
|
||
| via_source_from_subject |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| via_source_from_channel |
DT_WSTR
|
nvarchar(50)
|
50 | |
| custom_field_[$parent.id$] |
DT_WSTR
|
nvarchar(4000)
|
4000 |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| subject |
DT_WSTR
|
nvarchar(1012)
|
1012 | |
| recipient |
DT_WSTR
|
nvarchar(255)
|
255 | |
| status |
DT_WSTR
|
nvarchar(28)
|
28 | |
| type |
DT_WSTR
|
nvarchar(255)
|
255 | |
| priority |
DT_WSTR
|
nvarchar(24)
|
24 | |
| comment_body |
DT_NTEXT
|
nvarchar(MAX)
|
||
| comment_body_html |
DT_NTEXT
|
nvarchar(MAX)
|
||
| comment_public |
DT_BOOL
|
bit
|
||
| comment_author_id |
DT_I8
|
bigint
|
||
| tags |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| custom_fields |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| external_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| requester_name |
DT_WSTR
|
nvarchar(255)
|
255 | |
| requester_email |
DT_WSTR
|
nvarchar(255)
|
255 | |
| requester_id |
DT_I8
|
bigint
|
||
| submitter_id |
DT_I8
|
bigint
|
||
| assignee_id |
DT_I8
|
bigint
|
||
| organization_id |
DT_I8
|
bigint
|
||
| group_id |
DT_I8
|
bigint
|
||
| collaborator_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| follower_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| email_cc_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| forum_topic_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| problem_id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| is_public |
DT_BOOL
|
bit
|
||
| due_at |
DT_DBTIMESTAMP
|
datetime
|
||
| sharing_agreement_ids |
DT_WSTR
|
nvarchar(255)
|
255 | |
| fields |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| followup_ids |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| brand_id |
DT_I8
|
bigint
|
||
| allow_channelback |
DT_BOOL
|
bit
|
||
| allow_attachments |
DT_BOOL
|
bit
|
||
| $$ticket_ids |
DT_WSTR
|
nvarchar(2000)
|
2000 |
Examples
SSIS
Use Zendesk Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
This Endpoint belongs to the Tickets (Row by Row) table, therefore it is better to use it, instead of accessing the endpoint directly:
| Required Parameters | |
|---|---|
| Ticket ID(S) - Use Comma for multiple (e.g. 111,222) | Fill-in the parameter... |
API Destination
This Endpoint belongs to the Tickets (Row by Row) table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to read ticket by id:
| Required Parameters | |
|---|---|
| Ticket ID(S) - Use Comma for multiple (e.g. 111,222) | Fill-in the parameter... |
ODBC application
Use these SQL queries in your ODBC application data source:
Read tickets by IDs
<p>Reads multiple tickets by specifying a list of ticket IDs. This example demonstrates how to use the <code>get_tickets_by_ids</code> endpoint with the <code>ticket_ids</code> parameter in the <code>WITH</code> clause.</p>
SELECT * from get_tickets_by_ids
WITH(ticket_ids='104861,104860')
Read a ticket by ID
<p>Reads a single ticket by its ID. This example demonstrates how to filter the <code>Tickets</code> table using the <code>WHERE</code> clause to retrieve a specific ticket.</p>
SELECT * from Tickets
WHERE ID=104861
get_tickets_by_ids endpoint belongs to
Tickets
, Tickets_Bulk
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Read tickets by IDs
<p>Reads multiple tickets by specifying a list of ticket IDs. This example demonstrates how to use the <code>get_tickets_by_ids</code> endpoint with the <code>ticket_ids</code> parameter in the <code>WITH</code> clause.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * from get_tickets_by_ids
WITH(ticket_ids=''104861,104860'')';
EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];
Read a ticket by ID
<p>Reads a single ticket by its ID. This example demonstrates how to filter the <code>Tickets</code> table using the <code>WHERE</code> clause to retrieve a specific ticket.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * from Tickets
WHERE ID=104861';
EXEC (@MyQuery) AT [LS_TO_ZENDESK_IN_GATEWAY];
get_tickets_by_ids endpoint belongs to
Tickets
, Tickets_Bulk
table(s), and can therefore be used via those table(s).