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 "10.20.30.40", 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": "10.20.30.40",
"ui_address": "10.20.30.40:9090",
"rest_address": "10.20.30.40:9070",
"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