Update asset tags

Updating server tags through the REST API with the following CURL command:

The first step is to make sure you have the sufficient API credentials: you should start by creating a new API Client ID and use it through the built-in Swagger UI to fetch back the authentication token to use in your scripted request.

You can then use the curl utility to update assets properties by directly calling the API with an existing authentication token.

curl -X PATCH -k "https://<INSTANCE_ID>.wardenscanner.com/api/v2/servers/<SERVER_ID>" \
-H "accept: application/json" -H "authorization: Bearer <YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"id": "373", "kind": "range", "tagIds": ["<TAG_ID>"], "fields": "tagIds"}'

You will need to replace those variable:

  • YOUR_TOKEN
  • INSTANCE_ID
  • SERVER_ID
  • TAG_ID