Nodegrid RESTful API's: How to paginate requests

Nodegrid RESTful API's: How to paginate requests

Nodegrid's RESTful API's: How to paginate requests


Nodegrid's RESTful API's support pagination. Pagination is used to break down larger datasets into smaller pages. Each page is then requested separately. This helps to improve the system performance.
Pagination is enabled by default for all API requests, this means only the first page is returned by default. This behaviour can be changed using the Query Parameters and setting the page value.

page value
result
0
disable pagination
1
return the first page (default)
2-n
return page 2 to n

Examples

Postman - return page 3



Python request - disable pagination

  1. url = 'https://{0}/api/v1/devices/table'.format(ip_addr)
  2.                 try:
  3.                         resp = requests.get(url = url,
  4.                                             headers = headers,
  5.                                             params = { "page": "0" },
  6.                                             verify = False,
  7.                                             timeout = 30)
  8.                 except Exception as e:
  9.                         print('Failed to get devices:', str(e))
  10.                         return None

    • Related Articles

    • HowTo: Use ZPE Cloud REST API

      How To Use ZPE Cloud REST API: Querying Device Information via a Simple Python Script Overview ZPE Cloud provides a rich REST API that administrators can use to programmatically manage and monitor their Nodegrid devices. Instead of navigating the web ...
    • How to find the RESTful API documentation in Nodegrid WebUI

      The Nodegrid platform provides RESTful API, which can be used to read and change Nodegrid configuration. The API documentation is embedded on Nodegrid. One can find the API documentation on WebUI as folllows, 1. Login as admin and go to System 2. Go ...
    • How to Configure Nodegrid Serial Ports

      To configure the serial ports of your Nodegrid Serial Console, follow the guideline steps below.   WebUI Log in as admin to the Nodegrid Serial Console Web interface. Go to Managed Devices page. Select the serial ports you want to configure, or check ...
    • How to: Use API keys as authentication method

      Nodegrid enables using different methods for API authentication, they are: ticket, username, and API key. In this guide you will learn how to create an API account and how to query information using the API. Adding the API account from GUI 1. Login ...
    • Nodegrid Serial Console: Pinouts, Cables and Connectors

      The tables below show the serial port pinout information of the NSC TxxR (Cisco Pinout) and NSC Txx (Legacy Pinout). NSC TxxR - Cisco-like Pinout Pin Signal Name Input/Output 1 CTS IN 2 DCD IN 3 RxD IN 4 GND N/A 5 GND N/A 6 TxD OUT 7 DTR OUT 8 RTS ...