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 → Set tags for an asset

AI-generated

Summary

Set the tags assigned to a specific asset in the NinjaOne platform, replacing any existing tags with the provided ones.

Inputs

  • assetType (required) — The type of asset to tag; currently only 'device' is supported.
  • assetId (required) — The unique identifier of the asset for which tags will be set.
  • tagIds — A JSON array of tag IDs to assign to the asset, which will replace any existing tags on that asset.
  • customBody — Optional JSON object to send in the request body that will override other body parameters.
  • headerFilters — Optional custom HTTP headers to include in the API request.
  • queryFilters — Optional query-string parameters to filter or modify the API request.
  • batching — Settings to control batch size and interval when processing multiple input items.
  • debug — If enabled, includes full request details in the output for troubleshooting.
  • pagination — Settings for pagination, though not typically applicable for this operation.
  • timeout — Milliseconds to wait for the server response before aborting the request.

Output shape

a single JSON response object reflecting the API's response to the tag update request

The response contains data from the NinjaOne API confirming the updated tags on the specified asset. When Debug is enabled, additional request details are included in the output for inspection.

Examples

Example 1: Setting tags for a device asset

Specify asset type as 'device', provide the asset ID, and supply a JSON array of tag IDs to assign.

Links

Discussion