Skip to content

Import tags via API

This guide shows the minimal API call to bulk-import tag values from an XLSX file. Use for manual/custom tags – not discovery-managed, read-only tags.

  • API token (header token: <value>) with permission to edit the target assets.
  • XLSX file with a column to match assets and a column with the tag values.
  • Know the asset type (e.g., All Machines) and which tag you’re setting.
  • Endpoint: POST /rest/action/bulktag/xlsx
  • Content-Type: application/octet-stream
  • resourceType: asset type to update (e.g., All%20Machines).
  • matchColumn: column name in XLSX used to match rows.
  • matchTag: tag in vScope that corresponds to matchColumn (e.g., Name).
  • valueColumn: column in XLSX with the tag values to import (e.g., Your Manual Tag).
  • apply: false to preview (dry run), true to commit changes.
Terminal window
curl -X POST \
-H 'token: <TOKEN>' \
-H 'Content-Type: application/octet-stream' \
--data-binary @./your-file.xlsx \
"https://<vscope>/rest/action/bulktag/xlsx?resourceType=All%20Machines&matchColumn=Name&matchTag=Name&valueColumn=Your%20Manual%20Tag&apply=false"
  1. Run with apply=false to see the preview counts.
  2. If correct, rerun with apply=true to commit.
  • Keep tag names consistent; avoid overlapping with discovery-managed tags.
  • Ensure the match column uniquely identifies assets (e.g., Name, IP, Serial).
  • For large files, test on a small subset first.
  • Set method POST, URL as above with query params.
  • Headers: token: <TOKEN>, Content-Type: application/octet-stream.
  • Body: binary → select your XLSX file.
  • Send with apply=false, then true to commit.

If the request fails, check token/permissions, Content-Type header, and that resourceType matches an existing asset type.