cloudbees-oss/zendesk-java-client


A Java client library for interacting with Zendesk https://developer.zendesk.com/rest_api/docs/api-clients/java#zendesk-java-client-by-cloudbees

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.cloudbees:zendesk-java-client:zendesk-java-client-0.25.0'
	}
	dependencies {
		implementation("com.github.cloudbees:zendesk-java-client:zendesk-java-client-0.25.0")
	}
	<dependency>
	    <groupId>com.github.cloudbees</groupId>
	    <artifactId>zendesk-java-client</artifactId>
	    <version>zendesk-java-client-0.25.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.cloudbees" % "zendesk-java-client" % "zendesk-java-client-0.25.0"
        
        

                            
    :dependencies [[com.github.cloudbees/zendesk-java-client "zendesk-java-client-0.25.0"]]
        
        

Readme


Zendesk Java Client

This is a Zendesk client implementation written in Java using AsyncHttpClient and Jackson.

Java CI with Maven Maven Central Coverage Lines Quality Gate Status

Using the API

Start by creating a Zendesk instance

Zendesk zd = new Zendesk.Builder("https://{{your domain}}.zendesk.com")
        .setUsername("...")
        .setToken("...") // or .setPassword("...")
        .build();

If you are behind a proxy, or want to otherwise control the lifecycle of the AsyncHttpClient instance you should pass that through to the builder too. If you don't pass an AsyncHttpClient instance to the builder it will create its own which will be closed by the Zendesk.close() method.

Where methods return paged data sets, an Iterable is returned that will lazy-fetch one page at a time until all records have been fetched, so e.g.

for (Ticket ticket: zd.getTickets()) {
    ...
}

will iterate through all tickets. Most likely you will want to implement your own cut-off process to stop iterating when you have got enough data.

Community

Status

Here is the status of the various API components:

JDK Support

The current version of this project supports Java 11 and above. It is built on Java 11 and Java 17. The release is built using Java 11.

Latest version supporting Java 8: 0.24.3 (https://github.com/cloudbees-oss/zendesk-java-client/releases/tag/zendesk-java-client-0.24.3).

History