Updating asset schedule

Updating asset schedule 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.

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": "<SERVER_ID>", "kind": "server", "schedule": <SCHEDULE_CONFIG>, "fields": "schedule"}'

You will need to replace those variable:

  • YOUR_TOKEN
  • INSTANCE_ID
  • SERVER_ID
  • SCHEDULE_CONFIG

Example for a monthly scan schedule (SCHEDULE_CONFIG)

{
"period": "monthly",
"monthday": "15",
"retryCount": 1,
"startTime": "03:00"
"killTime": "never",
}