API to Add a New Config to External Appliance
This endpoint adds a new config to the Appliance with given ID
POST /openapi/v1/ext_appliances/<id>/config
where <id> is the appliance_id that can be obtained from the API to Get List of Appliances. In request payload, <type> is the "valid_config" that can be obtained from API to Get Appliance Schema. To obtain <config> schema, select one of the "valid_config" from API to Get Appliance Schema response, apply the "valid_config" to API to Get the Schema of Config.
Parameters: The request URL contains the following parameters
Name |
Type |
Description |
---|---|---|
name |
string |
Specify the config name |
type |
string |
Specify the config type. Refer to API to Get the Schema of Config for all possible values listed under Description |
config |
set |
Provide the filled config schema in JSON format |
Response object: Returns the updated config.
Sample response
req_payload = {
"name": "new_config",
"type": "VM3_ERSPAN",
"config": {}
}
resp = restclient.post('/ext_appliances/63c1272039042a1c0ddd3e20/config', json_body=json.dumps(req_payload))
if resp.status_code == 200:
parsed_resp = json.loads(resp.content)
print json.dumps(parsed_resp)
Sample response
{
"prev_id": "63c1272039042a1c0ddd3e21",
"mode": "TEST_AND_APPLY",
"name": "new_config",
"root_scope_id": "63bf8d2f497d4f7287dbd335",
"vrf_id": 1,
"appliance_id": "63c1272039042a1c0ddd3e20",
"deleted": false,
"type": "VM3_ERSPAN",
"state": "COMMIT",
"attempts": 0,
"config": {
"secured": {},
"unsecured": null
},
"push_to_dio_at": 0,
"created_at": 1673661042,
"updated_at": 1673661042,
"discovery_completed_at": 0,
"committed_at": 0,
"delete_at": 0,
"error_at": 0,
"hidden": false,
"discovery_phase": 0,
"internal": false,
"id": "63c20a7239042a0991b871b7"
}