SAP Commissions Rest API – Pagination

This is intended for customers, partners and anyone who have access to SAP Commissions to develop your solution to extract all the JSON records using Commissions RestAPI.  In other words, to extract the data without database.

What Is Pagination?

Have you ever clicked through an Commission workspace with different pages? Or have you read through an extensive objects up into multiple segments? Do you know the numbers on the bottom of the webpage?

This how it looks at each workspace with more than 10 records have different pages..

That’s pagination.

A lot of the time, when you’re making calls to the SAP Commissions REST API, there’ll be a lot of results to return. For that reason, product is built with paginate the results to make sure responses are easier to handle.

Let’s say your initial call is asking for all the pages in your commissions instance; the result could be a massive response with hundreds of thousands of JSON record pages. That’s not a good place to start and start downgrading the application slower due to heavy load..

Rather than that, SPM engineering team have built in a default limit on results, but we recommend you always explicitly set the top=100 parameter to ensure you know how many results per page you’ll get. Don’t rely on the defaults as they’ll be different depending on what parts of the response you’re expanding, so the response you get might not be what you expected.

Note : SAP Commission Rest API can provide max 1000 records with limit of &top=100

Example 1 :  /payments?skip=0&top=100  which will provide 100 records

Example 2 :  /payments?skip=300&top=100  which will provide another 100 records from different page

As APIs continue to get more involved and elaborate, API pagination is only going to become more essential. As we’ve shown, some APIs can return millions of search results, if not more. This can slow the response time of an API call down to a crawl.

To summarize, we’ve looked at what API pagination is, as well as some of the most common methods of implementation.

API pagination is essential if you’re dealing with a lot of data and endpoints. Pagination automatically implies adding order to the query result. The object ID is the default result, but results can be ordered in other ways as well.

Finally, we concluded with some code examples to give you some practical insights on how your use API pagination code.

API pagination is a vast topic. There’s a lot that can be said about it.


SAP Commissions – RestAPI filtering Parameter

SAP Commissions [Rest API] > Part 3 – API Documentation