Incorrect count of results when querying packages
Friday, July 10, 2020 at 08:54amI'm querying packages from OneSpan Sign REST API. I don't use any filters, so I expect to get all of the packages. There are two, one in the inbox, and one in the drafts folder.
Here's query
curl -X GET "https://sandbox.esignlive.com/api/packages" -H "accept: application/json; esl-api-version=11" -H "Authorization: Basic API KEY"
Response contains JSON with
{
"count": 2"
"results": [ ... ]
}
Surprisingly results array contains only one JSON (describing the package). Am I doing something wrong or is there a bug in the API?
Reply to: Incorrect count of results when querying packages
Friday, July 10, 2020 at 09:12amHi kalkusa,
Thanks for the post! Please be advised that you need to explictly set the "from" and "to" parameters, in order to retrieve multiple entities, otherwise only the first one will be returned like what you're experiencing.
OneSpan Sign package retrieval API has a limitation of 100 return entities. So according to the "count" normally you do
GET /api/packages?from=1&to=100
GET /api/packages?from=101&to=200
So on so forth.
Reply to: Hi kalkusa, Thanks for…
Friday, July 10, 2020 at 09:23amThank you for quick reply. It works.