By Rudderstack Team

How to load data from Zendesk to PostgreSQL

This post helps you with loading your data from Zendesk to PostgreSQL. If you are looking to get analytics-ready data without the manual hassle you can integrate Zendesk to PostgreSQL with RudderStack, so you can focus on what matters, getting value out of your business data.

Extract your data from Zendesk

Zendesk APIs are not specific to pulling data, Zendesk provides more than a hundred different APIs for you to integrate. So you can efficiently manage your users, enhance your team’s productivity and create seamless integrations. You can develop integrations or even enrich Zendesk with data from external sources. Zendesk API is a RESTful API that can be accessed through HTTP. You can interact with it by using tools like CURL or Postman or by using HTTP clients for your favorite language or framework.

A few suggestions:

  • Apache HttpClient for Java
  • Spray-client for Scala
  • Hyper for Rust
  • Ruby rest-client
  • Python http-client

Additionally, Zendesk offers a number of SDKs and libraries so you can access the API from your framework of choice without having to deal with the technicalities of HTTP. API clients are available for the following languages:

  • Ruby
  • Python
  • PHP
  • Java
  • .NET
  • Node.js
  • Clojure
  • Force.com
  • R

Zendesk API Authentication

Zendesk’s API is an SSL-only API, regardless of how your account is configured. You must be a verified user to make API requests. You can authorize against the API using either basic authentication with your email address and password, with your email address and an API token, or with an OAuth access token.

Zendesk rate limiting

The API is rate-limited. It only allows a certain number of requests per minute, depending on your plan and the endpoint. Zendesk reserves the right to adjust the rate limit for given endpoints to provide a high quality of service for all clients. The current limits are the following:

Pagination

By default, most list endpoints return a maximum of 100 records per page. You can change the number of records on a per-request basis by passing a per_page parameter in the request URL parameters. Example: per_page=50. However, you can’t exceed 100 records per page on most endpoints.

When the response exceeds the per-page maximum, you can paginate through the records by incrementing the page parameter. Example: page=3. List results include next_page and previous_page URLs in the response body for easier navigation:

{
"users": [ ... ],
"count": 1234,
"next_page": "https://account.zendesk.com/api/v2/users.json?page=2",
"previous_page": null
}

Endpoints and available resources

Their API exposes a large number of resources and endpoints that allow the user to interact with the platform in every possible way. Thus, it is possible to create new applications on top of the Zendesk platform, integrate external systems with it, and of course, pull data out of the platform. The most important resources are the following:

  • The tickets that your customers create through Zendesk.
  • Ticket events. Changes that have occurred to the tickets.
  • Organizations.
  • Users.
  • Ticket metrics. These are metrics related to your tickets.
  • Data related to the Net Promoter Score.
  • Articles

Let’s assume that we want to pull all the tickets we have on Zendesk to analyze them. To do that we need to perform a GET request to the appropriate end-point, like this: