Topic by Michel Jilderda
Content
Hi all,
we are building a separate webpage where we want to show incident details on an external webpage. While we have built this before using SOAP, we are using the REST API now. One of the things we run into is this:
With a SOAP request, it was possible to get all incident threads in 1 soap call.
With the REST API there does not seem to be a way to do this in 1 call. So what we need to do to show the threads is a lot of calls to the API, which causes delay in loading the page.
These are the calls we do now. We have the incident reference number to start with, so this is the sequence of calls to the REST API.
- Get incident ID for reference number
https://{{siteURL}}/services/rest/connect/v1.3/incidents/?q=lookupName='{{exampleIncidentRefno}}' - Get Incident details
https://{{siteURL}}/services/rest/connect/v1.3/incidents/{{exampleIncidentID}} - Get Threads for Incidents
https://teamcx-uk.custhelp.com/services/rest/connect/v1.3/incidents/{{exampleIncidentID}}/{{exampleThreadID}} - Now we can loop through all the threads.
- Now, to populate the threads with the correct account names, we also need to get all the account names for the threads again.
Again, for SOAP this was a lot easier. Are we missing something? Is there a way to pull this from REST as well without doing 10+calls to get all incident details?