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 → Run script or built-in action

AI-generated

Summary

Run a script or built-in action on a specified device within the NinjaOne management system.

Inputs

  • id (required) — The identifier of the device on which to run the script or built-in action.
  • type — Specify whether to run a 'SCRIPT' or an 'ACTION' on the device. Defaults to 'ACTION'.
  • id — The identifier of the script to run, required if type is 'SCRIPT'.
  • uid — The identifier of the built-in action to run, required if type is 'ACTION'.
  • parameters — Optional parameters to pass to the script or action as a JSON string.
  • runAs — Optional credential role or identifier to specify the user context under which the script or action should run.
  • options — Additional HTTP request options including custom headers, query filters, batching, pagination, debug mode, and timeout to control the request behavior.

Output shape

a JSON object representing the API response from the NinjaOne endpoint triggering the script or action execution on the device.

The output includes execution details and, if debug is enabled, the full request data (URL, headers, body). No pagination applies as this is an action request, not a list retrieval.

Examples

Example 1: Run a built-in action on device ID 123

Set 'id' to 123, 'type' to 'ACTION', 'uid' to the built-in action identifier, optionally set parameters and runAs.

Links

Discussion