Zendesk API

(0 reviews)
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 NoAPI MethodREST EndpointDescriptionConsumers
1POST/{version}/attachmentsPost Attachments to backendZendesk Rest API
2POST/{version}/attachments.jsonPosts the file to the backendZendesk Rest API
3PUT/{version}/events/{ticketid}Events Ticket Id Details For Subject and NotebodyZendesk Rest API
4PUT/{version}/tickets/{ticket_id}Update ticket details for a particular ticket IDZendesk Rest API
5GET/{version}/tickets/{ticket_id}Fetches all the tickets details based on ticket IDZendesk Rest API
6GET/{version}/tickets/{ticket_id}/auditsRetrieves the audits details based on auditsZendesk Rest API
7GET/{version}/tickets/{ticket_id}/commentsThis lists comments based on ticket IDZendesk Rest API
8GET/{version}/views/{view_id}/ticketsRetrieves all the ticket details based on viewsZendesk Rest API

resources/API%20Led%20Integration%20-%20Zendesk-ea8beec9-568c-43bc-8232-2ce87321042d.PNG

Sequence Diagram and Description:

resources/Sequence%20Diagram%20for%20Zendesk-69f53f84-81f5-43d2-b148-fc5ff6859682.PNG

No.StepsDescription
1.Input Request MessageThe 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
2Validate the user CredentialsDesktop user credentials are validated by the security API mule gateway layer
3.If Validation fails, service returns specific fault responseIf Validation fails, service returns specific fault response
4.Send the request to specific Led layered apiThe Mule soft experience API secure layer validated users request query parameters will redirect to the specific system API.
5.Validate the requestThe 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 responseIf 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 UserWhen Experience API layer Fails then it returns error message to the consumers
8.Connect to the SAPMule API will invoke Zendesk system and retrieve the response and update response.
9.Zendesk connection ExceptionOn 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 systemOnce the data is retrieved successfully, the Mule API converts json to json response.
11.Return responseReturns the success response.

End Point details:

Zendesk Experience API : GET: /views/{view_id}/tickets

TopicDetails
1.Operation DescriptionRetrieve the data from Zendesk
2.URI/views/{view_id}/tickets
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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}

TopicDetails
1.Operation DescriptionRetrieve the data from Zendesk
2.URI/tickets/{ticket_id}
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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}

TopicDetails
1.Operation DescriptionUpdate ticket Id in the Zendesk
2.URI/tickets/{ticket_id}
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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}

TopicDetails
1.Operation DescriptionUpdate event details based on ticket Id in the Zendesk
2.URI/events/{ticketid}
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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

TopicDetails
1.Operation DescriptionUploads attachment files to Zendesk
2.URI/attachments
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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

TopicDetails
1.Operation DescriptionUploads attachment.json files to Zendesk
2.URI/attachments.json
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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

TopicDetails
1.Operation DescriptionFetches audit files based on ticket ID Zendesk
2.URI/tickets/{ticket_id}/audits
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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

TopicDetails
1.Operation DescriptionFetches comments details based on ticket ID Zendesk
2.URI/tickets/{ticket_id}/comments
3.Interface SourceZendesk Application
4.Interface TargetZendesk Rest API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://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 CodeError CodeError Message
40060006Message Not Processed: There is some technical error while processing the request. Please report this to the Support team.
40170401Message Not Processed: Invalid Access token. Please provide a valid access token.
40170401Message Not Processed: Missing Access token. Please provide a valid access token.
40170401Message Not Processed: Access token expired. Please try again with a valid token.
40470404Message Not Processed: Requested resource not found.
40570405Message Not Processed: Method not allowed.
40670406Message Not Processed: Not acceptable.
41370413Message Not Processed: Unsupported media type.
42970429Message Not Processed: Too many requests. The allowed quota has been exceeded.
50060015Message Not Processed. There is some technical error while processing the request. Please report this to the Support team.
50170501Message Not Processed: Not implemented.
50370503Message Not Processed: One or more back-end is down. Please try again later.

Reviews