Reset Search



KB43942 - Example REST commands to add or delete vTMs to the Services Director using curl.

« Go Back


Last Modified Date11/16/2018 11:32 PM
These are example curl commands to license or remove non-managed vTM instances on the Services Director.
Problem or Goal
In the following example, all port numbers should be changed to match those used. This article presumes defaults.

- To add an instance "myvtm" with IP "", and give 100 Mbit/s license for "myfeaturepack":
curl -X POST https://SD:8100/api/tmcm/2.7/instance/?managed=false \
-sku admin:sdpassword \
-H 'Content-Type: application/json' \
-d '{
  "admin_username": "admin",
  "admin_password": "vtmpasword",
  "stm_feature_pack": "myfeaturepack",
  "tag": "myvtm",
  "bandwidth": 100,
  "license_name": "universal_v4",
  "owner": "",
  "management_address": "",
  "ui_address": "",
  "rest_address": "",
  "rest_enabled": true

- Deleting is a two-step process. First, instance is marked for deletion:
curl -sku admin:sdpassword -H 'Content-Type: application/json' \ 
  https://SD:8100/api/tmcm/2.7/instance/INSTANCE -X POST \
  -d '{"status": "Deleted"}'

Second, optional, step is to clean-up an instance previously marked for deletion. Command above would return "instance_id", which is required for second step:
curl -sku admin:sdpassword -H 'Content-Type: application/json' \
  https://SD:8100/api/tmcm/2.7/instance/INSTANCEID -X DELETE
Related Links
Attachment 1 
Created ByRoy Farrell



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255