Issue on SNOW Integration to Azure Devops

aj2403
Tera Expert

Hi All,

 

Can anyone help me on the below issue. 

1. There is a integration between SNOW and Azure using Rest API.

2. They provided the endpoint and connected using OATH 2.0 credentials.

3. I used Rest message GET method to get the Response in JSON format.

4. Right now i am facing an issue while i am trying to retrieve the entire payload. there are 10k records to retrieve, but i can able to get 1000 records only[all time when i test or call the API].

5. Checked the properties, found few links related on pagination, but no luck.

6. This is for response not for request.

 

I am facing the same issue as per below link.

 

https://www.servicenow.com/community/developer-forum/get-next-page-in-json-with-rest-message/m-p/246...

Kindly help me on this if anyone faces the issue.

 

Thanks,

 

 

3 REPLIES 3

Josh Gold
Tera Expert

It sounds like it might be an issue with the number of requests you're sending. Have you tried testing it out with a smaller number of records? The REST API you're interacting with might be implementing pagination to manage such a large response. Here's a thread that might help.

 

Otherwise you could try this:

  1. Review Response Headers/Links

    • Link Header: Look for relations like next, prev, first, and last. These links contain URLs to fetch the next or previous set of results. If you see that, then it's a pagination issue.
  2. Query Parameters

    • limit and offset: Try increasing the limit value (if allowed) and using the offset to iterate through the results.
    • page and pageSize: I don't know if the API uses these parameters or not, but check if there's a page and pageSize parameter. That sets the number of records per page.
  3. Recursive Retrieval

    • If the API does provide a next link or similar mechanism, you'll need to implement a recursive function or loop to keep fetching pages until you've retrieved all 10,000 records.

If all else fails, you could try a no-code 3rd party solution instead. Unito's integration for Azure DevOps and ServiceNow removes all this troubleshooting + maintenance for you and it's secure.

 

jaswalvishal106
Tera Expert

hi @aj2403  Can you share the code and sample json payload.

Mathieu Lepoutr
Mega Guru

Dear @aj2403 

 

If you’re encountering limitations with REST API pagination and managing large payloads in your ServiceNow to Azure DevOps integration, you might consider using Exalate. It can handle such integrations more efficiently by automating data synchronization with built-in support for complex data mapping and pagination handling.

 

This might save you from the headaches of manual API management while ensuring all records sync seamlessly.

 

Thank you.

Kind regards,
Mathieu Lepoutre