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

Management → Device scripting options

AI-generated

Summary

Retrieve scripting options available for a specific device by its identifier, optionally handling pagination to return multiple pages of results.

Inputs

  • id (required) — The numeric identifier of the device for which to retrieve scripting options.
  • returnAll — Boolean flag to determine whether to fetch all pages of results or only a single page.
  • additionalFields.lang — Optional language code to customize the response language.
  • options.customBody — Optional arbitrary JSON to merge into the request body, allowing custom request payloads.
  • options.headerFilters — Optional custom HTTP headers to include in the API request.
  • options.queryFilters — Optional query-string filters to narrow or modify the request parameters.
  • options.batching — Batching settings to split input items into smaller groups, specifying items per batch and delay between batches.
  • options.debug — If enabled, includes the full request details (URL, headers, body) in the output for troubleshooting.
  • options.pagination — Settings to control how pagination is handled including mode, parameter names, page size, maximum pages to fetch, and request intervals.
  • options.timeout — Milliseconds to wait for the server response before aborting the request (default 300000).

Output shape

a JSON object containing the scripting options data for the specified device, potentially including multiple pages of results depending on pagination settings.

If 'returnAll' is true and pagination is configured, the output aggregates results across pages. Debug information is included under a separate entry when enabled. Custom body values take priority over standard parameters if provided.

Examples

Example 1: Fetch scripting options for device with ID 123, single page

Set 'id' to 123, 'returnAll' to false or unset.

Example 2: Fetch all scripting options across pages for device 123

Set 'id' to 123, 'returnAll' to true, and configure pagination options as needed.

Links

Discussion