LOGBOOK

HELP

Quiz Entry - updated: 2026.10.15

How can you use query parameters to return only part of an API's data, for example only the second device?

Append filter and paging parameters to the URL: ?limit=1 returns just one record, and adding &offset=2 makes that record start at the second device in the inventory.

Six devices with limit and offset selecting different slices: all, the first one, the second one, three from the second

* limit caps how many records come back; offset sets where the slice starts. *

GET /api/v1/network-device?limit=1&offset=2
  • ? starts the query string, and & separates further parameters.
  • limit caps how many records come back.
  • offset sets where in the list to start (here at record 2).

These parameters are part of each API's definition, not a general HTTP feature. Which ones exist, how they are named and whether counting starts at 0 or 1 differs from API to API, which is why the API documentation is so valuable. Most APIs document what they can do and which filters they accept.

Filtering on the server side also keeps responses small, which matters when an inventory holds thousands of devices.

Go deeper:

From Quiz: ITIA / Network Programmability: CLI, REST APIs, YANG, NETCONF and RESTCONF | Updated: Oct 15, 2026