Reset Search
 

 

Article

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

« Go Back

Information

 
Last Modified Date11/16/2018 11:32 PM
Synopsis
These are example curl commands to license or remove non-managed vTM instances on the Services Director.
Problem or Goal
Cause
Solution
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
Related Links
Attachment 1 
Created ByRoy Farrell

Feedback

 

Was this article helpful?


   

Feedback

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

Characters Remaining: 255