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

AssetTags → Batch tag assets

AI-generated

Summary

Batch update tags on assets of a specified type by adding or removing tag IDs to/from multiple asset IDs simultaneously.

Inputs

  • assetType (required) — Select the asset type to target; currently supports 'device'.
  • additionalFields.assetIds — JSON array of asset IDs to which tags will be added or removed.
  • additionalFields.tagIdsToAdd — JSON array of tag IDs to add to the specified assets.
  • additionalFields.tagIdsToRemove — JSON array of tag IDs to remove from the specified assets.
  • options.customBody — Optional JSON object to send an arbitrary request body that deep merges with provided fields; custom body values have priority.
  • options.headerFilters — Optional set of custom HTTP headers to include with the API request.
  • options.queryFilters — Optional query-string filters to add to the API request URL.
  • options.batching — Optional batching settings to control the number of items per batch and the interval between batch requests to manage rate limiting.
  • options.debug — When enabled, adds detailed debug information about the request URL, headers, query parameters, and body to the output.
  • options.pagination — Configure pagination behavior if the endpoint supports it, including mode and parameters.
  • options.timeout — Timeout in milliseconds for the request before aborting; defaults to 300000 (5 minutes).

Output shape

a single response object containing the API's result of the batch tag update operation

Includes the HTTP response data from the POST /v2/tag/{assetType} endpoint. If debug is enabled, the output includes the actual request details. The operation sends one request per batch of input items if batching is configured.

Links

Discussion