Virtual Routers Upstream
Configure VPN
- POST /upstream/{uuid}/action/?do=configure_vpn
Configures the VPN service for a Virtual Router Upstream. The vpn_type allowed values are: pptp and ikev2.
- Status Codes:
200 OK – no error
Example request:
POST /api/2.0/upstream/c0f07d61-1fd0-40a2-a808-593f5e03685e/action/?do=configure_vpn HTTP/1.1 Content-Type: application/json Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop { "password": "f9M0fEscA1ae52r4", "username": "dione", "vpn_access": false, "vpn_type": "pptp" }
Example response:
HTTP/1.1 202 ACCEPTED Content-Type: application/json; charset=utf-8 { "action": "configure_vpn", "job": { "resource_uri": "/api/2.0/jobs/b752ded1-dcf6-4472-a32d-ef787da9d581/", "uuid": "b752ded1-dcf6-4472-a32d-ef787da9d581" }, "result": "success", "uuid": "c0f07d61-1fd0-40a2-a808-593f5e03685e" }
Schema
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"allowed_detail_http_methods": [],
"allowed_list_http_methods": [],
"default_format": "application/json",
"default_limit": 20,
"fields": {
"man_settings": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"resource_uri": {
"default": "No default provided.",
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": true,
"required": true,
"type": "string"
},
"type": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": true,
"type": "string"
},
"uuid": {
"default": null,
"help_text": "UUID of the Upstream virtual router",
"readonly": true,
"required": true,
"type": "string"
},
"virtual_router": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": true,
"type": "string"
},
"vlan_settings": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"wan_settings": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
}
},
"filtering": {
"name": "exact",
"name__contains": "exact",
"tag": "exact",
"uuid": "exact"
},
"ordering": [
"uuid",
"name"
]
}