Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Getting all Incident Threads in one call via REST? (7 Comments)

$
0
0

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. 

  1. Get incident ID for reference number
    https://{{siteURL}}/services/rest/connect/v1.3/incidents/?q=lookupName='{{exampleIncidentRefno}}'
  2. Get Incident details
    https://{{siteURL}}/services/rest/connect/v1.3/incidents/{{exampleIncidentID}}
  3. Get Threads for Incidents
    https://teamcx-uk.custhelp.com/services/rest/connect/v1.3/incidents/{{exampleIncidentID}}/{{exampleThreadID}}
  4. Now we can loop through all the threads.
  5. 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? 

Version

AUG2016

Viewing all articles
Browse latest Browse all 2504

Trending Articles