NinjaOne icon

NinjaOne

Ninja One Public API documentation. <br><br>See also: <br> <a href="https://resources.ninjarmm.com/API/Ninja+RMM+Public+API+v2.0.5+Device+Filter+Syntax.pdf">Device Filter syntax</a><br><a href="https://app.ninjarmm.com/apidocs-beta/core-resources/articles/webhooks/overview">Webhooks</a>

Actions309

Organization → Organization devices

AI-generated

Summary

Retrieve a list of devices associated with a specified organization by its ID, supporting pagination and filtering options.

Inputs

  • id (required) — The identifier of the organization whose devices are to be fetched.
  • returnAll — Flag to determine whether to return all devices or only a single page of results.
  • pageSize — Limit the number of devices returned per page.
  • after — Indicates the last node ID from the previous page to fetch the next page of results.
  • customBody — Optional JSON object to include additional data in the request body that overrides other fields.
  • headerFilters — Custom HTTP headers to include in the API request.
  • queryFilters — Query-string filters defined by parameter name and value to refine results.
  • batching — Batch settings to control how input items are grouped and the interval between batches.
  • debug — Enable to include detailed request information for troubleshooting.
  • pagination — Configuration for handling pagination such as mode (offset, cursor, URL), page parameter names, cursor paths, and limits.
  • timeout — Timeout in milliseconds to wait for the server response before aborting the request.

Output shape

a list of device records associated with the specified organization

Supports pagination through parameters such as page size, after (cursor), and pagination mode. When 'Return All' is enabled, all devices across pages are retrieved. Debug information may be included in the output if enabled.

Examples

Example 1: Fetch the first page of devices for organization ID 1234 with 50 devices per page

Set 'id' to 1234, 'returnAll' to false, and 'pageSize' to 50.

Example 2: Retrieve all devices for organization ID 1234 without pagination limits

Set 'id' to 1234, and 'returnAll' to true.

Links

Discussion