This is a part of Zendesk Coding Challenge. Here we are integrating with the Zendesk APIs to get the tickets for an user (not the customer). Functionality:
- Retrieve all the tickets for the logged-in user.
- Retrieve the ticket based on the ticket number provided
This project is in java. To setup the environment for the project, please follow the following steps:
The installation steps on macOS are as follows:
To install java:
brew install openjdk@8This project can be built and run using apache maven. To set up apache maven:
1. Download Apache maven 3.8.4 zip from https://maven.apache.org/download.cgi and unzip
2. Type the following command change the owner of the folder:
chown -R root:wheel apache-maven*
3. To make mvn command globally accessible, please add it to the environment path variable by adding the following command to the environment file:
export PATH=$PATH:/opt/apache-maven-3.8.4/bin##Run the Application
To install the dependencies:
mvn clean installTo run the application:
mvn spring-boot:run The application is an interactive command line session. Please read the instructions in the terminal carefully and choose accordingly
As mentioned above, Zendesk API is used to retrieve the tickets which follows and username and password based authentication. Hence, we need account ID and password of the user whose tickets are to be retrieved. Please enter valid account ID and password when prompted. You can update them anytime throughout the session.
Please use the following command to run the testcases:
mvn verifyTo view the test coverage of the application, open the following file in the browser:
target/site/jacoco/index.html- The application is using pagination and at a time 25 pages will be returned with an option to move forward and backward in the pages.
- The tickets of the user whose account ID and password are retrieved.
- The subdomain used is : https://zccphoenix.zendesk.com. If you want to change the subdomain, please update zcc.url in application.properties file.
- If the credentials are not correct: Invalid credentials(account id and password), please verify and try again
- If the API is not available: Zendesk API not available
- If the API threw an unrecognized interna error : Internal Server Error
- Bad Gateway : Bad Gateway
- Time out: Time out while connecting to Zendesk API
- No tickets found for the user : No Tickets found!
