01-24-2023 10:04 AM
hi there,
I need to call Coupa API to do a GET but their API only lets me get 50 records at a time, but they have over 7000 records that I need to pull.
how can I increament my url
https://instance.coupahost.com/api/invoices?offset=50&exported=false https://instance.coupahost.com/api/invoices?offset=100&exported=false https://instance.coupahost.com/api/invoices?offset=150&exported=false
.
.
.
I see there are options for these but dont know how to leverage them. any guidance?
Thanks
Manohar
Solved! Go to Solution.
01-24-2023 08:32 PM
hasNext: eval(sl.ensureArray($.get(‘entity’,)).length > 0)
nextUrl: lib.conf.getAppConf(‘coupa’).basepath.concat(“supplier_information?offset=”,(snap.out.totalCount + 1) * 50, “&exported=false”)
02-09-2023 10:35 PM
Good to know, glad to be of help 😀
10-02-2023 11:14 AM - edited 10-02-2023 11:19 AM
I am having the same challenge as the original poster. However, when adding Has Next and Next URL. I get this error. Is there an additional step that I need to do like import an expression library? I am also using
https://instance.coupahost.com/api/invoices?offset=50&exported=false
10-02-2023 06:34 PM
hasNext: eval(sl.ensureArray($.get('entity',)).length > 0)
nextUrl: 'https://instance.coupahost.com/'.concat('supplier_information?offset=', (snap.out.totalCount + 1) * 50, '&exported=false')
Try enclosing the string with a single-quote or double-quotes
Since you don't have the expression file, it basically just getting the Coupa API base path
10-04-2023 11:48 PM
thank you. Is there any documentation on this expression file? Tried those hasNext and nextUrl and still failing.
10-12-2023 01:50 AM
Hi @rpc1235x ,
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438110/Expression+Libraries
You can create your own expression library according to your needs.
Attached sample expression file
~EmEm