pagination for api results

Version 1.34

Feature
Finished

Ability to specify the number of items per page site, and page number, allowing DA to only give you the range you want. Just like the tables in DA, but for API output. For most CMD_API calls with a config type ouput, simply pass: pagination_ipp=10 pagination_page=1 where pagination_ipp is the number of items per page and pagination_page is the page number. Only use values greater than 0. If you wish for DA to also output the total number of pages, then also include: pagination_pagecount=1 if the pagination_pagecount=1 value is passed, then DA will return: pagination_pagecount=7 with the appropriate number of pages the command has available. It is the responsibility of the code to remove the pagination_pagecount value in the case that you're just looping through all items of data.. as it's not likely relevant to the data itself, hence you must check for it and ignore it. pagination is not available for list-type output at this time, or some API call with a non-standard output format.

Interested to try DirectAdmin? Get a 30-day Free Trial!