10-02-2023 03:30 PM
Hello,
I need to extract all records from several Coupa tables using Coupa API. However Coupa only allows to extract 50 records at a time (Coupa documentation).
I tried implementing the solution in this thread (link) for invoices and suppliers table by 1) keeping the service URL as normal without adding the "?offset=50&exported=false", 2) In Rest GET snap, adding "Has Next" and "Next URL" as stated in the linked thread
Has Next: eval(sl.ensureArray($.get('entity',[])).length > 0)
Next URL: lib.conf.getAppConf('coupa').basepath.concat("suppliers?offset=",(snap.out.totalCount + 1) * 50, "&exported=false")
Note that for Next URL I modified the "suppliers?" part. For invoices, I changed to "invoices?" (not sure if this is correct).
Either way, this procedure still only gets me 50 records and marks syntax error in "Has Next" and "Next URL" despite turning green
Has Next syntax error:
Next URL:
I would appreciate the help a lot, thank you!!
#coupa #RESTGET #REST #CoupaAPI