Grafana Cloud Enterprise
Last reviewed: July 31, 2026

Zendesk query editor

This document explains how to use the Zendesk query editor to retrieve data from your Zendesk account.

Before you begin

Before you build a query, ensure you have:

  • Configured the Zendesk data source.
  • An API token with permission to access the resources you want to query.

Key concepts

The following terms are used throughout the query editor:

TermDescription
ActionThe Zendesk API endpoint a query calls, selected from the Action drop-down. Also called the query type.
Search query syntaxZendesk’s expression language for the Search action, using filters such as type:, status:, and created>.
Resource typeThe kind of Zendesk object a search targets, set with type:, for example type:ticket, type:user, or type:organization.

Query types

The first step when building a query is selecting the Action, also called the query type. Each action represents an API endpoint in Zendesk. After you select an action, provide the additional information the API requires. Required parameters appear next to the action selector, and any optional parameters appear in the Optional parameters section of the query editor.

The query editor supports the following query types:

  • Search: Search for tickets, users, and organizations.
  • Show tickets by IDs: Retrieve multiple ticket records by their IDs.
  • Show ticket comments: Retrieve the comments on a specific ticket.
  • Show deleted tickets: List deleted tickets that aren’t yet archived.
  • Count tickets: Return an approximate ticket count for the account.
  • Show all users: List all users registered to the Zendesk instance.
  • Show selected users: Retrieve information about specific users by their IDs.

Search lets you search for tickets, users, and organizations in your Zendesk account. Use the query parameter to specify a resource type, such as tickets or users, along with the search criteria, such as users named Jane Doe or tickets with an open status.

To see the full list of search parameters, refer to the Zendesk search reference.

Parameters

NameRequiredDescription
Search queryyesThe search expression. Defaults to type:ticket. Refer to the Zendesk search query syntax.

Examples

The following table shows example search queries:

TaskQuery
Search for a specific wordGrafana
Search for an exact string"Grafana Labs"
Search for a ticket by ID3245227
Search for a resource typetype:user "Jane Doe"
Search by ticket statustype:ticket status:open
Search by datetype:organization created<2099-05-01

Show tickets by IDs

This action retrieves multiple ticket records by providing a list of ticket IDs. It returns up to 100 ticket records in a single request.

Parameters

NameRequiredDescription
Ticket IDsyesThe list of ticket IDs to retrieve. Enter a single ID, such as 35436, or several comma-separated IDs, such as 35436,20057623.

Show ticket comments

This action retrieves the comments associated with a specific ticket.

Parameters

NameRequiredDescription
Ticket IDyesThe ID of the ticket.

Show deleted tickets

This action returns a list of all deleted tickets that aren’t yet archived.

Parameters

NameRequiredDescription
Sort bynoThe field to sort by. Allowed values are subject and deleted_at. Defaults to deleted_at.
Sort ordernoThe sort order. Allowed values are asc and desc. Defaults to asc.

Count tickets

This action returns an approximate count of tickets in the account. If the count exceeds 100,000, Zendesk updates it every 24 hours. Because it returns a numeric value, this query type works well as an alerting condition.

Show all users

This action lists all users registered to the Zendesk instance.

Parameters

NameRequiredDescription
RolenoFilters the results by role. Allowed values are end-user, agent, and admin.

Show selected users

This action shows information about multiple users by their IDs.

Parameters

NameRequiredDescription
UsersyesThe IDs of the users to look up. The editor populates this list from your Zendesk users, and you can also type the ID of any user manually.

The editor fills the Users drop-down from the results of the Show all users query, showing each user’s name while sending the user ID to the API. This pairs well with a template variable: create a user variable from Show all users, then reference it here as ${user}. Refer to Zendesk template variables.

Use cases

The following examples show common ways to use the Zendesk data source. Query examples show how to configure fields, while use cases show when each query type is useful.

Use caseQuery typeHow to configure it
Monitor open ticket volumeCount ticketsAdd the query with no parameters, then show the result in a stat panel or use it as an alert condition.
Track your open ticket backlogSearchSet Search query to type:ticket status:open.
Find tickets created in a periodSearchSet Search query to type:ticket created>2026-01-01.
Audit your agent rosterShow all usersSet Role to agent to list only agents.
Investigate a ticket conversationShow ticket commentsSet Ticket ID to the ticket you want to inspect.
Review recently deleted ticketsShow deleted ticketsSet Sort by to deleted_at and Sort order to desc.
Look up specific customersShow selected usersSelect one or more users in the Users drop-down, or drive it from a template variable.

Because the Search, Show tickets by IDs, and user query types return timestamped fields, such as created_at and updated_at, you can plot them on time series panels or use them to drive annotations.

Next steps

After you build a query, you can:

  • Visualize the results in a panel.
  • Query data interactively in Explore.
  • Set up Alerting rules on numeric queries, such as ticket counts.