Zendesk API
This API is used to perform operations on ZENDESK based on the method you have chosen.
home
Overview:
• Zendesk is a ticketing tool using which we can get ticket details.
• Zendesk system integration has view_id/tickets, ticket_Id, ticket_id/audits, ticket_id/comments, attachments.json and update ticket_Id.
• Mulesoft will connect to Zendesk API’s and expose the JSON payloads through a single Interface.
Sr No | API Method | REST Endpoint | Description | Consumers |
---|---|---|---|---|
1 | POST | /{version}/attachments | Post Attachments to backend | Zendesk Rest API |
2 | POST | /{version}/attachments.json | Posts the file to the backend | Zendesk Rest API |
3 | PUT | /{version}/events/{ticketid} | Events Ticket Id Details For Subject and Notebody | Zendesk Rest API |
4 | PUT | /{version}/tickets/{ticket_id} | Update ticket details for a particular ticket ID | Zendesk Rest API |
5 | GET | /{version}/tickets/{ticket_id} | Fetches all the tickets details based on ticket ID | Zendesk Rest API |
6 | GET | /{version}/tickets/{ticket_id}/audits | Retrieves the audits details based on audits | Zendesk Rest API |
7 | GET | /{version}/tickets/{ticket_id}/comments | This lists comments based on ticket ID | Zendesk Rest API |
8 | GET | /{version}/views/{view_id}/tickets | Retrieves all the ticket details based on views | Zendesk Rest API |
Sequence Diagram and Description:
No. | Steps | Description |
---|---|---|
1. | Input Request Message | The ca-zendesk-xapi invokes the mule services along with credentials (client id and client secret) and X-TRANSACTION-ID(A code to track API calls end to end) via Mule Soft Secure API layer with the proper query params |
2 | Validate the user Credentials | Desktop user credentials are validated by the security API mule gateway layer |
3. | If Validation fails, service returns specific fault response | If Validation fails, service returns specific fault response |
4. | Send the request to specific Led layered api | The Mule soft experience API secure layer validated users request query parameters will redirect to the specific system API. |
5. | Validate the request | The request is validated in the Mule System service API and if passed only then it is processed further to ca-zendesk-papi |
6. | If Validation fails, service returns specific fault response | If the request gets failed during the validation the exception is thrown by the Process API to the Experience API secure layer. |
7. | Fault message redirection by the User | When Experience API layer Fails then it returns error message to the consumers |
8. | Connect to the SAP | Mule API will invoke Zendesk system and retrieve the response and update response. |
9. | Zendesk connection Exception | On Zendesk connection failure, return error message. If there is any connection failure during the step 5, the sap Exception is thrown by the service. |
10. | On successful, retrieve the view_id/tickets, ticket_id from Zendesk system and update the ticket_id to Zendesk system | Once the data is retrieved successfully, the Mule API converts json to json response. |
11. | Return response | Returns the success response. |
End Point details:
Zendesk Experience API : GET: /views/{view_id}/tickets
Topic | Details | |
---|---|---|
1. | Operation Description | Retrieve the data from Zendesk |
2. | URI | /views/{view_id}/tickets |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-qa1/v1/views/53144706/tickets?sortBy=nice_id&sortOrder=asc |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : GET: /tickets/{ticket_id}
Topic | Details | |
---|---|---|
1. | Operation Description | Retrieve the data from Zendesk |
2. | URI | /tickets/{ticket_id} |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-qa1/v1/tickets/4831 |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : PUT: /tickets/{ticket_id}
Topic | Details | |
---|---|---|
1. | Operation Description | Update ticket Id in the Zendesk |
2. | URI | /tickets/{ticket_id} |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-qa1/v1/tickets/4831 |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : PUT: /events/{ticketid}
Topic | Details | |
---|---|---|
1. | Operation Description | Update event details based on ticket Id in the Zendesk |
2. | URI | /events/{ticketid} |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-qa1/v1/events/4831 |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : POST /attachments
Topic | Details | |
---|---|---|
1. | Operation Description | Uploads attachment files to Zendesk |
2. | URI | /attachments |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-xapi-qa1/api/v2/attachments |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : POST /attachments.json
Topic | Details | |
---|---|---|
1. | Operation Description | Uploads attachment.json files to Zendesk |
2. | URI | /attachments.json |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-xapi-qa1/api/v2/attachments.json?filename=try_1.json |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : GET /tickets/{ticket_id}/audits
Topic | Details | |
---|---|---|
1. | Operation Description | Fetches audit files based on ticket ID Zendesk |
2. | URI | /tickets/{ticket_id}/audits |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-xapi-qa1/api/v2/tickets/47/audits?limit=1&offset=1&instance=esolhelpdesk |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Zendesk Experience API : GET /tickets/{ticket_id}/comments
Topic | Details | |
---|---|---|
1. | Operation Description | Fetches comments details based on ticket ID Zendesk |
2. | URI | /tickets/{ticket_id}/comments |
3. | Interface Source | Zendesk Application |
4. | Interface Target | Zendesk Rest API |
5. | Synchronous/Asynchronous | Synchronous |
6. | Protocol | HTTPs |
7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-zendesk-xapi-qa1/api/v2/tickets/47/comments?limit=1&offset=1&instance=esolhelpdesk |
8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time |
9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |
Exception Handling:
- Custom Error handler is used to handle API Kit errors as well as user defined errors.
- HTTP endpoints have been configured with reconnection strategies with maximum of 2 retry attempts.
Error Codes
HTTP Code | Error Code | Error Message |
---|---|---|
400 | 60006 | Message Not Processed: There is some technical error while processing the request. Please report this to the Support team. |
401 | 70401 | Message Not Processed: Invalid Access token. Please provide a valid access token. |
401 | 70401 | Message Not Processed: Missing Access token. Please provide a valid access token. |
401 | 70401 | Message Not Processed: Access token expired. Please try again with a valid token. |
404 | 70404 | Message Not Processed: Requested resource not found. |
405 | 70405 | Message Not Processed: Method not allowed. |
406 | 70406 | Message Not Processed: Not acceptable. |
413 | 70413 | Message Not Processed: Unsupported media type. |
429 | 70429 | Message Not Processed: Too many requests. The allowed quota has been exceeded. |
500 | 60015 | Message Not Processed. There is some technical error while processing the request. Please report this to the Support team. |
501 | 70501 | Message Not Processed: Not implemented. |
503 | 70503 | Message Not Processed: One or more back-end is down. Please try again later. |