cURL Python

Introduction

The VNS3 API provides a programmable interface on top of your network edge. This allows you to automate your network infrastructure deployment and reactive behavior to real time events.

Getting started

The fastest way to get started is by launching a free version of VNS3 in your cloud of choice. (Trying to run programmable SDN appliance on prem? We can run anywhere - Get in touch at support@cohesive.net)

We have free versions as well as bring-your-own-license images ready for any and all environments:

SDKs and Clients

Currently we support a python SDK and ruby CLI.

We have a zero-dependency CLI in the roadmap!

Topology starters

We provide some topology starters to get going with fully automating the build of your network here. https://github.com/cohesive/vns3-infra-templates.git. We'll be continually updating and revising this, with user input.

Don't see your use case there? Looking to use cloudformation or Azure Resource Templates? Get in touch. We'd be happy to help you get going with your automation of choice.

Some cloud quickstarts:

# Spin up VNS3 controller mesh
module "vns3_mesh" {
  source              = "github.com/cohesive/vns3-infra-templates.git//modules/aws-vns3-public"
  topology_name       = "${var.topology_name}"
  vns3_version        = "${var.vns3_version}"       # searches for latest AMI of version
  vns3_license_type   = "byol"
  vns3_instance_type  = "${var.vns3_instance_type}"
  vns3_account_owner  = "${var.vns3_account_owner}"
  vpc_id              = "${module.aws_vpc.vpc_id}"
  vpc_route_table_id  = "${module.aws_vpc.route_table_id}"
  access_cidr         = "${var.access_cidr}"
  client_cidrs        = ["${var.client_cidrs}"]
  subnet_ids          = "${length(module.aws_vpc.subnet_ids) == 0 ? [] : slice(module.aws_vpc.subnet_ids, 0, var.vns3_instance_count)}"
  common_tags         = "${var.common_tags}"
}

VNS3 Controller API v6.0.0

Cohesive networks VNS3 provides complete control of your network's addressing, routes, rules and edge enabling a secure, connected and reactive cloud network.

Download spec

Base URLs:

Terms of service Email: Cohesive Networks Support team Web: Cohesive Networks Support team

Authentication

# Authenticate via cURL with user:password
curl -X GET -u api:myapipassword https://55.55.55.55:8000/api/config
from cohesivenet import VNS3Client, Configuration

vns3_client = VNS3Client(
    configuration=Configuration(
        host="55.55.55.55:8000",
        username="api",
        password="myapipassword",
        verify_ssl=False,   # if SSL Certs installed, set to True
    )
)

System Administration

Sysadmin functions for system status, device access and system actions

Get remote support

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/remote_support \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.get_remote_support_details()

print(api_response.json())

GET /remote_support

Get remote support configuration details

Example responses

200 Response

{
  "enabled": true
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

RemoteSupportConfigResponse

Name Type Required Constraints Description
  response object false - -
   enabled boolean false - -

Update remote support config

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/remote_support \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.put_update_remote_support(
    enabled=enabled,
    revoke_credential=revoke_credential)

print(api_response.json())

PUT /remote_support

Enables and disables remote support. Revokes the validity of current remote support keypair

Body parameter

{
  "enabled": true,
  "revoke_credential": true
}

Parameters

Name In Type Required Description
enabled body boolean false True if remote support should be enabled
revoke_credential body boolean false True if remote support credential should be revoked

Example responses

200 Response

{
  "enabled": true,
  "revoke_credential": false
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347731532179638778333642624237974834407",
    "message": "enabled is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

RemoteSupportStatusResponse

Name Type Required Constraints Description
  response object false - -
   enabled boolean false - -
   revoke_credential boolean false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Generate support keypair

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/remote_support/keypair \
  -H 'Content-Type: text/plain' \
  -H 'Accept: application/octet-stream'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.post_generate_support_keypair()

print(api_response.file_download)   # path to downloaded file

POST /remote_support/keypair

Generating a remote support key which can be shared with Cohesive to provide access to the internal of the VNS3 Manager remotely as a "one time key". Once Cohesive has used the key it can be revoked and access terminated.

Body parameter

string

Example responses

201 Response

"string"

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Bad encrypted passphrase"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
201 Created SSH key .pem file string
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get cloud details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/cloud_data \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.get_cloud_data()

print(api_response.json())

GET /cloud_data

Returns cloud-specific data depending upon cloud type. Supports EC2 and GCE. More clouds coming soon.

Example responses

200 Response

{
  "response": {
    "cloud_type": "ec2",
    "cloud_data": {
      "accountId": "10801293012",
      "availabilityZone": "us-east-1a",
      "ramdiskId": null,
      "kernelId": null,
      "pendingTime": "2019-07-19T21:45:07Z",
      "architecture": "x86_64",
      "privateIp": "192.168.1.211",
      "devpayProductCodes": null,
      "marketplaceProductCodes": null,
      "version": "2017-09-30",
      "region": "us-east-1",
      "imageId": "ami-8400209011nsd0111",
      "billingProducts": null,
      "instanceId": "i-123123asdf0t41211",
      "instanceType": "t2.micro"
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

CloudInfoDetail

Name Type Required Constraints Description
  response object false - -
   cloud_type string false - ec2, gce, azure, hpcloud, centurylink
   cloud_data any false - -

oneOf

Name Type Required Constraints Description
    any object false - Metadata returned from AWS instance metadata call.
     accountId string false - -
     availabilityZone string false - -
     ramdiskId string¦null false - -
     kernelId string¦null false - -
     pendingTime string false - -
     architecture string false - -
     privateIp string false - -
     devpayProductCodes string¦null false - -
     marketplaceProductCodes string¦null false - -
     version string false - -
     region string false - -
     imageId string false - -
     billingProducts string¦null false - -
     instanceId string false - -
     instanceType string false - -

xor

Name Type Required Constraints Description
    any object false - Metadata returned from GCE metadata call.
     projectId string false - -

Take server action

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/server \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.put_server_action(
    reboot=reboot)

print(api_response.json())

PUT /server

Server action for VNS3 controller. Currently only reboot supported.

Body parameter

{
  "reboot": true
}

Parameters

Name In Type Required Description
reboot body boolean false -

Example responses

200 Response

{
  "response": {
    "status": "rebooting"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348220177382578437853325229350053485636",
    "message": "Nothing to do"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SimpleStatusResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get runtime status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.get_runtime_status()

print(api_response.json())

GET /status

Describe Runtime status details

Example responses

200 Response

{
  "response": {
    "connected_clients": {
      "property1": {
        "managerid": 1,
        "overlay_ipaddress": "string",
        "ipaddress": "string",
        "tags": {
          "property1": "string",
          "property2": "string"
        }
      },
      "property2": {
        "managerid": 1,
        "overlay_ipaddress": "string",
        "ipaddress": "string",
        "tags": {
          "property1": "string",
          "property2": "string"
        }
      }
    },
    "connected_subnets": [
      [
        "string"
      ]
    ],
    "ipsec": {
      "property1": {
        "id": 1,
        "local_subnet": "string",
        "remote_subnet": "string",
        "endpointid": 1,
        "endpoint_id": 1,
        "endpoint_name": "string",
        "enabled": true,
        "active": true,
        "description": "string",
        "bounce": true,
        "connected": true,
        "ping_interface": "eth0",
        "ping_interval": 0,
        "ping_ipaddress": "string",
        "tunnel_params": {
          "phase2": "string",
          "outbound_spi": "string",
          "inbound_spi": "string",
          "bytes_in": "string",
          "bytes_out": "string",
          "esp_time_remaining": "string",
          "esp_port": "string",
          "phase2_algo": "string",
          "phase2_hash": "string",
          "nat_t": "string",
          "dpd": "string",
          "pfs_dh_group": "string",
          "phase1": "string",
          "isakmp_port": "string",
          "isakmp_time_remaining": "string",
          "last_dpd": "string",
          "phase1_cipher": "string",
          "phase1_prf": "string",
          "phase1_dh_group": "string",
          "ike_version": "string"
        }
      },
      "property2": {
        "id": 1,
        "local_subnet": "string",
        "remote_subnet": "string",
        "endpointid": 1,
        "endpoint_id": 1,
        "endpoint_name": "string",
        "enabled": true,
        "active": true,
        "description": "string",
        "bounce": true,
        "connected": true,
        "ping_interface": "eth0",
        "ping_interval": 0,
        "ping_ipaddress": "string",
        "tunnel_params": {
          "phase2": "string",
          "outbound_spi": "string",
          "inbound_spi": "string",
          "bytes_in": "string",
          "bytes_out": "string",
          "esp_time_remaining": "string",
          "esp_port": "string",
          "phase2_algo": "string",
          "phase2_hash": "string",
          "nat_t": "string",
          "dpd": "string",
          "pfs_dh_group": "string",
          "phase1": "string",
          "isakmp_port": "string",
          "isakmp_time_remaining": "string",
          "last_dpd": "string",
          "phase1_cipher": "string",
          "phase1_prf": "string",
          "phase1_dh_group": "string",
          "ike_version": "string"
        }
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

RuntimeStatusDetail

Name Type Required Constraints Description
  response object false - -
   connected_clients object false - clients keyed by ip address
    OverlayClient object false - -
     managerid integer false - -
     overlay_ipaddress string false - -
     ipaddress string false - -
     tags object false - Key, value object of tags
      additionalProperties string false - -
   connected_subnets [array] false - Array of arrays with each element of length 2 representing [network, subnet mask]
   ipsec object false - IPSEC tunnels keyed by tunnel ID
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Get system status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status/system \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.get_system_status(
    timestamp=timestamp)

print(api_response.json())

GET /status/system

Provides information about the underlying appliance; memory, cpu, disk space, etc.

Parameters

Name In Type Required Description
timestamp query integer false Unix timestamp

Example responses

200 Response

{
  "response": {
    "timestamp": "string",
    "timestamp_i": 0,
    "vns3_version": "string",
    "kernel_version": "string",
    "uptime": 0,
    "loadavg": [
      "string"
    ],
    "diskinfo": [
      [
        "string"
      ]
    ],
    "meminfo": [
      "string"
    ],
    "swapinfo": [
      "string"
    ],
    "container_system": {
      "container_system_running": true,
      "images_limit": 0,
      "images_stored": 0,
      "containers_limit": 0,
      "containers_active": 0,
      "container_network": "string"
    },
    "data": {
      "sysstat": [
        [
          "vnscubed",
          "597",
          "1564089901",
          "all",
          "%user",
          "2.91"
        ],
        [
          "vnscubed",
          "597",
          "1564089901",
          "all",
          "%nice",
          "0.02"
        ],
        [
          "vnscubed",
          "597",
          "1564089901",
          "all",
          "%system",
          "1.49"
        ],
        [
          "vnscubed",
          "597",
          "1564089901",
          "all",
          "%iowait",
          "0.51"
        ],
        [
          "vnscubed",
          "597",
          "1564089901",
          "all",
          "%steal",
          "0.01"
        ]
      ]
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SystemStatusDetail

Name Type Required Constraints Description
  response object false - -
   timestamp string false - -
   timestamp_i integer false - -
   vns3_version string false - -
   kernel_version string false - -
   uptime integer false - -
   loadavg [string] false - -
   diskinfo [array] false - -
   meminfo [string] false - -
   swapinfo [string] false - -
   container_system object false - -
    container_system_running boolean false - -
    images_limit integer false - -
    images_stored integer false - -
    containers_limit integer false - -
    containers_active integer false - -
    container_network string false - -
   data object false - -
    sysstat [array] false - -

Get task status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status/task \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.sys_admin.get_task_status(
    token=token)

print(api_response.json())

GET /status/task

Describe task status details

Body parameter

{
  "token": "string"
}

Parameters

Name In Type Required Description
token body string false -

Example responses

200 Response

{
  "response": {
    "task_status": "string"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564152929359289894296619951832390615371038",
    "message": "token is missing"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

TaskStatusDetail

Name Type Required Constraints Description
  response object false - -
   task_status string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Access

Manage access to VNS3 with API tokens and admin access URLs

Get API access tokens

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/access/tokens \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.get_api_tokens()

print(api_response.json())

GET /access/tokens

Retrieve list of api tokens

Example responses

200 Response

{
  "response": [
    {
      "id": 1,
      "created_at": "2019-08-24T14:15:22Z",
      "token": "string",
      "name": "string",
      "created_ip": "string",
      "expires_at": "2019-08-24T14:15:22Z",
      "lifetime": "string",
      "refreshes": true,
      "expired": true,
      "last_accessed_at": "string",
      "last_accessed_ip": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

AccessTokenListResponse

Name Type Required Constraints Description
  response [object] false - -
   AccessToken object false - -
    id integer false - -
    created_at string(date-time) false - -
    token string false - -
    name string false - -
    created_ip string false - -
    expires_at string(date-time) false - -
    lifetime string false - -
    refreshes boolean false - -
    expired boolean false - -
    last_accessed_at string¦null false - -
    last_accessed_ip string¦null false - -

Create API token

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/access/token \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.create_api_token(
    expires=expires,
    name=name,
    token_name=token_name,
    refreshes=refreshes)

print(api_response.json())

POST /access/token

Create api token

Body parameter

{
  "expires": 3600,
  "name": "string",
  "token_name": "string",
  "refreshes": true
}

Parameters

Name In Type Required Description
expires body integer false Number of seconds before expiration
name body string false Optional name of token
token_name body string false Optional name of token (deprecated)
refreshes body boolean false Token lifetime refreshes when used

Example responses

201 Response

{
  "response": {
    "id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "token": "string",
    "name": "string",
    "created_ip": "string",
    "expires_at": "2019-08-24T14:15:22Z",
    "lifetime": "string",
    "refreshes": true,
    "expired": true,
    "last_accessed_at": "string",
    "last_accessed_ip": "string"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347797058992573673734848595852371200179",
    "message": "expires range must be between 60 and 31,536,000"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 201

AccessTokenDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   created_at string(date-time) false - -
   token string false - -
   name string false - -
   created_ip string false - -
   expires_at string(date-time) false - -
   lifetime string false - -
   refreshes boolean false - -
   expired boolean false - -
   last_accessed_at string¦null false - -
   last_accessed_ip string¦null false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get API access token

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/access/token/{token_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.get_api_token(token_id)

print(api_response.json())

GET /access/token/{token_id}

Retrieve details for specific access token (including expired ones)

Parameters

Name In Type Required Description
token_id path integer true Token ID

Example responses

200 Response

{
  "response": {
    "id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "token": "string",
    "name": "string",
    "created_ip": "string",
    "expires_at": "2019-08-24T14:15:22Z",
    "lifetime": "string",
    "refreshes": true,
    "expired": true,
    "last_accessed_at": "string",
    "last_accessed_ip": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested api token does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AccessTokenDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   created_at string(date-time) false - -
   token string false - -
   name string false - -
   created_ip string false - -
   expires_at string(date-time) false - -
   lifetime string false - -
   refreshes boolean false - -
   expired boolean false - -
   last_accessed_at string¦null false - -
   last_accessed_ip string¦null false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Expire API token

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/access/token/{token_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.put_expire_api_token(token_id,
    expired=expired)

print(api_response.json())

PUT /access/token/{token_id}

Expire API token

Body parameter

{
  "expired": true
}

Parameters

Name In Type Required Description
token_id path integer true Token ID
expired body boolean false -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "token": "string",
    "name": "string",
    "created_ip": "string",
    "expires_at": "2019-08-24T14:15:22Z",
    "lifetime": "string",
    "refreshes": true,
    "expired": true,
    "last_accessed_at": "string",
    "last_accessed_ip": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested api token does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AccessTokenDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   created_at string(date-time) false - -
   token string false - -
   name string false - -
   created_ip string false - -
   expires_at string(date-time) false - -
   lifetime string false - -
   refreshes boolean false - -
   expired boolean false - -
   last_accessed_at string¦null false - -
   last_accessed_ip string¦null false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete API token

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/access/token/{token_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.delete_api_token(token_id)

print(api_response.json())

DELETE /access/token/{token_id}

Delete API token by ID

Parameters

Name In Type Required Description
token_id path integer true Token ID

Example responses

200 Response

{
  "response": "Token deleted"
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested api token does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get access URLs

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/access/urls \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.get_access_urls()

print(api_response.json())

GET /access/urls

Retrieve list of users' access urls, including expired ones

Example responses

200 Response

{
  "response": [
    {
      "id": 1,
      "url": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "created_ip": "string",
      "name": "string",
      "expires_at": "2019-08-24T14:15:22Z",
      "lifetime": "string",
      "expired": true,
      "last_accessed_at": "string",
      "last_accessed_ip": "string",
      "access": "rs"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

AccessUrlListResponse

Name Type Required Constraints Description
  response [object] false - -
   AccessUrl object false - -
    id integer false - -
    url string false - -
    created_at string(date-time) false - -
    created_ip string false - -
    name string false - -
    expires_at string(date-time) false - -
    lifetime string false - -
    expired boolean false - -
    last_accessed_at string¦null false - -
    last_accessed_ip string¦null false - -
    access string false - Type of access, remote support (rs) or clientpack (cp:100_1_64_0)

Create access URL

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/access/url \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.create_access_url(
    expires=expires,
    name=name,
    description=description,
    access=access)

print(api_response.json())

POST /access/url

Create access URL

Body parameter

{
  "expires": 3600,
  "name": "string",
  "description": "string",
  "access": "rs"
}

Parameters

Name In Type Required Description
expires body integer false Number of seconds before expiration
name body string false Optional name
description body string false Optional name (deprecated)
access body string false Type of access, remote support (rs) or clientpack (cp:100_1_64_0)

Example responses

201 Response

{
  "response": {
    "id": 1,
    "url": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "created_ip": "string",
    "name": "string",
    "expires_at": "2019-08-24T14:15:22Z",
    "lifetime": "string",
    "expired": true,
    "last_accessed_at": "string",
    "last_accessed_ip": "string",
    "access": "rs"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347797058992573673734848595852371200179",
    "message": "expires range must be between 60 and 259200"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 201

AccessUrlDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   url string false - -
   created_at string(date-time) false - -
   created_ip string false - -
   name string false - -
   expires_at string(date-time) false - -
   lifetime string false - -
   expired boolean false - -
   last_accessed_at string¦null false - -
   last_accessed_ip string¦null false - -
   access string false - Type of access, remote support (rs) or clientpack (cp:100_1_64_0)

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Find and delete access URL

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/access/url \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.delete_access_url_by_search(
    access_url_id=access_url_id)

print(api_response.json())

DELETE /access/url

Delete access URL by ID or URL

Body parameter

{
  "access_url_id": 1,
  "access_url": "string"
}

Parameters

Name In Type Required Description
access_url_id body integer false ID of access URL
access_url body string false -

One of the following param combinations are required:

Example responses

200 Response

{
  "response": "Access url deleted"
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Invalid or missing access url"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get access URL

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/access/url/{access_url_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.get_access_url(access_url_id)

print(api_response.json())

GET /access/url/{access_url_id}

Retrieve details for specific access url (including expired ones)

Parameters

Name In Type Required Description
access_url_id path integer true Access URL ID

Example responses

200 Response

{
  "response": {
    "id": 1,
    "url": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "created_ip": "string",
    "name": "string",
    "expires_at": "2019-08-24T14:15:22Z",
    "lifetime": "string",
    "expired": true,
    "last_accessed_at": "string",
    "last_accessed_ip": "string",
    "access": "rs"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Invalid or missing access url"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AccessUrlDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   url string false - -
   created_at string(date-time) false - -
   created_ip string false - -
   name string false - -
   expires_at string(date-time) false - -
   lifetime string false - -
   expired boolean false - -
   last_accessed_at string¦null false - -
   last_accessed_ip string¦null false - -
   access string false - Type of access, remote support (rs) or clientpack (cp:100_1_64_0)

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Expire access URL

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/access/url/{access_url_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.put_expire_access_url(access_url_id,
    expired=expired)

print(api_response.json())

PUT /access/url/{access_url_id}

Expire access URL

Body parameter

{
  "expired": true
}

Parameters

Name In Type Required Description
access_url_id path integer true Access URL ID
expired body boolean false -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "url": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "created_ip": "string",
    "name": "string",
    "expires_at": "2019-08-24T14:15:22Z",
    "lifetime": "string",
    "expired": true,
    "last_accessed_at": "string",
    "last_accessed_ip": "string",
    "access": "rs"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Invalid or missing access url"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AccessUrlDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   url string false - -
   created_at string(date-time) false - -
   created_ip string false - -
   name string false - -
   expires_at string(date-time) false - -
   lifetime string false - -
   expired boolean false - -
   last_accessed_at string¦null false - -
   last_accessed_ip string¦null false - -
   access string false - Type of access, remote support (rs) or clientpack (cp:100_1_64_0)

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete access URL

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/access/url/{access_url_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.delete_access_url(access_url_id)

print(api_response.json())

DELETE /access/url/{access_url_id}

Delete access URL by ID

Parameters

Name In Type Required Description
access_url_id path integer true Access URL ID

Example responses

200 Response

{
  "response": "Access url deleted"
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Invalid or missing access url"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update VPN Identity settings

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/identity/vpn \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.put_identity_v_p_n_settings()

print(api_response.json())

PUT /identity/vpn

Put VPN Identity settings

Body parameter

{
  "host": "string",
  "port": 0,
  "encrypt": true,
  "encrypt_ldaps": true,
  "encrypt_auth": true,
  "encrypt_auth_key": true,
  "encrypt_auth_cert": true,
  "encrypt_verify_ca": true,
  "encrypt_ca_cert": true,
  "binddn": "string",
  "bindpw": "string",
  "encrypt_auth_cert_data": "string",
  "encrypt_auth_cert_filename": "tls.cert",
  "encrypt_auth_key_data": "string",
  "encrypt_auth_key_filename": "tls.key",
  "encrypt_ca_cert_data": "string",
  "encrypt_ca_cert_filename": "ca.pem",
  "user_base": "string",
  "user_id_attribute": "string",
  "user_list_filter": "string",
  "group_base": "string",
  "group_id_attribute": "string",
  "group_list_filter": "string",
  "group_member_attribute": "string",
  "group_member_attr_format": "string",
  "group_search_scope": "string",
  "otp": true,
  "otp_url": "string",
  "provider": "string",
  "enabled": true
}

Example responses

200 Response

{
  "response": {
    "host": "string",
    "port": 0,
    "encrypt": true,
    "encrypt_ldaps": true,
    "encrypt_auth": true,
    "encrypt_auth_key": true,
    "encrypt_auth_cert": true,
    "encrypt_verify_ca": true,
    "encrypt_ca_cert": true,
    "binddn": "string",
    "bindpw": "string",
    "encrypt_auth_cert_data": "string",
    "encrypt_auth_cert_filename": "tls.cert",
    "encrypt_auth_key_data": "string",
    "encrypt_auth_key_filename": "tls.key",
    "encrypt_ca_cert_data": "string",
    "encrypt_ca_cert_filename": "ca.pem",
    "user_base": "string",
    "user_id_attribute": "string",
    "user_list_filter": "string",
    "group_base": "string",
    "group_id_attribute": "string",
    "group_list_filter": "string",
    "group_member_attribute": "string",
    "group_member_attr_format": "string",
    "group_search_scope": "string",
    "otp": true,
    "otp_url": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IdentitySettingsResponse

Name Type Required Constraints Description
  response any false - -

oneOf

Name Type Required Constraints Description
   any object false - -
    host string false - IP address or resolvable hostname
    port integer false - -
    encrypt boolean false - Use SSL
    encrypt_ldaps boolean false - Use LDAPS or start TLS
    encrypt_auth boolean false - Use certificates to authenticate via encrypted connection
    encrypt_auth_key boolean false - -
    encrypt_auth_cert boolean false - -
    encrypt_verify_ca boolean false - Verify certicate using authority
    encrypt_ca_cert boolean false - -
    binddn string false - Bind username
    bindpw string false - Bind password
    encrypt_auth_cert_data string false - Authentication certificate text content to use, empty to delete
    encrypt_auth_cert_filename string false - Authentication certificate filename
    encrypt_auth_key_data string false - Authentication key text content to use, empty to delete
    encrypt_auth_key_filename string false - Authentication key filename
    encrypt_ca_cert_data string false - CA certificate text content to use, empty to delete
    encrypt_ca_cert_filename string false - CA certificate filename
    user_base string false - Base DN from which to search for Users
    user_id_attribute string false - Attribute type for the Users
    user_list_filter string false - Search filter for Users
    group_base string false - Base DN from which to search for Groups
    group_id_attribute string false - Attribute type for the Groups
    group_list_filter string false - Search filter for Groups
    group_member_attribute string false - Attribute used to search for a user within the Group
    group_member_attr_format string false - UserID or UserDN
    group_search_scope string false - base, single or subtree
    otp boolean false - Use OTP code
    otp_url string false - -

xor

Name Type Required Constraints Description
   any object false - -
    enabled boolean false - -
    provider string false - -
    identifier string false - -
    secret string false - -
    redirect_hostname string false - -
    authorization_endpoint string false - -
    token_endpoint string false - -
    userinfo_endpoint string false - -
    jwks_uri string false - -
    otp_url string false - -
    issuer string false - -
    keys object false - -
     keys [object] false - -
     keys_date string(date-time) false - -

xor

Name Type Required Constraints Description
   any object false - -
    server string false - IP address or resolvable hostname
    auth_port integer false - Authentication port
    accounting_port integer false - -
    pass string false - Shared password

Get identity Settings for VPN Users

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/identity/controller \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.get_identity_controller_settings()

print(api_response.json())

GET /identity/controller

get Identity VPN settings

Example responses

200 Response

{
  "response": {
    "host": "string",
    "port": 0,
    "encrypt": true,
    "encrypt_ldaps": true,
    "encrypt_auth": true,
    "encrypt_auth_key": true,
    "encrypt_auth_cert": true,
    "encrypt_verify_ca": true,
    "encrypt_ca_cert": true,
    "binddn": "string",
    "bindpw": "string",
    "encrypt_auth_cert_data": "string",
    "encrypt_auth_cert_filename": "tls.cert",
    "encrypt_auth_key_data": "string",
    "encrypt_auth_key_filename": "tls.key",
    "encrypt_ca_cert_data": "string",
    "encrypt_ca_cert_filename": "ca.pem",
    "user_base": "string",
    "user_id_attribute": "string",
    "user_list_filter": "string",
    "group_base": "string",
    "group_id_attribute": "string",
    "group_list_filter": "string",
    "group_member_attribute": "string",
    "group_member_attr_format": "string",
    "group_search_scope": "string",
    "otp": true,
    "otp_url": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IdentitySettingsResponse

Name Type Required Constraints Description
  response any false - -

oneOf

Name Type Required Constraints Description
   any object false - -
    host string false - IP address or resolvable hostname
    port integer false - -
    encrypt boolean false - Use SSL
    encrypt_ldaps boolean false - Use LDAPS or start TLS
    encrypt_auth boolean false - Use certificates to authenticate via encrypted connection
    encrypt_auth_key boolean false - -
    encrypt_auth_cert boolean false - -
    encrypt_verify_ca boolean false - Verify certicate using authority
    encrypt_ca_cert boolean false - -
    binddn string false - Bind username
    bindpw string false - Bind password
    encrypt_auth_cert_data string false - Authentication certificate text content to use, empty to delete
    encrypt_auth_cert_filename string false - Authentication certificate filename
    encrypt_auth_key_data string false - Authentication key text content to use, empty to delete
    encrypt_auth_key_filename string false - Authentication key filename
    encrypt_ca_cert_data string false - CA certificate text content to use, empty to delete
    encrypt_ca_cert_filename string false - CA certificate filename
    user_base string false - Base DN from which to search for Users
    user_id_attribute string false - Attribute type for the Users
    user_list_filter string false - Search filter for Users
    group_base string false - Base DN from which to search for Groups
    group_id_attribute string false - Attribute type for the Groups
    group_list_filter string false - Search filter for Groups
    group_member_attribute string false - Attribute used to search for a user within the Group
    group_member_attr_format string false - UserID or UserDN
    group_search_scope string false - base, single or subtree
    otp boolean false - Use OTP code
    otp_url string false - -

xor

Name Type Required Constraints Description
   any object false - -
    enabled boolean false - -
    provider string false - -
    identifier string false - -
    secret string false - -
    redirect_hostname string false - -
    authorization_endpoint string false - -
    token_endpoint string false - -
    userinfo_endpoint string false - -
    jwks_uri string false - -
    otp_url string false - -
    issuer string false - -
    keys object false - -
     keys [object] false - -
     keys_date string(date-time) false - -

Test VPN Identity Settings

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/identity/vpn/test \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.post_test_identity_v_p_n_settings(
    provider=provider,
    host=host,
    port=port,
    encrypt=encrypt,
    encrypt_ldaps=encrypt_ldaps,
    encrypt_auth=encrypt_auth,
    encrypt_verify_ca=encrypt_verify_ca,
    binddn=binddn,
    bindpw=bindpw,
    auth_cert=auth_cert,
    auth_cert_current=auth_cert_current,
    auth_key=auth_key,
    auth_key_current=auth_key_current,
    ca_cert=ca_cert,
    ca_cert_current=ca_cert_current)

print(api_response.json())

POST /identity/vpn/test

Test VPN Identity settings

Body parameter

{
  "provider": "string",
  "host": "string",
  "port": 389,
  "encrypt": false,
  "encrypt_ldaps": true,
  "encrypt_auth": false,
  "encrypt_verify_ca": false,
  "binddn": "string",
  "bindpw": "string",
  "auth_cert": "string",
  "auth_cert_current": false,
  "auth_key": "string",
  "auth_key_current": false,
  "ca_cert": "string",
  "ca_cert_current": false
}

Parameters

Name In Type Required Description
provider body string true Currently only ldap is supported for testing
host body string false IP address or resolvable hostname of LDAP server
port body integer false Port for LDAP
encrypt body boolean false Use SSL
encrypt_ldaps body boolean false Use LDAPS or start TLS (default)?
encrypt_auth body boolean false Use certificates to authenticate via encrypted connection
encrypt_verify_ca body boolean false Verify certicate using authority
binddn body string false Bind Username
bindpw body string false Bind Password
auth_cert body string false Authentication certificate text content to use
auth_cert_current body boolean false Test with current uploaded authentication certificate?
auth_key body string false Authentication key text content to use
auth_key_current body boolean false Test with current uploaded authentication key?
ca_cert body string false CA certificate text content to use
ca_cert_current body boolean false Test with current uploaded CA certificate?

Example responses

200 Response

{
  "response": {
    "connect_success": true,
    "message": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

Name Type Required Constraints Description
  response object false - -
   connect_success boolean false - -
   message string false - -

Update Controller Identity settings

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/identity/controller \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.put_identity_controller_settings()

print(api_response.json())

PUT /identity/controller

Put Controller Identity settings

Body parameter

{
  "host": "string",
  "port": 0,
  "encrypt": true,
  "encrypt_ldaps": true,
  "encrypt_auth": true,
  "encrypt_auth_key": true,
  "encrypt_auth_cert": true,
  "encrypt_verify_ca": true,
  "encrypt_ca_cert": true,
  "binddn": "string",
  "bindpw": "string",
  "encrypt_auth_cert_data": "string",
  "encrypt_auth_cert_filename": "tls.cert",
  "encrypt_auth_key_data": "string",
  "encrypt_auth_key_filename": "tls.key",
  "encrypt_ca_cert_data": "string",
  "encrypt_ca_cert_filename": "ca.pem",
  "user_base": "string",
  "user_id_attribute": "string",
  "user_list_filter": "string",
  "group_base": "string",
  "group_id_attribute": "string",
  "group_list_filter": "string",
  "group_member_attribute": "string",
  "group_member_attr_format": "string",
  "group_search_scope": "string",
  "otp": true,
  "otp_url": "string",
  "provider": "string",
  "enabled": true
}

Example responses

200 Response

{
  "response": {
    "host": "string",
    "port": 0,
    "encrypt": true,
    "encrypt_ldaps": true,
    "encrypt_auth": true,
    "encrypt_auth_key": true,
    "encrypt_auth_cert": true,
    "encrypt_verify_ca": true,
    "encrypt_ca_cert": true,
    "binddn": "string",
    "bindpw": "string",
    "encrypt_auth_cert_data": "string",
    "encrypt_auth_cert_filename": "tls.cert",
    "encrypt_auth_key_data": "string",
    "encrypt_auth_key_filename": "tls.key",
    "encrypt_ca_cert_data": "string",
    "encrypt_ca_cert_filename": "ca.pem",
    "user_base": "string",
    "user_id_attribute": "string",
    "user_list_filter": "string",
    "group_base": "string",
    "group_id_attribute": "string",
    "group_list_filter": "string",
    "group_member_attribute": "string",
    "group_member_attr_format": "string",
    "group_search_scope": "string",
    "otp": true,
    "otp_url": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IdentitySettingsResponse

Name Type Required Constraints Description
  response any false - -

oneOf

Name Type Required Constraints Description
   any object false - -
    host string false - IP address or resolvable hostname
    port integer false - -
    encrypt boolean false - Use SSL
    encrypt_ldaps boolean false - Use LDAPS or start TLS
    encrypt_auth boolean false - Use certificates to authenticate via encrypted connection
    encrypt_auth_key boolean false - -
    encrypt_auth_cert boolean false - -
    encrypt_verify_ca boolean false - Verify certicate using authority
    encrypt_ca_cert boolean false - -
    binddn string false - Bind username
    bindpw string false - Bind password
    encrypt_auth_cert_data string false - Authentication certificate text content to use, empty to delete
    encrypt_auth_cert_filename string false - Authentication certificate filename
    encrypt_auth_key_data string false - Authentication key text content to use, empty to delete
    encrypt_auth_key_filename string false - Authentication key filename
    encrypt_ca_cert_data string false - CA certificate text content to use, empty to delete
    encrypt_ca_cert_filename string false - CA certificate filename
    user_base string false - Base DN from which to search for Users
    user_id_attribute string false - Attribute type for the Users
    user_list_filter string false - Search filter for Users
    group_base string false - Base DN from which to search for Groups
    group_id_attribute string false - Attribute type for the Groups
    group_list_filter string false - Search filter for Groups
    group_member_attribute string false - Attribute used to search for a user within the Group
    group_member_attr_format string false - UserID or UserDN
    group_search_scope string false - base, single or subtree
    otp boolean false - Use OTP code
    otp_url string false - -

xor

Name Type Required Constraints Description
   any object false - -
    enabled boolean false - -
    provider string false - -
    identifier string false - -
    secret string false - -
    redirect_hostname string false - -
    authorization_endpoint string false - -
    token_endpoint string false - -
    userinfo_endpoint string false - -
    jwks_uri string false - -
    otp_url string false - -
    issuer string false - -
    keys object false - -
     keys [object] false - -
     keys_date string(date-time) false - -

Test Controller Identity Settings. Currently only LDAP testing is supported.

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/identity/controller/test \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.access.post_test_identity_controller_settings(
    provider=provider,
    host=host,
    port=port,
    encrypt=encrypt,
    encrypt_ldaps=encrypt_ldaps,
    encrypt_auth=encrypt_auth,
    encrypt_verify_ca=encrypt_verify_ca,
    binddn=binddn,
    bindpw=bindpw,
    auth_cert=auth_cert,
    auth_cert_current=auth_cert_current,
    auth_key=auth_key,
    auth_key_current=auth_key_current,
    ca_cert=ca_cert,
    ca_cert_current=ca_cert_current)

print(api_response.json())

POST /identity/controller/test

Test Controller Identity settings

Body parameter

{
  "provider": "string",
  "host": "string",
  "port": 389,
  "encrypt": false,
  "encrypt_ldaps": true,
  "encrypt_auth": false,
  "encrypt_verify_ca": false,
  "binddn": "string",
  "bindpw": "string",
  "auth_cert": "string",
  "auth_cert_current": false,
  "auth_key": "string",
  "auth_key_current": false,
  "ca_cert": "string",
  "ca_cert_current": false
}

Parameters

Name In Type Required Description
provider body string true Currently only ldap is supported for testing
host body string false IP address or resolvable hostname of LDAP server
port body integer false Port for LDAP
encrypt body boolean false Use SSL
encrypt_ldaps body boolean false Use LDAPS or start TLS (default)?
encrypt_auth body boolean false Use certificates to authenticate via encrypted connection
encrypt_verify_ca body boolean false Verify certicate using authority
binddn body string false Bind Username
bindpw body string false Bind Password
auth_cert body string false Authentication certificate text content to use
auth_cert_current body boolean false Test with current uploaded authentication certificate?
auth_key body string false Authentication key text content to use
auth_key_current body boolean false Test with current uploaded authentication key?
ca_cert body string false CA certificate text content to use
ca_cert_current body boolean false Test with current uploaded CA certificate?

Example responses

200 Response

{
  "response": {
    "connect_success": true,
    "message": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

Name Type Required Constraints Description
  response object false - -
   connect_success boolean false - -
   message string false - -

Configuration

VNS3 configuration such as licensing, VNS3:Management System, SSL certs and keyset generation

Update UI Settings

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/admin_ui \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_update_admin_ui(
    enabled=enabled,
    admin_username=admin_username,
    admin_password=admin_password)

print(api_response.json())

PUT /admin_ui

Update Admin UI settings. Enable/Disable and set credentials.

Body parameter

{
  "enabled": true,
  "admin_username": "string",
  "admin_password": "string"
}

Parameters

Name In Type Required Description
enabled body boolean false -
admin_username body string false -
admin_password body string false -

Example responses

200 Response

{
  "response": {
    "enabled": true,
    "username": "vnscubed_user"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348220177382578437853325229350053485636",
    "message": "admin_username is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

AdminUISettingsDetail

Name Type Required Constraints Description
  response object false - -
   enabled boolean false - -
   username string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update API password

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/api_password \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_update_api_password(
    password=password)

print(api_response.json())

PUT /api_password

Allows you to change the API password/secret key. To change the Web UI password (or username) use PUT admin_ui.

Body parameter

{
  "password": "string"
}

Parameters

Name In Type Required Description
password body string false -

Example responses

200 Response

{
  "response": {
    "password_reset": "ok"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348220177382578437853325229350053485636",
    "message": "Invalid password"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

PasswordResetResponse

Name Type Required Constraints Description
  response object false - -
   password_reset string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Runtime Config

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/config \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.get_config()

print(api_response.json())

GET /config

Describe Runtime Configuration for VNS3 Controller

Example responses

200 Response

{
  "response": {
    "asn": 65001,
    "topology_name": "Cohesive",
    "controller_name": "Controller 1",
    "topology_checksum": "a04a92073a4f6f32a2abce45439a2d8c016334dc",
    "manager_id": 1,
    "ntp_hosts": "0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org ntp.ubuntu.com time.apple.com",
    "vns3_version": "4.5.0",
    "licensed": true,
    "overlay_ipaddress": "172.31.0.100",
    "peered": true,
    "public_ipaddress": "50.240.142.209",
    "private_ipaddress": "192.168.30.247"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Get runtime Configuration details Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

ConfigDetail

Name Type Required Constraints Description
  response object false - -
   asn integer false - Autonomous system number for controller if peered
   topology_name string false - -
   controller_name string false - -
   topology_checksum string false - -
   manager_id integer false - This managers ID in peered topology
   ntp_hosts string false - NTP host endpoints, whitespace delimited
   vns3_version string false - -
   licensed boolean false - -
   overlay_ipaddress string false - This managers overlay IP in peered topology
   peered boolean false - -
   public_ipaddress string false - -
   subnet_gateway string false - -
   private_ipaddress string false - -
   security_token string false - Security token in peered topology

Update Config

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/config \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_config(
    topology_name=topology_name,
    controller_name=controller_name,
    ntp_hosts=ntp_hosts)

print(api_response.json())

PUT /config

Provides general information about the manager's topology, license state and checksums and allows you to set the topology name.

Body parameter

{
  "topology_name": "string",
  "controller_name": "string",
  "ntp_hosts": "string"
}

Parameters

Name In Type Required Description
topology_name body string false Specifies a text name to display at the top of the web ui and in the desc_config API response
controller_name body string false Specifies a text name for this controller
ntp_hosts body string false Single or space separated list of ntp server IPs or dns names. Using this argument overwrites the existing Configuration.

Example responses

200 Response

{
  "response": {
    "asn": 0,
    "topology_name": "string",
    "controller_name": "string",
    "topology_checksum": "string",
    "manager_id": 1,
    "ntp_hosts": "string",
    "vns3_version": "string",
    "licensed": true,
    "overlay_ipaddress": "string",
    "peered": true,
    "public_ipaddress": "string",
    "subnet_gateway": "string",
    "private_ipaddress": "string",
    "security_token": "string"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348220177382578437853325229350053485636",
    "message": "ntp_hosts is not in proper domain name format or ipv4 address format. Update abandoned."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

ConfigDetail

Name Type Required Constraints Description
  response object false - -
   asn integer false - Autonomous system number for controller if peered
   topology_name string false - -
   controller_name string false - -
   topology_checksum string false - -
   manager_id integer false - This managers ID in peered topology
   ntp_hosts string false - NTP host endpoints, whitespace delimited
   vns3_version string false - -
   licensed boolean false - -
   overlay_ipaddress string false - This managers overlay IP in peered topology
   peered boolean false - -
   public_ipaddress string false - -
   subnet_gateway string false - -
   private_ipaddress string false - -
   security_token string false - Security token in peered topology

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get SSL Certs

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/system/ssl \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.get_s_s_l_certs()

print(api_response.json())

GET /system/ssl

Get SSL Certificates

Example responses

200 Response

{
  "response": {
    "certs": [
      {
        "subject": "string",
        "issuer": "string",
        "before": "string",
        "after": "string",
        "algorithm": "string",
        "sha1_fingerprint": "string",
        "sha256_fingerprint": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Get VNS3:ms alert success Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SSLCertsResponse

Name Type Required Constraints Description
  response object false - -
   certs [object] false - -
    SSLCert object false - -
     subject string false - -
     issuer string false - -
     before string false - -
     after string false - -
     algorithm string false - -
     sha1_fingerprint string false - -
     sha256_fingerprint string false - -

Upload SSL certs

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/system/ssl/keypair \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_upload_ssl_keypair(
    cert=cert,
    key=key)

print(api_response.json())

PUT /system/ssl/keypair

Upload new SSL cert and key pair

Body parameter

{
  "cert": "string",
  "key": "string"
}

Parameters

Name In Type Required Description
cert body string true -
key body string true -

Example responses

200 Response

{
  "response": "Valid key/cert files uploaded"
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "cert is missing, key is missing"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Install SSL certs

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/system/ssl/install \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_install_ssl_keypair()

print(api_response.json())

PUT /system/ssl/install

Install SSL cert and key pair

Example responses

200 Response

{
  "response": {
    "status": "SSL Cert installation queued",
    "uuid": "10923jnowfdhgu039jon4r09201"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "cert is missing, key is missing"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ServerSSLDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   status string false - -
   state string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get SSL Install Status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/system/ssl/install/{uuid} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.get_ssl_install_status(uuid)

print(api_response.json())

GET /system/ssl/install/{uuid}

Get status for ssl installation task

Parameters

Name In Type Required Description
uuid path string true uuid of resource

Example responses

200 Response

{
  "response": {
    "uuid": "19230109239012390129031012312",
    "status": "Job pending",
    "state": "pending"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Unknown Job ID: 1234"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

ServerSSLDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   status string false - -
   state string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Variable Collections

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/system/variable-collections \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.get_variable_collections(
    collections=collections)

print(api_response.json())

GET /system/variable-collections

Get system variable collections

Parameters

Name In Type Required Description
collections query string false filter variables by collections (accepts csv A,B,C)

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "prefix": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

VariableCollectionsListResponse

Name Type Required Constraints Description
  response [object] false - -
   name string false - -
   prefix string false - variable name prefix. All variables in collection start with prefix.

Get Variables

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/system/variables \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.get_variables()

print(api_response.json())

GET /system/variables

Get system variables grouped by collections

Example responses

200 Response

{
  "response": {
    "property1": [
      {
        "variable": "string",
        "description": "string",
        "value": "string"
      }
    ],
    "property2": [
      {
        "variable": "string",
        "description": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

VariablesListResponse

Name Type Required Constraints Description
  response object false - lists of variables grouped by collection
   additionalProperties [object] false - -
    Variable object false - -
     variable string false - resolvable variable name
     description string false - -
     value string false - value that the variable resolves to

Create Variable

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/system/variables \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.post_create_custom_variable(
    name=name,
    value=value,
    description=description)

print(api_response.json())

POST /system/variables

Create custom variable

Body parameter

{
  "name": "string",
  "value": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
name body string true -
value body string true -
description body string false -

Example responses

201 Response

{
  "response": {
    "property1": [
      {
        "variable": "string",
        "description": "string",
        "value": "string"
      }
    ],
    "property2": [
      {
        "variable": "string",
        "description": "string",
        "value": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Invalid name. Names can only contain alphanumeric characters and underscores."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
201 Created OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 201

VariablesListResponse

Name Type Required Constraints Description
  response object false - lists of variables grouped by collection
   additionalProperties [object] false - -
    Variable object false - -
     variable string false - resolvable variable name
     description string false - -
     value string false - value that the variable resolves to

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update Variable

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/system/variables/{name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_update_custom_variable(name,
    value=value,
    description=description)

print(api_response.json())

PUT /system/variables/{name}

Update custom variable value

Body parameter

{
  "value": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
name path string true name of variable
value body string false -
description body string false -

Example responses

200 Response

{
  "response": {
    "variable": "string",
    "description": "string",
    "value": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

VariableDetailResponse

Name Type Required Constraints Description
  response object false - -
   variable string false - resolvable variable name
   description string false - -
   value string false - value that the variable resolves to

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Variable

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/system/variables/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.delete_custom_variable(name)

print(api_response.json())

DELETE /system/variables/{name}

Delete custom variable

Parameters

Name In Type Required Description
name path string true name of variable

Example responses

200 Response

{
  "response": {
    "property1": [
      {
        "variable": "string",
        "description": "string",
        "value": "string"
      }
    ],
    "property2": [
      {
        "variable": "string",
        "description": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Custom variable foo does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

VariablesListResponse

Name Type Required Constraints Description
  response object false - lists of variables grouped by collection
   additionalProperties [object] false - -
    Variable object false - -
     variable string false - resolvable variable name
     description string false - -
     value string false - value that the variable resolves to

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Keyset

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/keyset \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.undefined.get_keyset()

print(api_response.json())

GET /keyset

Returns topology keyset details. The keyset is a set of cryptographic credentials used for encrypting all data on the overlay network.

Example responses

200 Response

{
  "response": {
    "keyset_present": true,
    "created_at": "2019-07-19T19:44:02.191+00:00",
    "created_at_i": 1563565442,
    "checksum": "6093b865464ec3f7ab7213975c3b952763d1df14",
    "uuid": "8effb1ea-aa5d-11e9-aaf4-02935c82307a"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

KeysetDetail

Name Type Required Constraints Description
  response object false - -
   in_progress boolean false - -
   running integer false - -
   keyset_present boolean false - -
   checksum string false - -
   created_at string false - -
   created_at_i integer false - -
   started_at string false - -
   started_at_i integer false - -
   uuid string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Generate Keyset

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/keyset \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.put_keyset(
    source=source,
    token=token,
    topology_name=topology_name)

print(api_response.json())

PUT /keyset

Generate keyset The keyset is a set of cryptographic credentials used for encrypting all data on the overlay network. Keyset generation happens in background. Poll on GET /keyset in_progress value for keyset status.

Body parameter

{
  "source": "string",
  "token": "string",
  "topology_name": "string"
}

Parameters

Name In Type Required Description
source body string false If provided, fetches keyset from source manager
token body string true Arbitrary key used to help randomize the checksum, it must be identical for each manager in a topology.
topology_name body string false Name for the topology

Example responses

200 Response

{
  "response": {
    "keyset_preset": false,
    "in_progress": true,
    "started_at": "2019-07-19T19:43:00.147+00:00",
    "started_at_i": 1563565380,
    "running": 0
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "token is missing"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

KeysetDetail

Name Type Required Constraints Description
  response object false - -
   in_progress boolean false - -
   running integer false - -
   keyset_present boolean false - -
   checksum string false - -
   created_at string false - -
   created_at_i integer false - -
   started_at string false - -
   started_at_i integer false - -
   uuid string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get License Details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/license \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.licensing.get_license()

print(api_response.json())

GET /license

Get license details

Example responses

200 Response

{
  "response": {
    "capabilities": [
      "string"
    ],
    "finalized": true,
    "my_manager_vip": "string",
    "license": "string",
    "license_present": true,
    "sha1_checksum": "string",
    "uploaded_at": "string",
    "custom_addressing": true,
    "uploaded_at_i": 0,
    "container_details": {
      "containers_run_count": 0,
      "containers_image_count": 0
    },
    "topology": {
      "clients": [
        {
          "ip_address": "string",
          "octets": [
            0
          ]
        }
      ],
      "managers": [
        {
          "asn": 0,
          "manager_id": 1,
          "overlay_ipaddress": {
            "ip_address": "string",
            "octets": [
              0
            ]
          }
        }
      ],
      "total_clients": 0,
      "ipsec_max_subnets": 0,
      "ipsec_max_endpoints": 0,
      "license_upgrades": [
        "string"
      ],
      "overlay_max_clients": 0,
      "overlay_subnet": "string"
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "9009012801280138018910283081301390103",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Get license topology details Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

LicenseDetail

Name Type Required Constraints Description
  response object false - -
   capabilities [string] false - Features available such as eBGP, CloudWAN etc.
   finalized boolean false - -
   my_manager_vip string false - -
   license string false - State of license, accepted, in-progress, failed
   license_present boolean false - -
   sha1_checksum string false - -
   uploaded_at string false - -
   custom_addressing boolean false - -
   uploaded_at_i integer false - -
   container_details object false - -
    containers_run_count integer false - -
    containers_image_count integer false - -
   topology object false - -
    clients [object] false - IPs for clientpacks
     ip_address string false - -
     octets [integer] false - -
    managers [object] false - -
     VNS3Controller object false - -
      asn integer false - -
      manager_id integer false - -
      overlay_ipaddress object false - -
       ip_address string false - -
       octets [integer] false - -
    total_clients integer false - -
    ipsec_max_subnets integer false - -
    ipsec_max_endpoints integer false - -
    license_upgrades [string] false - -
    overlay_max_clients integer false - -
    overlay_subnet string false - CIDR for overlay clients

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Upload License

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/license \
  -H 'Content-Type: text/plain' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.licensing.upload_license()

print(api_response.json())

PUT /license

License a VNS3 Controller to be a part of a specific topology. Must not be licensed already.

Body parameter

string

Example responses

200 Response

{
  "response": {
    "capabilities": [
      "string"
    ],
    "finalized": true,
    "license": "string",
    "license_present": true,
    "default_topology": {
      "clients": [
        {
          "ip_address": "string",
          "octets": [
            0
          ]
        }
      ],
      "managers": [
        {
          "asn": 0,
          "manager_id": 1,
          "overlay_ipaddress": {
            "ip_address": "string",
            "octets": [
              0
            ]
          }
        }
      ],
      "total_clients": 0,
      "ipsec_max_subnets": 0,
      "ipsec_max_endpoints": 0,
      "license_upgrades": [
        "string"
      ],
      "overlay_max_clients": 0,
      "overlay_subnet": "string"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348220177382578437853325229350053485636",
    "message": "Bad license"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Upload license response Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

InitLicenseDetail

Name Type Required Constraints Description
  response object false - -
   capabilities [string] false - Features available such as eBGP, CloudWAN, Containers etc.
   finalized boolean false - -
   license string false - State of license, accepted, in-progress, failed
   license_present boolean false - -
   default_topology object false - -
    clients [object] false - IPs for clientpacks
     ip_address string false - -
     octets [integer] false - -
    managers [object] false - -
     VNS3Controller object false - -
      asn integer false - -
      manager_id integer false - -
      overlay_ipaddress object false - -
       ip_address string false - -
       octets [integer] false - -
    total_clients integer false - -
    ipsec_max_subnets integer false - -
    ipsec_max_endpoints integer false - -
    license_upgrades [string] false - -
    overlay_max_clients integer false - -
    overlay_subnet string false - CIDR for overlay clients

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Set License Parameters

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/license/parameters \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.licensing.put_set_license_parameters(
    subnet=subnet,
    managers=managers,
    asns=asns,
    clients=clients,
    my_manager_vip=my_manager_vip,
    default=default)

print(api_response.json())

PUT /license/parameters

Set and accept license parameters. Triggers reboot. Irreversible operation.

Body parameter

{
  "subnet": "string",
  "managers": "string",
  "asns": "string",
  "clients": "string",
  "my_manager_vip": "string",
  "default": false
}

Parameters

Name In Type Required Description
subnet body string false Specifies the CIDR of the virtual network created for use with the VNS3 Manager
managers body string false Whitespace delimited address string in the subnet to use for the VNS3 Controllers' virtual interfaces.
asns body string false Whitespace delimited string of ASNs (autonomous system numbers) corresponding to the order of the controllers
clients body string false Comma delimited, or hyphenated sequence of addresses for use as client addresses in the virtual network.
my_manager_vip body string false IPAddress that must be allocated from the subnet, and be the same for all controllers
default body boolean false Specifices whether to use defualt topology addressing as specified by the license

Example responses

200 Response

{
  "response": {
    "license": "string",
    "finalized": true,
    "parameters": {
      "subnet": "string",
      "controllers": [
        "string"
      ],
      "managers": [
        "string"
      ],
      "clients": [
        "string"
      ],
      "asns": [
        0
      ],
      "my_manager_vip": "string"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "invalid asns field"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Put new license parameters for topology Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

LicenseParametersDetail

Name Type Required Constraints Description
  response object false - -
   license string false - -
   finalized boolean false - -
   parameters object false - -
    subnet string false - -
    controllers [string] false - IP addresses of VNS3 controllers in topology
    managers [string] false - IP addresses of VNS3 controllers in topology
    clients [string] false - IP addresses of clients in topology
    asns [integer] false - ASNs used by controllers in topology
    my_manager_vip string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Upgrade License

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/license/upgrade \
  -H 'Content-Type: text/plain' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.licensing.put_license_upgrade()

print(api_response.json())

PUT /license/upgrade

Upload new license to controller

Body parameter

string

Example responses

200 Response

{
  "response": {
    "finalized": true,
    "uniq": "string",
    "license": "string",
    "new_clientpacks": 0,
    "new_managers": 0
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK New license parameters Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

UpgradeLicenseResponse

Name Type Required Constraints Description
  response object false - -
   finalized boolean false - -
   uniq string false - new sha1 hash of license
   license string false - State of license, accepted, in-progress, failed
   new_clientpacks integer false - -
   new_managers integer false - -

Get MS Config

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/ms \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.get_ms_config(
    ip=ip)

print(api_response.json())

GET /ms

Get MS configuration

Parameters

Name In Type Required Description
ip query string false name of resource

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "url": "string",
    "enabled": true,
    "webhook_id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "events": [
      "string"
    ],
    "custom_properties": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Get VNS3:ms alert success Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

AlertDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   url string¦null false - -
   enabled boolean false - -
   webhook_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   events [string] false - -
   custom_properties [object] false - -
    name string false - -
    value string false - -

Set MS

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ms \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.post_set_ms_config(
    ip=ip)

print(api_response.json())

POST /ms

Set VNS3 Management System endpoint

Body parameter

{
  "ip": "string"
}

Parameters

Name In Type Required Description
ip body string true VNS3 Management system endpoint IP address

Example responses

200 Response

{
  "response": {
    "ip": "string",
    "alert_enabled": true
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

MSConfig

Name Type Required Constraints Description
  response object false - -
   ip string false - IP address of VNS3 Management Systems
   alert_enabled boolean false - Enable alerting to MS

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update MS Config

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ms \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.update_ms_config(
    ip=ip,
    alert_enabled=alert_enabled)

print(api_response.json())

PUT /ms

Update VNS3 Management System integration

Body parameter

{
  "ip": "string",
  "alert_enabled": true
}

Parameters

Name In Type Required Description
ip body string false VNS3 Management system endpoint IP address
alert_enabled body boolean true Disable/Enable sending alerts to VNS3:ms

Example responses

200 Response

{
  "response": {
    "ip": "string",
    "alert_enabled": true
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

MSConfig

Name Type Required Constraints Description
  response object false - -
   ip string false - IP address of VNS3 Management Systems
   alert_enabled boolean false - Enable alerting to MS

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Send test VNS3:ms alert

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ms/alert/test \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.config.post_send_test_ms_alert()

print(api_response.json())

POST /ms/alert/test

Send test alert to VNS3:ms

Example responses

200 Response

{
  "response": true
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SimpleBooleanResponse

Name Type Required Constraints Description
  response boolean false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

IPsec

Control and manage your IPSec tunnels

Get IPsec status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status/ipsec \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.get_ipsec_status(
    up_down_status_only=up_down_status_only)

print(api_response.json())

GET /status/ipsec

Describe ipsec tunnels status

Parameters

Name In Type Required Description
up_down_status_only query boolean false Only retrieve tunnel status. True is more performant but has less info. Defaults to false.

Example responses

200 Response

{
  "response": {
    "property1": {
      "id": 1,
      "local_subnet": "string",
      "remote_subnet": "string",
      "endpointid": 1,
      "endpoint_id": 1,
      "endpoint_name": "string",
      "enabled": true,
      "active": true,
      "description": "string",
      "bounce": true,
      "connected": true,
      "ping_interface": "eth0",
      "ping_interval": 0,
      "ping_ipaddress": "string",
      "tunnel_params": {
        "phase2": "string",
        "outbound_spi": "string",
        "inbound_spi": "string",
        "bytes_in": "string",
        "bytes_out": "string",
        "esp_time_remaining": "string",
        "esp_port": "string",
        "phase2_algo": "string",
        "phase2_hash": "string",
        "nat_t": "string",
        "dpd": "string",
        "pfs_dh_group": "string",
        "phase1": "string",
        "isakmp_port": "string",
        "isakmp_time_remaining": "string",
        "last_dpd": "string",
        "phase1_cipher": "string",
        "phase1_prf": "string",
        "phase1_dh_group": "string",
        "ike_version": "string"
      }
    },
    "property2": {
      "id": 1,
      "local_subnet": "string",
      "remote_subnet": "string",
      "endpointid": 1,
      "endpoint_id": 1,
      "endpoint_name": "string",
      "enabled": true,
      "active": true,
      "description": "string",
      "bounce": true,
      "connected": true,
      "ping_interface": "eth0",
      "ping_interval": 0,
      "ping_ipaddress": "string",
      "tunnel_params": {
        "phase2": "string",
        "outbound_spi": "string",
        "inbound_spi": "string",
        "bytes_in": "string",
        "bytes_out": "string",
        "esp_time_remaining": "string",
        "esp_port": "string",
        "phase2_algo": "string",
        "phase2_hash": "string",
        "nat_t": "string",
        "dpd": "string",
        "pfs_dh_group": "string",
        "phase1": "string",
        "isakmp_port": "string",
        "isakmp_time_remaining": "string",
        "last_dpd": "string",
        "phase1_cipher": "string",
        "phase1_prf": "string",
        "phase1_dh_group": "string",
        "ike_version": "string"
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

IpsecTunnelListResponseKeyValue

Name Type Required Constraints Description
  response object false - Ipsec tunnel details keyed by ID
   IpsecTunnel object false - -
    id integer false - -
    local_subnet string false - -
    remote_subnet string false - -
    endpointid integer false - -
    endpoint_id integer false - -
    endpoint_name string false - -
    enabled boolean false - -
    active boolean false - -
    description string¦null false - -
    bounce boolean false - True if tunnel was just bounced
    connected boolean false - -
    ping_interface string false - -
    ping_interval integer¦null false - Interval for ping in seconds
    ping_ipaddress string false - -
    tunnel_params object false - -
     phase2 string false - -
     outbound_spi string false - -
     inbound_spi string false - -
     bytes_in string false - -
     bytes_out string false - -
     esp_time_remaining string false - -
     esp_port string false - -
     phase2_algo string false - -
     phase2_hash string false - -
     nat_t string false - -
     dpd string false - -
     pfs_dh_group string¦null false - -
     phase1 string false - -
     isakmp_port string false - -
     isakmp_time_remaining string false - -
     last_dpd string false - -
     phase1_cipher string¦null false - -
     phase1_prf string¦null false - -
     phase1_dh_group string¦null false - -
     ike_version string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status/link_history \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.get_ipsec_link_history(
    remote=remote,
    local=local,
    tunnelid=tunnelid)

print(api_response.json())

GET /status/link_history

Provides information about the connection history of the subnet or tunnel

Name In Type Required Description
remote query string false Address string in CIDR format to display link history to a remote endpoint.
local query string false Address string in CIDR format which will display status of the local route
tunnelid query integer false Will display link history of just the tunnel specified, which may be only one tunnel to a remote endpoint.

Example responses

200 Response

{
  "response": {
    "remote": "string",
    "local": "string",
    "tunnelid": 1,
    "history": [
      {
        "event": "string",
        "timestamp": "string",
        "timestamp_i": 0
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564152672558671466135091328226684573894656",
    "message": "bad or invalid remote"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}
Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Status Code 200

LinkHistoryDetail

Name Type Required Constraints Description
  response object false - -
   remote string false - -
   local string false - -
   tunnelid integer false - -
   history [object] false - -
    LinkEvent object false - -
     event string false - Tunnel event, up or down
     timestamp string false - -
     timestamp_i integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get connected subnets

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status/connected_subnets \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.get_connected_subnets(
    extended_output=extended_output)

print(api_response.json())

GET /status/connected_subnets

Provides information about any connected subnets.

Parameters

Name In Type Required Description
extended_output query boolean false Receive verbose information about resources

Example responses

200 Response

{
  "response": [
    [
      "string"
    ]
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

ConnectedSubnetsDetailResponse

Name Type Required Constraints Description
  response any false - -

oneOf

Name Type Required Constraints Description
   any [array] false - Array of arrays with each element of length 2 representing [network, subnet mask]

xor

Name Type Required Constraints Description
   any [object] false - -
    ConnectedSubnet object false - -
     subnet string false - -
     network string false - -
     cidr_mask string false - -
     managerid integer false - -
     netmask string false - -
     origin string false - ipsec, local_no_encryption, remote_manager, or ebgp

Get IPsec details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/ipsec \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.get_ipsec_details()

print(api_response.json())

GET /ipsec

Get details for all IPsec endpoints/subnets

Example responses

200 Response

{
  "response": {
    "this_endpoint": {
      "ipaddress": "3.222.68.251",
      "overlay_subnet": "100.127.255.192/26",
      "private_ipaddress": "192.168.1.230",
      "ipsec_local_ipaddress": "192.168.1.230",
      "asn": 65001
    },
    "remote_endpoints": {}
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecSystemDetail

Name Type Required Constraints Description
  response object false - -
   this_endpoint object false - -
    nat_traversal boolean false - -
    ipaddress string false - -
    overlay_subnet string false - -
    private_ipaddress string false - -
    ipsec_local_ipaddress string false - -
    asn integer false - -
   remote_endpoints object false - -
    IpsecRemoteEndpoint object false - -
     id integer false - -
     name string false - -
     ipaddress string false - -
     description string false - -
     nat_t_enabled boolean false - -
     ike_version integer false - -
     pfs boolean false - Perfect forward secrecy enabled
     private_ipaddress string false - -
     extra_config [string] false - -
     tunnels object false - -
      IpsecTunnel object false - -
       id integer false - -
       local_subnet string false - -
       remote_subnet string false - -
       endpointid integer false - -
       endpoint_id integer false - -
       endpoint_name string false - -
       enabled boolean false - -
       active boolean false - -
       description string¦null false - -
       bounce boolean false - True if tunnel was just bounced
       connected boolean false - -
       ping_interface string false - -
       ping_interval integer¦null false - Interval for ping in seconds
       ping_ipaddress string false - -
       tunnel_params object false - -
        phase2 string false - -
        outbound_spi string false - -
        inbound_spi string false - -
        bytes_in string false - -
        bytes_out string false - -
        esp_time_remaining string false - -
        esp_port string false - -
        phase2_algo string false - -
        phase2_hash string false - -
        nat_t string false - -
        dpd string false - -
        pfs_dh_group string¦null false - -
        phase1 string false - -
        isakmp_port string false - -
        isakmp_time_remaining string false - -
        last_dpd string false - -
        phase1_cipher string¦null false - -
        phase1_prf string¦null false - -
        phase1_dh_group string¦null false - -
        ike_version string false - -
     traffic_pairs object false - -
      IpsecEndpointTrafficPair object false - -
       id integer false - -
       remote_subnet string false - -
       local_subnet string false - -
       ping_ipaddress string¦null false - -
       ping_interface string false - -
       ping_interval integer false - -
       enabled boolean false - -
       description string¦null false - -
       ipsec_endpoint_id integer false - -
       endpoint_id integer false - -
       created_at string(date-time) false - -
       updated_at string(date-time) false - -
     bgp_peers object false - -
      BGPPeer object false - -
       id integer false - -
       asn integer false - -
       ipaddress string false - -
       access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
       local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
       keepalive_interval integer false - Interval for checking if BGP peers are still alive
       hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
       bgp_password string false - -
       add_network_distance boolean false - -
       add_network_distance_direction string false - in or out
       add_network_distance_hops integer false - -
       connection_detail string false - -
     type string false - Indicating Ipsec or GRE over ipsec
     vpn_type string false - -
     gre_interface_address string false - -
     route_based_int_address string false - -
     route_based_local string false - -
     route_based_remote string false - -
     psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Restart ipsec subystem

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ipsec \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.post_restart_ipsec_action(
    restart=restart)

print(api_response.json())

POST /ipsec

Restart ipsec subystem

Body parameter

{
  "restart": true
}

Parameters

Name In Type Required Description
restart body boolean true Restarts target system on server if true

Example responses

200 Response

{
  "response": {
    "restart": true
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "restart is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

RestartStatus

Name Type Required Constraints Description
  response object false - -
   restart boolean false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update IPsec config

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.put_update_ipsec_config(
    ipsec_local_ipaddress=ipsec_local_ipaddress,
    async=async)

print(api_response.json())

PUT /ipsec

Edit Ipsec Configuration on device. Note, This is device wide and must be set before any remote endpoint definitions are created. If it needs to be changed, all remote endpoint information and tunnel information must be deleted first.

Body parameter

{
  "ipsec_local_ipaddress": "string",
  "async": false
}

Parameters

Name In Type Required Description
ipsec_local_ipaddress body string true This is effectively a "cloud NAT" address, since you don't know what your LAN address will be between invocations in a cloud, this address can be used by remote endpoints as your "behind a NAT" address, sometimes referred to Peer or IKE ID, if needed (e.g. Watchguard or Juniper). It can ALSO be thought of even more simply as an IPsec "loopback" interface that you can use to terminate traffic.
async body boolean false Return a task token waiting for IPsec configuration update, default is false, meaning the request will block

Example responses

200 Response

{
  "response": {
    "this_endpoint": {
      "nat_traversal": true,
      "ipaddress": "string",
      "overlay_subnet": "string",
      "private_ipaddress": "string",
      "ipsec_local_ipaddress": "string",
      "asn": 0
    },
    "remote_endpoints": {
      "property1": {
        "id": 1,
        "name": "string",
        "ipaddress": "string",
        "description": "string",
        "nat_t_enabled": true,
        "ike_version": 0,
        "pfs": true,
        "private_ipaddress": "string",
        "extra_config": [
          "string"
        ],
        "tunnels": {
          "property1": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          },
          "property2": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          }
        },
        "traffic_pairs": {
          "property1": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          },
          "property2": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          }
        },
        "bgp_peers": {
          "property1": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          },
          "property2": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          }
        },
        "type": "string",
        "vpn_type": "string",
        "gre_interface_address": "string",
        "route_based_int_address": "string",
        "route_based_local": "string",
        "route_based_remote": "string",
        "psk": "string"
      },
      "property2": {
        "id": 1,
        "name": "string",
        "ipaddress": "string",
        "description": "string",
        "nat_t_enabled": true,
        "ike_version": 0,
        "pfs": true,
        "private_ipaddress": "string",
        "extra_config": [
          "string"
        ],
        "tunnels": {
          "property1": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          },
          "property2": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          }
        },
        "traffic_pairs": {
          "property1": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          },
          "property2": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          }
        },
        "bgp_peers": {
          "property1": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          },
          "property2": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          }
        },
        "type": "string",
        "vpn_type": "string",
        "gre_interface_address": "string",
        "route_based_int_address": "string",
        "route_based_local": "string",
        "route_based_remote": "string",
        "psk": "string"
      }
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "ipsec_local_address is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecSystemDetail

Name Type Required Constraints Description
  response object false - -
   this_endpoint object false - -
    nat_traversal boolean false - -
    ipaddress string false - -
    overlay_subnet string false - -
    private_ipaddress string false - -
    ipsec_local_ipaddress string false - -
    asn integer false - -
   remote_endpoints object false - -
    IpsecRemoteEndpoint object false - -
     id integer false - -
     name string false - -
     ipaddress string false - -
     description string false - -
     nat_t_enabled boolean false - -
     ike_version integer false - -
     pfs boolean false - Perfect forward secrecy enabled
     private_ipaddress string false - -
     extra_config [string] false - -
     tunnels object false - -
      IpsecTunnel object false - -
       id integer false - -
       local_subnet string false - -
       remote_subnet string false - -
       endpointid integer false - -
       endpoint_id integer false - -
       endpoint_name string false - -
       enabled boolean false - -
       active boolean false - -
       description string¦null false - -
       bounce boolean false - True if tunnel was just bounced
       connected boolean false - -
       ping_interface string false - -
       ping_interval integer¦null false - Interval for ping in seconds
       ping_ipaddress string false - -
       tunnel_params object false - -
        phase2 string false - -
        outbound_spi string false - -
        inbound_spi string false - -
        bytes_in string false - -
        bytes_out string false - -
        esp_time_remaining string false - -
        esp_port string false - -
        phase2_algo string false - -
        phase2_hash string false - -
        nat_t string false - -
        dpd string false - -
        pfs_dh_group string¦null false - -
        phase1 string false - -
        isakmp_port string false - -
        isakmp_time_remaining string false - -
        last_dpd string false - -
        phase1_cipher string¦null false - -
        phase1_prf string¦null false - -
        phase1_dh_group string¦null false - -
        ike_version string false - -
     traffic_pairs object false - -
      IpsecEndpointTrafficPair object false - -
       id integer false - -
       remote_subnet string false - -
       local_subnet string false - -
       ping_ipaddress string¦null false - -
       ping_interface string false - -
       ping_interval integer false - -
       enabled boolean false - -
       description string¦null false - -
       ipsec_endpoint_id integer false - -
       endpoint_id integer false - -
       created_at string(date-time) false - -
       updated_at string(date-time) false - -
     bgp_peers object false - -
      BGPPeer object false - -
       id integer false - -
       asn integer false - -
       ipaddress string false - -
       access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
       local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
       keepalive_interval integer false - Interval for checking if BGP peers are still alive
       hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
       bgp_password string false - -
       add_network_distance boolean false - -
       add_network_distance_direction string false - in or out
       add_network_distance_hops integer false - -
       connection_detail string false - -
     type string false - Indicating Ipsec or GRE over ipsec
     vpn_type string false - -
     gre_interface_address string false - -
     route_based_int_address string false - -
     route_based_local string false - -
     route_based_remote string false - -
     psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create IPsec endpoint

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.post_create_ipsec_endpoint(
    name=name,
    description=description,
    ipaddress=ipaddress,
    secret=secret,
    pfs=pfs,
    ike_version=ike_version,
    nat_t_enabled=nat_t_enabled,
    extra_config=extra_config,
    private_ipaddress=private_ipaddress,
    gre=gre,
    gre_interface_address=gre_interface_address,
    vpn_type=vpn_type,
    route_based_int_address=route_based_int_address,
    route_based_local=route_based_local,
    route_based_remote=route_based_remote)

print(api_response.json())

POST /ipsec/endpoints

Create IPsec connection to the defined remote gateway

Body parameter

{
  "name": "string",
  "description": "string",
  "ipaddress": "string",
  "secret": "string",
  "pfs": true,
  "ike_version": 1,
  "nat_t_enabled": true,
  "extra_config": "string",
  "private_ipaddress": "string",
  "gre": true,
  "gre_interface_address": "string",
  "vpn_type": "policy",
  "route_based_int_address": "string",
  "route_based_local": "string",
  "route_based_remote": "string"
}

Parameters

Name In Type Required Description
name body string true Name for the connection.
description body string false Description of this IPsec endpoint
ipaddress body string true IP of the remote gateway
secret body string true Pre-shared key
pfs body boolean false Perfect Forward Secrecy if true, disables if false.
ike_version body integer false Version for IKE algorithm
nat_t_enabled body boolean false True if you want encapsulated IPsec protocol to this gateway
extra_config body string false Additional optionals for connection such as 'phase1=aes256_gcm-sha2_256-dh14 phase2=aes256_gcm'
private_ipaddress body string false Internal NAT address of the remote gateway
gre body boolean false True if GRE is being used for the specific endpoint
gre_interface_address body string false Interface for GRE in /30 format
vpn_type body string false policy, gre, vti
route_based_int_address body string false -
route_based_local body string false -
route_based_remote body string false -

Enumerated Values

Parameter Value
ike_version 1
ike_version 2

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "ipaddress is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get IPsec endpoint

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.get_ipsec_endpoint(endpoint_id)

print(api_response.json())

GET /ipsec/endpoints/{endpoint_id}

Get IPsec endpoint information

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Update IPsec endpoint

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.put_update_ipsec_endpoint(endpoint_id,
    name=name,
    description=description,
    ipaddress=ipaddress,
    secret=secret,
    pfs=pfs,
    ike_version=ike_version,
    nat_t_enabled=nat_t_enabled,
    extra_config=extra_config,
    private_ipaddress=private_ipaddress,
    gre=gre,
    gre_interface_address=gre_interface_address,
    vpn_type=vpn_type,
    route_based_int_address=route_based_int_address,
    route_based_local=route_based_local,
    route_based_remote=route_based_remote)

print(api_response.json())

PUT /ipsec/endpoints/{endpoint_id}

Edit IPsec endpoint connection configuration parameters

Body parameter

{
  "name": "string",
  "description": "string",
  "ipaddress": "string",
  "secret": "string",
  "pfs": true,
  "ike_version": 1,
  "nat_t_enabled": true,
  "extra_config": "string",
  "private_ipaddress": "string",
  "gre": true,
  "gre_interface_address": "string",
  "vpn_type": "string",
  "route_based_int_address": "string",
  "route_based_local": "string",
  "route_based_remote": "string"
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
name body string false Name for the endpoint.
description body string false Description of this IPsec endpoint
ipaddress body string false IP of the remote gateway
secret body string false Pre-shared key
pfs body boolean false Perfect Forward Secrecy if true, disables if false.
ike_version body integer false Version for IKE algorithm
nat_t_enabled body boolean false True if you want encapsulated IPsec protocol to this gateway
extra_config body string false Additional optionals for connection such as 'phase1=aes256_gcm-sha2_256-dh14 phase2=aes256_gcm'
private_ipaddress body string false Internal NAT address of the remote gateway
gre body boolean false True if GRE is being used for the specific endpoint
gre_interface_address body string false Interface address for GRE
vpn_type body string false policy, gre, vti
route_based_int_address body string false -
route_based_local body string false -
route_based_remote body string false -

Enumerated Values

Parameter Value
ike_version 1
ike_version 2

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "nat_t_enabled is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete IPsec endpoint

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.delete_ipsec_endpoint(endpoint_id)

print(api_response.json())

DELETE /ipsec/endpoints/{endpoint_id}

Delete IPsec endpoint

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint

Example responses

200 Response

{
  "response": {
    "this_endpoint": {
      "nat_traversal": true,
      "ipaddress": "string",
      "overlay_subnet": "string",
      "private_ipaddress": "string",
      "ipsec_local_ipaddress": "string",
      "asn": 0
    },
    "remote_endpoints": {
      "property1": {
        "id": 1,
        "name": "string",
        "ipaddress": "string",
        "description": "string",
        "nat_t_enabled": true,
        "ike_version": 0,
        "pfs": true,
        "private_ipaddress": "string",
        "extra_config": [
          "string"
        ],
        "tunnels": {
          "property1": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          },
          "property2": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          }
        },
        "traffic_pairs": {
          "property1": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          },
          "property2": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          }
        },
        "bgp_peers": {
          "property1": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          },
          "property2": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          }
        },
        "type": "string",
        "vpn_type": "string",
        "gre_interface_address": "string",
        "route_based_int_address": "string",
        "route_based_local": "string",
        "route_based_remote": "string",
        "psk": "string"
      },
      "property2": {
        "id": 1,
        "name": "string",
        "ipaddress": "string",
        "description": "string",
        "nat_t_enabled": true,
        "ike_version": 0,
        "pfs": true,
        "private_ipaddress": "string",
        "extra_config": [
          "string"
        ],
        "tunnels": {
          "property1": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          },
          "property2": {
            "id": 1,
            "local_subnet": "string",
            "remote_subnet": "string",
            "endpointid": 1,
            "endpoint_id": 1,
            "endpoint_name": "string",
            "enabled": true,
            "active": true,
            "description": "string",
            "bounce": true,
            "connected": true,
            "ping_interface": "eth0",
            "ping_interval": 0,
            "ping_ipaddress": "string",
            "tunnel_params": {
              "phase2": "string",
              "outbound_spi": "string",
              "inbound_spi": "string",
              "bytes_in": "string",
              "bytes_out": "string",
              "esp_time_remaining": "string",
              "esp_port": "string",
              "phase2_algo": "string",
              "phase2_hash": "string",
              "nat_t": "string",
              "dpd": "string",
              "pfs_dh_group": "string",
              "phase1": "string",
              "isakmp_port": "string",
              "isakmp_time_remaining": "string",
              "last_dpd": "string",
              "phase1_cipher": "string",
              "phase1_prf": "string",
              "phase1_dh_group": "string",
              "ike_version": "string"
            }
          }
        },
        "traffic_pairs": {
          "property1": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          },
          "property2": {
            "id": 1,
            "remote_subnet": "string",
            "local_subnet": "string",
            "ping_ipaddress": "string",
            "ping_interface": "string",
            "ping_interval": 0,
            "enabled": true,
            "description": "string",
            "ipsec_endpoint_id": 0,
            "endpoint_id": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z"
          }
        },
        "bgp_peers": {
          "property1": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          },
          "property2": {
            "id": 1,
            "asn": 0,
            "ipaddress": "string",
            "access_list": "string",
            "local_asn_alias": 0,
            "keepalive_interval": 0,
            "hold_time": 0,
            "bgp_password": "string",
            "add_network_distance": true,
            "add_network_distance_direction": "string",
            "add_network_distance_hops": 0,
            "connection_detail": "string"
          }
        },
        "type": "string",
        "vpn_type": "string",
        "gre_interface_address": "string",
        "route_based_int_address": "string",
        "route_based_local": "string",
        "route_based_remote": "string",
        "psk": "string"
      }
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "endpoint_id does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecSystemDetail

Name Type Required Constraints Description
  response object false - -
   this_endpoint object false - -
    nat_traversal boolean false - -
    ipaddress string false - -
    overlay_subnet string false - -
    private_ipaddress string false - -
    ipsec_local_ipaddress string false - -
    asn integer false - -
   remote_endpoints object false - -
    IpsecRemoteEndpoint object false - -
     id integer false - -
     name string false - -
     ipaddress string false - -
     description string false - -
     nat_t_enabled boolean false - -
     ike_version integer false - -
     pfs boolean false - Perfect forward secrecy enabled
     private_ipaddress string false - -
     extra_config [string] false - -
     tunnels object false - -
      IpsecTunnel object false - -
       id integer false - -
       local_subnet string false - -
       remote_subnet string false - -
       endpointid integer false - -
       endpoint_id integer false - -
       endpoint_name string false - -
       enabled boolean false - -
       active boolean false - -
       description string¦null false - -
       bounce boolean false - True if tunnel was just bounced
       connected boolean false - -
       ping_interface string false - -
       ping_interval integer¦null false - Interval for ping in seconds
       ping_ipaddress string false - -
       tunnel_params object false - -
        phase2 string false - -
        outbound_spi string false - -
        inbound_spi string false - -
        bytes_in string false - -
        bytes_out string false - -
        esp_time_remaining string false - -
        esp_port string false - -
        phase2_algo string false - -
        phase2_hash string false - -
        nat_t string false - -
        dpd string false - -
        pfs_dh_group string¦null false - -
        phase1 string false - -
        isakmp_port string false - -
        isakmp_time_remaining string false - -
        last_dpd string false - -
        phase1_cipher string¦null false - -
        phase1_prf string¦null false - -
        phase1_dh_group string¦null false - -
        ike_version string false - -
     traffic_pairs object false - -
      IpsecEndpointTrafficPair object false - -
       id integer false - -
       remote_subnet string false - -
       local_subnet string false - -
       ping_ipaddress string¦null false - -
       ping_interface string false - -
       ping_interval integer false - -
       enabled boolean false - -
       description string¦null false - -
       ipsec_endpoint_id integer false - -
       endpoint_id integer false - -
       created_at string(date-time) false - -
       updated_at string(date-time) false - -
     bgp_peers object false - -
      BGPPeer object false - -
       id integer false - -
       asn integer false - -
       ipaddress string false - -
       access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
       local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
       keepalive_interval integer false - Interval for checking if BGP peers are still alive
       hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
       bgp_password string false - -
       add_network_distance boolean false - -
       add_network_distance_direction string false - in or out
       add_network_distance_hops integer false - -
       connection_detail string false - -
     type string false - Indicating Ipsec or GRE over ipsec
     vpn_type string false - -
     gre_interface_address string false - -
     route_based_int_address string false - -
     route_based_local string false - -
     route_based_remote string false - -
     psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create IPsec endpoint tunnel

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/tunnels \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.post_create_ipsec_endpoint_tunnel(endpoint_id,
    remote_subnet=remote_subnet,
    local_subnet=local_subnet,
    ping_ipaddress=ping_ipaddress,
    ping_interval=ping_interval,
    ping_interface=ping_interface,
    enabled=enabled,
    description=description)

print(api_response.json())

POST /ipsec/endpoints/{endpoint_id}/tunnels

Create IPsec endpoint tunnel

Body parameter

{
  "remote_subnet": "string",
  "local_subnet": "string",
  "ping_ipaddress": "string",
  "ping_interval": 0,
  "ping_interface": "string",
  "enabled": true,
  "description": "string"
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
remote_subnet body string true Remote subnet for tunnel in CIDR notation
local_subnet body string false Local subnet for tunnel in CIDR notation
ping_ipaddress body string false Exo Ping feature - remote IP destination of ping
ping_interval body integer false Exo Ping feature - periodicy of the ping in seconds
ping_interface body string false Exo Ping feature - what network interface IP of the VNS3 controller to use as the source of ping
enabled body boolean false Disables tunnel if set to false
description body string false -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "endpoint_id does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Permission denied. Max number of tunnels reach Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update IPsec endpoint tunnel

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/tunnels/{tunnel_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.put_update_ipsec_endpoint_tunnel(endpoint_id,tunnel_id,
    bounce=bounce,
    description=description,
    remote_subnet=remote_subnet,
    local_subnet=local_subnet,
    ping_ipaddress=ping_ipaddress,
    ping_interval=ping_interval,
    ping_interface=ping_interface,
    enabled=enabled)

print(api_response.json())

PUT /ipsec/endpoints/{endpoint_id}/tunnels/{tunnel_id}

Edit IPsec endpoint tunnel configuration

Body parameter

{
  "bounce": false,
  "description": "string",
  "remote_subnet": "string",
  "local_subnet": "string",
  "ping_ipaddress": "string",
  "ping_interval": 0,
  "ping_interface": "string",
  "enabled": true
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
tunnel_id path integer true ID for tunnel
bounce body boolean false Resets the IPsec connection for this specific tunnel
description body string false -
remote_subnet body string false Remote subnet for tunnel in CIDR notation
local_subnet body string false Local subnet for tunnel in CIDR notation
ping_ipaddress body string false Exo Ping feature - remote IP destination of ping
ping_interval body integer false Exo Ping feature - periodicy of the ping in seconds
ping_interface body string false Exo Ping feature - what network interface IP of the VNS3 controller to use as the source of ping
enabled body boolean false Disables tunnel if set to false

Example responses

200 Response

{
  "response": {
    "id": 1,
    "local_subnet": "string",
    "remote_subnet": "string",
    "endpointid": 1,
    "endpoint_id": 1,
    "endpoint_name": "string",
    "enabled": true,
    "active": true,
    "description": "string",
    "bounce": true,
    "connected": true,
    "ping_interface": "eth0",
    "ping_interval": 0,
    "ping_ipaddress": "string",
    "tunnel_params": {
      "phase2": "string",
      "outbound_spi": "string",
      "inbound_spi": "string",
      "bytes_in": "string",
      "bytes_out": "string",
      "esp_time_remaining": "string",
      "esp_port": "string",
      "phase2_algo": "string",
      "phase2_hash": "string",
      "nat_t": "string",
      "dpd": "string",
      "pfs_dh_group": "string",
      "phase1": "string",
      "isakmp_port": "string",
      "isakmp_time_remaining": "string",
      "last_dpd": "string",
      "phase1_cipher": "string",
      "phase1_prf": "string",
      "phase1_dh_group": "string",
      "ike_version": "string"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "local_subnet is invalid CIDR"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecTunnelDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   local_subnet string false - -
   remote_subnet string false - -
   endpointid integer false - -
   endpoint_id integer false - -
   endpoint_name string false - -
   enabled boolean false - -
   active boolean false - -
   description string¦null false - -
   bounce boolean false - True if tunnel was just bounced
   connected boolean false - -
   ping_interface string false - -
   ping_interval integer¦null false - Interval for ping in seconds
   ping_ipaddress string false - -
   tunnel_params object false - -
    phase2 string false - -
    outbound_spi string false - -
    inbound_spi string false - -
    bytes_in string false - -
    bytes_out string false - -
    esp_time_remaining string false - -
    esp_port string false - -
    phase2_algo string false - -
    phase2_hash string false - -
    nat_t string false - -
    dpd string false - -
    pfs_dh_group string¦null false - -
    phase1 string false - -
    isakmp_port string false - -
    isakmp_time_remaining string false - -
    last_dpd string false - -
    phase1_cipher string¦null false - -
    phase1_prf string¦null false - -
    phase1_dh_group string¦null false - -
    ike_version string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete IPsec tunnel

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/tunnels/{tunnel_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.delete_ipsec_endpoint_tunnel(endpoint_id,tunnel_id)

print(api_response.json())

DELETE /ipsec/endpoints/{endpoint_id}/tunnels/{tunnel_id}

Delete IPsec tunnel

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
tunnel_id path integer true ID for tunnel

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "tunnel id does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create IPsec traffic pair

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/traffic_pairs \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.post_create_ipsec_traffic_pair(endpoint_id,
    remote_subnet=remote_subnet,
    local_subnet=local_subnet,
    ping_ipaddress=ping_ipaddress,
    ping_interval=ping_interval,
    ping_interface=ping_interface,
    enabled=enabled,
    description=description)

print(api_response.json())

POST /ipsec/endpoints/{endpoint_id}/traffic_pairs

Create IPsec endpoint traffic pair

Body parameter

{
  "remote_subnet": "string",
  "local_subnet": "string",
  "ping_ipaddress": "string",
  "ping_interval": 0,
  "ping_interface": "string",
  "enabled": true,
  "description": "string"
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
remote_subnet body string true Remote subnet for tunnel in CIDR notation
local_subnet body string true Local subnet for tunnel in CIDR notation
ping_ipaddress body string false Exo Ping feature - remote IP destination of ping
ping_interval body integer false Exo Ping feature - periodicy of the ping in seconds
ping_interface body string false Exo Ping feature - what network interface IP of the VNS3 controller to use as the source of ping
enabled body boolean false Disables tunnel if set to false
description body string false -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "remote_subnet": "string",
    "local_subnet": "string",
    "ping_ipaddress": "string",
    "ping_interface": "string",
    "ping_interval": 0,
    "enabled": true,
    "description": "string",
    "ipsec_endpoint_id": 0,
    "endpoint_id": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "156398145066351285906955697179258297423716",
    "message": "endpoint_id does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Permission denied. Max number of tunnels reach Inline
404 Not Found Bad request Inline

Response Schema

Status Code 200

IpsecTrafficPairResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   remote_subnet string false - -
   local_subnet string false - -
   ping_ipaddress string¦null false - -
   ping_interface string false - -
   ping_interval integer false - -
   enabled boolean false - -
   description string¦null false - -
   ipsec_endpoint_id integer false - -
   endpoint_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update IPsec traffic pair

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.put_update_ipsec_traffic_pair(endpoint_id,pair_id,
    remote_subnet=remote_subnet,
    local_subnet=local_subnet,
    ping_ipaddress=ping_ipaddress,
    ping_interval=ping_interval,
    ping_interface=ping_interface,
    enabled=enabled,
    description=description)

print(api_response.json())

PUT /ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id}

Edit IPsec endpoint traffic pair

Body parameter

{
  "remote_subnet": "string",
  "local_subnet": "string",
  "ping_ipaddress": "string",
  "ping_interval": 0,
  "ping_interface": "string",
  "enabled": true,
  "description": "string"
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
pair_id path integer true ID for traffic pair
remote_subnet body string false Remote subnet for tunnel in CIDR notation
local_subnet body string false Local subnet for tunnel in CIDR notation
ping_ipaddress body string false Exo Ping feature - remote IP destination of ping
ping_interval body integer false Exo Ping feature - periodicy of the ping in seconds
ping_interface body string false Exo Ping feature - what network interface IP of the VNS3 controller to use as the source of ping
enabled body boolean false Disables tunnel if set to false
description body string false -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "remote_subnet": "string",
    "local_subnet": "string",
    "ping_ipaddress": "string",
    "ping_interface": "string",
    "ping_interval": 0,
    "enabled": true,
    "description": "string",
    "ipsec_endpoint_id": 0,
    "endpoint_id": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "156398145066351285906955697179258297423716",
    "message": "endpoint_id does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Permission denied. Inline
404 Not Found Bad request Inline

Response Schema

Status Code 200

IpsecTrafficPairResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   remote_subnet string false - -
   local_subnet string false - -
   ping_ipaddress string¦null false - -
   ping_interface string false - -
   ping_interval integer false - -
   enabled boolean false - -
   description string¦null false - -
   ipsec_endpoint_id integer false - -
   endpoint_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete IPsec traffic pair

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.delete_ipsec_traffic_pair(endpoint_id,pair_id)

print(api_response.json())

DELETE /ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id}

Delete IPsec traffic pair

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
pair_id path integer true ID for traffic pair

Example responses

200 Response

{
  "response": {
    "id": 1,
    "remote_subnet": "string",
    "local_subnet": "string",
    "ping_ipaddress": "string",
    "ping_interface": "string",
    "ping_interval": 0,
    "enabled": true,
    "description": "string",
    "ipsec_endpoint_id": 0,
    "endpoint_id": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156398145066351285906955697179258297423716",
    "message": "traffic pair id does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecTrafficPairResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   remote_subnet string false - -
   local_subnet string false - -
   ping_ipaddress string¦null false - -
   ping_interface string false - -
   ping_interval integer false - -
   enabled boolean false - -
   description string¦null false - -
   ipsec_endpoint_id integer false - -
   endpoint_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Enable IPsec traffic pair

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id}/enable \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.enable_ipsec_traffic_pair(endpoint_id,pair_id)

print(api_response.json())

PUT /ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id}/enable

Enable Ipsec Traffic Pair

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
pair_id path integer true ID for traffic pair

Example responses

200 Response

{
  "response": {
    "id": 1,
    "remote_subnet": "string",
    "local_subnet": "string",
    "ping_ipaddress": "string",
    "ping_interface": "string",
    "ping_interval": 0,
    "enabled": true,
    "description": "string",
    "ipsec_endpoint_id": 0,
    "endpoint_id": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "156398145066351285906955697179258297423716",
    "message": "endpoint_id does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Permission denied. Inline
404 Not Found Bad request Inline

Response Schema

Status Code 200

IpsecTrafficPairResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   remote_subnet string false - -
   local_subnet string false - -
   ping_ipaddress string¦null false - -
   ping_interface string false - -
   ping_interval integer false - -
   enabled boolean false - -
   description string¦null false - -
   ipsec_endpoint_id integer false - -
   endpoint_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Disable IPsec traffic pair

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id}/disable \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.ipsec.disable_ipsec_traffic_pair(endpoint_id,pair_id)

print(api_response.json())

PUT /ipsec/endpoints/{endpoint_id}/traffic_pairs/{pair_id}/disable

Disable Ipsec Traffic Pair

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
pair_id path integer true ID for traffic pair

Example responses

200 Response

{
  "response": {
    "id": 1,
    "remote_subnet": "string",
    "local_subnet": "string",
    "ping_ipaddress": "string",
    "ping_interface": "string",
    "ping_interval": 0,
    "enabled": true,
    "description": "string",
    "ipsec_endpoint_id": 0,
    "endpoint_id": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "156398145066351285906955697179258297423716",
    "message": "endpoint_id does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Permission denied. Inline
404 Not Found Bad request Inline

Response Schema

Status Code 200

IpsecTrafficPairResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   remote_subnet string false - -
   local_subnet string false - -
   ping_ipaddress string¦null false - -
   ping_interface string false - -
   ping_interval integer false - -
   enabled boolean false - -
   description string¦null false - -
   ipsec_endpoint_id integer false - -
   endpoint_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Firewall

Functions for managing Firewall rules, subgroups (chains) and IPSets

Overwrite Firewall v1

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/firewall \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_overwrite_firewall(
    rules=rules)

print(api_response.json())

PUT /firewall

Put/Overwrite entire firewall. Careful! API v1

Body parameter

{
  "rules": "string"
}

Parameters

Name In Type Required Description
rules body string true -

Example responses

200 Response

{
  "response": {
    "token": "string",
    "status": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

TaskTokenResponse

Name Type Required Constraints Description
  response object false - -
   token string false - -
   status string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Put Firewall Action v1

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/firewall/actions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_firewall_action(
    action=action)

print(api_response.json())

PUT /firewall/actions

Take an action on the firewall

Body parameter

{
  "action": "string"
}

Parameters

Name In Type Required Description
action body string true Action to take. Currently only reset_connection_tracking supported

Example responses

200 Response

{
  "response": {
    "status": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SimpleStatusResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Firewall Rules v1

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/firewall/rules \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_rules()

print(api_response.json())

GET /firewall/rules

Get a list of current firewall rules API v1

Example responses

200 Response

{
  "response": [
    [
      "string"
    ]
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallRuleListResponse

Name Type Required Constraints Description
  response [array] false - -
   FirewallRuleTuple [oneOf] false - IPtables firewall rule represented as array [rule, position]

oneOf

Name Type Required Constraints Description
    any string false - -

xor

Name Type Required Constraints Description
    any integer false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Firewall Rule v1

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/firewall/rules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_rule(
    rule=rule,
    position=position)

print(api_response.json())

POST /firewall/rules

Adds a firewall rule to the VNS3 Controller's firewall API v1

Body parameter

{
  "rule": "string",
  "position": -1
}

Parameters

Name In Type Required Description
rule body string true New firewall rule string that needs to be compatible with a Linux "iptables" statement
position body integer false Position which the rule will be inserted in the list of Firewall rules. Default is -1, which will post as the next rule in the list

Example responses

200 Response

{
  "response": {
    "status": "submitted",
    "rule": "MACRO_CUST -o eth0 -s 10.199.2.0/24 -j MASQUERADE",
    "token": "15798987631596_5280108744805298913050300048466684878015928855"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Parse Error - iptables v1.4.21: host/network `10.199.2.0.' not found"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallRuleOperationResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -
   rule string false - -
   position integer false - -
   token string false - Task token

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Firewall Rule v1

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/firewall/rules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_rule_by_rule(
    rule=rule)

print(api_response.json())

DELETE /firewall/rules

Delete firewall rule by passing the actual rule to delete API v1

Body parameter

{
  "rule": "string"
}

Parameters

Name In Type Required Description
rule body string true Rule to be deleted

Example responses

200 Response

{
  "response": {
    "status": "submitted",
    "position": 0,
    "rule": "MACRO_CUST -o eth0 -s 10.199.2.0/24 -j MASQUERADE",
    "token": "15641553402765_1730986546845926230044120934882999801643412463756"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "either position or rule argument must be provided"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallRuleOperationResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -
   rule string false - -
   position integer false - -
   token string false - Task token

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Firewall Rule Position

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/firewall/rules/{position} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_rule_by_position(position)

print(api_response.json())

DELETE /firewall/rules/{position}

Delete firewall rule by position in the firewall. The firewall is 0 indexed. So deleting position 0 will remove the first rule in the firewall and the second rule will become the first. API v1

Parameters

Name In Type Required Description
position path integer true index position for firewall rule, 0 is first

Example responses

200 Response

{
  "response": {
    "status": "submitted",
    "rule": "MACRO_CUST -o eth1 -s 10.0.2.0/24 -j MASQUERADE\\n",
    "position": 0,
    "token": "15641555503109_367028783492026941846541919926446643820946500940416"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156415545591919091797511226100046886299005",
    "message": "position exceeds the number of rules"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallRuleOperationResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -
   rule string false - -
   position integer false - -
   token string false - Task token

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Firewall Subgroups v1

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/firewall/rules/subgroup \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_rule_subgroups(
    name=name,
    verbose=verbose)

print(api_response.json())

GET /firewall/rules/subgroup

Get a list of current firewall rules at subgroup (chained rules) API v1

Parameters

Name In Type Required Description
name query string false name of resource
verbose query boolean false True for verbose output

Example responses

200 Response

{
  "response": [
    "string"
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallSubgroupListResponse

Name Type Required Constraints Description
  response any false - -

oneOf

Name Type Required Constraints Description
   any [string] false - -
    FirewallSubgroupRule string false - Begins with name and is followed by Firewall rule. This is single rule in the chain.

xor

Name Type Required Constraints Description
   any [array] false - -
    FirewallSubgroupRule string false - Begins with name and is followed by Firewall rule. This is single rule in the chain.

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Firewall Subgroup v1

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/firewall/rules/subgroup \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_subgroup(
    name=name,
    position=position,
    flush=flush)

print(api_response.json())

POST /firewall/rules/subgroup

Create a new firewall subgroup. Subgroups are named lists of rules that can be "jumped to" from another rule. These are effectively IPtables custom chains. For example, PREROUTING_CUST -s 10.0.2.0/24 -j PRE_C_MYGROUP. API v1

Body parameter

{
  "rules": "string",
  "name": "string",
  "position": 0,
  "flush": true
}

Parameters

Name In Type Required Description
rules body string false Chained firewall rules seperated by \n. Rule should be preceded by group name
name body string false 'name of the subgroup. Must be valid chain that begins with one of the following: PRE_C_, PST_C_, FWD_C_, INP_C_, OUT_C_.'
position body integer false Position which the chain will be inserted in the list of Firewall rules. Default is 0, which is first in the ruleset
flush body boolean false -

One of the following param combinations are required:

Example responses

200 Response

{
  "response": {
    "status": "ok",
    "rules": "Rule 1\\n Rule 2\\n Rule 3"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "invalid subgroup name - some bad name"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Reload Firewall Subgroups v1

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/firewall/rules/subgroup \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_reinitialize_firewall_subgroups(
    reinitialize=reinitialize)

print(api_response.json())

PUT /firewall/rules/subgroup

Reload firewall subgroups API v1

Body parameter

{
  "reinitialize": true
}

Parameters

Name In Type Required Description
reinitialize body boolean false -

Example responses

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK -
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Firewall Subgroup v1

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/firewall/rules/subgroup \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_subgroup(
    rules=rules,
    name=name)

print(api_response.json())

DELETE /firewall/rules/subgroup

Delete Firewall subgroup by name or rules API v1

Body parameter

{
  "rules": "string",
  "name": "string"
}

Parameters

Name In Type Required Description
rules body string false Chained firewall rules seperated by "\n"
name body string false Name of the subgroup chain. Must be valid chain name.

Example responses

200 Response

{
  "response": {
    "status": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Chain named some BAD_NAME not found."
  }
}

410 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Chain references remain for CHAIN_NAME, although rules were deleted."
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline
410 Gone Resource gone Inline

Response Schema

Status Code 200

SimpleStatusResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 410

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

List Fwsets v1

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/firewall/fwsets \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_fwsets(
    name=name,
    verbose=verbose)

print(api_response.json())

GET /firewall/fwsets

Get a list of current firewall rule sets. These are IPsets that allow for faster matching of rules against IPs. See http://ipset.netfilter.org for more details. API v1

Parameters

Name In Type Required Description
name query string false name of resource
verbose query boolean false True for verbose output

Example responses

200 Response

{
  "response": [
    "string"
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallV1FwsetListResponse

Name Type Required Constraints Description
  response [string] false - -
   FirewallV1FwsetString string false - Begins with name and is followed by Firewall rules. This is an indexed rule that allows for speedy matching on IPs

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Fwset v1

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/firewall/fwsets \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_fwset(
    rules=rules,
    name=name,
    flush=flush)

print(api_response.json())

POST /firewall/fwsets

Create a new firewall FWSet for fast rule matching API v1

Body parameter

{
  "rules": "string",
  "name": "string",
  "flush": true
}

Parameters

Name In Type Required Description
rules body string false Chained firewall rules seperated by "\n"
name body string false 'name of the FWSet. Must be valid chain that begins with one of the following: NETS_, PORTS_, LIST_.'
flush body boolean false -

Example responses

200 Response

{
  "response": {
    "status": "ok",
    "rules": "Rule 1\\n Rule 2\\n Rule 3"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "invalid FWSet name - some bad name"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Reload all Fwsets

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/firewall/fwsets \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_reinitialize_fwsets(
    reinitialize=reinitialize)

print(api_response.json())

PUT /firewall/fwsets

Reload all firewall FWsets

Body parameter

{
  "reinitialize": true
}

Parameters

Name In Type Required Description
reinitialize body boolean false -

Example responses

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK -
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Fwset v1

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/firewall/fwsets \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_fwset(
    rules=rules,
    name=name)

print(api_response.json())

DELETE /firewall/fwsets

Delete Firewall FWSet by name or rules API v1

Body parameter

{
  "rules": "string",
  "name": "string"
}

Parameters

Name In Type Required Description
rules body string false Chained firewall rules seperated by "\n"
name body string false Name of the FWSet. Must be valid chain that begins with one of the following: NETS_, PORTS_, LIST_.

Example responses

200 Response

{
  "response": {
    "status": "finished_ok"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "More than one FWSet name found in rules"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SimpleStatusResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Put firewall action v2

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/actions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_firewall_action(
    action=action)

print(api_response.json())

PUT /v2/firewall/actions

Take an action on the firewall

Body parameter

{
  "action": "string"
}

Parameters

Name In Type Required Description
action body string true Action to take. Currently only reset_connection_tracking supported

Example responses

200 Response

{
  "response": {
    "status": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SimpleStatusResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Firewall Rules v2

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_rules(
    state=state,
    groups=groups,
    osview=osview,
    tables=tables)

print(api_response.json())

GET /v2/firewall/rules

Get a list of firewall rules API v2

Parameters

Name In Type Required Description
state query string false Filter rules by state, active or disabled
groups query string false Filter by groups. Accepts csv.
osview query boolean false Show operating system level rules
tables query string false Filter by tables. Accepts csv.

Example responses

200 Response

{
  "response": [
    {
      "id": "fdf43d86e3a303851085",
      "rule": "POSTROUTING -s ${vns3_overlay_subnet} -o eth0 ! -d ${vns3_overlay_subnet} -j MASQUERADE-ONCE",
      "table": "postrouting",
      "rule_resolved": "POSTROUTING -s 100.64.0.0/19 -o eth0 ! -d 100.64.0.0/19 -j MASQUERADE-ONCE",
      "position": 0,
      "comment": "Source NAT for traffic to the internet",
      "last_resolved": "2022-06-06T18:44:14.343Z",
      "disabled": true,
      "created_at": "2022-06-06T18:44:14.409Z",
      "groups": [
        "VPN2Internet"
      ],
      "os_rules": []
    },
    {
      "id": "9538949c46f9a9f6d120",
      "rule": "FORWARD -o eth0 -ctrack NEW,ESTABLISHED,RELATED -j ACCEPT",
      "table": "forward",
      "rule_resolved": "FORWARD -o eth0 -ctrack NEW,ESTABLISHED,RELATED -j ACCEPT",
      "position": 1,
      "comment": "Allow outbound internet access",
      "last_resolved": "2022-06-06T18:44:15.566Z",
      "disabled": true,
      "created_at": "2022-06-06T18:44:15.566Z",
      "groups": [
        "VPN2Internet"
      ],
      "os_rules": []
    },
    {
      "id": "59f87f2c775793a38441",
      "rule": "FORWARD -i eth0 -ctrack NEW, ESTABLISHED,RELATED -j ACCEPT",
      "table": "forward",
      "rule_resolved": "FORWARD -i eth0 -ctrack NEW, ESTABLISHED,RELATED -j ACCEPT",
      "position": 2,
      "comment": "Allow response traffic",
      "last_resolved": "2022-06-06T18:44:16.743Z",
      "disabled": true,
      "created_at": "2022-06-06T18:44:16.768Z",
      "groups": [
        "VPN2Internet"
      ],
      "os_rules": []
    },
    {
      "id": "926bc4e70fc7afcd13b8",
      "rule": "FORWARD -s ${vns3_overlay_subnet} -d ${vns3_overlay_subnet} -o eth0 -j DROP",
      "table": "forward",
      "rule_resolved": "FORWARD -s 100.64.0.0/19 -d 100.64.0.0/19 -o eth0 -j DROP",
      "position": 3,
      "comment": "Do not allow VPN connected people or devices to reach each other",
      "last_resolved": "2022-06-06T18:44:17.907Z",
      "disabled": true,
      "created_at": "2022-06-06T18:44:17.973Z",
      "groups": [
        "BlockVPN2VPN"
      ],
      "os_rules": []
    },
    {
      "id": "d12390aa2dd1c14be090",
      "rule": "FORWARD -i eth0 -j ACCEPT",
      "table": "forward",
      "rule_resolved": "FORWARD -i eth0 -j ACCEPT",
      "position": 4,
      "comment": "",
      "last_resolved": "2022-07-12T02:36:38.064Z",
      "disabled": true,
      "created_at": "2022-07-12T02:36:38.081Z",
      "groups": [],
      "os_rules": [
        {
          "rule": "FORWARD_CUST -i eth0 -j ACCEPT",
          "position": 0,
          "table": "filter",
          "rule_type": "iptables"
        }
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallRuleV2ListResponse

Name Type Required Constraints Description
  response object false - -
   FirewallRuleV2 object false - -
    id string false - unique random id
    rule string false - Unresolved rule
    rule_resolved string false - Rule with variables resolved
    table string false - -
    position integer false - -
    comment string false - -
    last_resolved string false - -
    disabled boolean false - -
    created_at string(date-time) false - -
    groups [string] false - List of groups that this rule is in
    os_rules [object] false - The actuall firewall rules enforced at the operating system level
     rule string false - -
     position integer false - -
     table string false - OS level table. This will differ from the VNS3 level table
     rule_type string false - Indicates where this rule exists in OS

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Firewall Rule v2

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_rule(
    rule=rule,
    comment=comment,
    position=position,
    groups=groups,
    disabled=disabled)

print(api_response.json())

POST /v2/firewall/rules

Create a VNS3 firewall rule API v2

Body parameter

{
  "rule": "string",
  "comment": "string",
  "rules": [
    "string"
  ],
  "position": -1,
  "groups": [
    "string"
  ],
  "disabled": false
}

Parameters

Name In Type Required Description
rule body string false firewall rule string
comment body string false -
rules body [string] false list of rules to create
position body integer false starting position for the rule or rules. -1 indicates end of firewall
groups body [string] false List of groups to add this rule to
disabled body boolean false -

One of the following param combinations are required:

Example responses

201 Response

{
  "response": {
    "id": "string",
    "rule": "string",
    "rule_resolved": "string",
    "table": "string",
    "position": 0,
    "comment": "string",
    "last_resolved": "string",
    "disabled": false,
    "created_at": "2019-08-24T14:15:22Z",
    "groups": [
      "string"
    ],
    "os_rules": [
      {
        "rule": "string",
        "position": 0,
        "table": "string",
        "rule_type": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Parse Error - iptables v1.4.21: host/network `10.199.2.0.' not found"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
201 Created created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Overwrite Firewall v2

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_overwrite_firewall(
    rules=rules,
      rule=  rule,
      position=  position,
      comment=  comment,
      id=  id,
      groups=  groups,
      disabled=  disabled)

print(api_response.json())

PUT /v2/firewall/rules

Put/Overwrite entire firewall. Careful! API v2

Body parameter

{
  "rules": {
    "rule": "string",
    "position": 0,
    "comment": "string",
    "id": "string",
    "groups": [
      "string"
    ],
    "disabled": false
  }
}

Parameters

Name In Type Required Description
rules body object true -
  rule body string true -
  position body integer false position in resulting firewall. default position is position in list
  comment body string false -
  id body string false optional ID to preserve groups and map errors
  groups body [string] false -
  disabled body boolean false -

One of the following param combinations are required:

Example responses

200 Response

{
  "response": {
    "rules": [
      {
        "id": "string",
        "rule": "string",
        "rule_resolved": "string",
        "table": "string",
        "position": 0,
        "comment": "string",
        "last_resolved": "string",
        "disabled": false,
        "created_at": "2019-08-24T14:15:22Z",
        "groups": [
          "string"
        ],
        "os_rules": [
          {
            "rule": "string",
            "position": 0,
            "table": "string",
            "rule_type": "string"
          }
        ]
      }
    ],
    "errors": [
      {
        "rule": "string",
        "error": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallBulkWriteResponse

Name Type Required Constraints Description
  response object false - -
   rules [object] false - -
    FirewallRuleV2 object false - -
     id string false - unique random id
     rule string false - Unresolved rule
     rule_resolved string false - Rule with variables resolved
     table string false - -
     position integer false - -
     comment string false - -
     last_resolved string false - -
     disabled boolean false - -
     created_at string(date-time) false - -
     groups [string] false - List of groups that this rule is in
     os_rules [object] false - The actuall firewall rules enforced at the operating system level
      rule string false - -
      position integer false - -
      table string false - OS level table. This will differ from the VNS3 level table
      rule_type string false - Indicates where this rule exists in OS
   errors [object] false - List of rules that errored
    rule string false - -
    error string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update Firewall Rule

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_update_firewall_rule(id,
    rule=rule,
    comment=comment,
    groups=groups,
    disabled=disabled)

print(api_response.json())

PUT /v2/firewall/rules/{id}

Update firewall rule

Body parameter

{
  "rule": "string",
  "comment": "string",
  "groups": [
    "string"
  ],
  "disabled": true
}

Parameters

Name In Type Required Description
id path string true Rule ID
rule body string false firewall rule string
comment body string false -
groups body [string] false -
disabled body boolean false if true, rule will be disabled

Example responses

200 Response

{
  "response": {
    "id": "string",
    "rule": "string",
    "rule_resolved": "string",
    "table": "string",
    "position": 0,
    "comment": "string",
    "last_resolved": "string",
    "disabled": false,
    "created_at": "2019-08-24T14:15:22Z",
    "groups": [
      "string"
    ],
    "os_rules": [
      {
        "rule": "string",
        "position": 0,
        "table": "string",
        "rule_type": "string"
      }
    ],
    "errors": [
      "string"
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Invalid rule"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "rule does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallRuleV2UpdateResponse

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    id string false - unique random id
    rule string false - Unresolved rule
    rule_resolved string false - Rule with variables resolved
    table string false - -
    position integer false - -
    comment string false - -
    last_resolved string false - -
    disabled boolean false - -
    created_at string(date-time) false - -
    groups [string] false - List of groups that this rule is in
    os_rules [object] false - The actuall firewall rules enforced at the operating system level
     rule string false - -
     position integer false - -
     table string false - OS level table. This will differ from the VNS3 level table
     rule_type string false - Indicates where this rule exists in OS

and

Name Type Required Constraints Description
   any object false - -
    errors [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Firewall Rule v2

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules/{id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_rule(id)

print(api_response.json())

DELETE /v2/firewall/rules/{id}

Delete firewall rule API v2

Parameters

Name In Type Required Description
id path string true Rule ID

Example responses

200 Response

{
  "response": {
    "id": "string",
    "rule": "string",
    "rule_resolved": "string",
    "table": "string",
    "position": 0,
    "comment": "string",
    "last_resolved": "string",
    "disabled": false,
    "created_at": "2019-08-24T14:15:22Z",
    "groups": [
      "string"
    ],
    "os_rules": [
      {
        "rule": "string",
        "position": 0,
        "table": "string",
        "rule_type": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Error deleting rule"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "rule does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallRuleV2DetailResponse

Name Type Required Constraints Description
  response object false - -
   id string false - unique random id
   rule string false - Unresolved rule
   rule_resolved string false - Rule with variables resolved
   table string false - -
   position integer false - -
   comment string false - -
   last_resolved string false - -
   disabled boolean false - -
   created_at string(date-time) false - -
   groups [string] false - List of groups that this rule is in
   os_rules [object] false - The actuall firewall rules enforced at the operating system level
    rule string false - -
    position integer false - -
    table string false - OS level table. This will differ from the VNS3 level table
    rule_type string false - Indicates where this rule exists in OS

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Import Firewall Rules

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules/import \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.import_firewall_rules(
    rules=rules,
    position=position,
    disabled=disabled,
    groups=groups)

print(api_response.json())

PUT /v2/firewall/rules/import

Import list of firewall rules API v2

Body parameter

{
  "rules": "string",
  "position": -1,
  "disabled": true,
  "groups": [
    "string"
  ]
}

Parameters

Name In Type Required Description
rules body string true Rules as string. This can be valid json for a rule object or rules delimited by newlines
position body integer false Starting position for imported rules. -1 indicates end of firewall.
disabled body boolean false Import all rules as immediately disabled
groups body [string] false Groups to add these imported rules to

Example responses

200 Response

{
  "response": {
    "rules": [
      {
        "id": "string",
        "rule": "string",
        "rule_resolved": "string",
        "table": "string",
        "position": 0,
        "comment": "string",
        "last_resolved": "string",
        "disabled": false,
        "created_at": "2019-08-24T14:15:22Z",
        "groups": [
          "string"
        ],
        "os_rules": [
          {
            "rule": "string",
            "position": 0,
            "table": "string",
            "rule_type": "string"
          }
        ]
      }
    ],
    "errors": [
      "string"
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "156348346294205629750334447737345166168929",
    "message": "Invalid table for rule"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallRuleV2CreateMultipleResponse

Name Type Required Constraints Description
  response object false - -
   rules [object] false - -
    FirewallRuleV2 object false - -
     id string false - unique random id
     rule string false - Unresolved rule
     rule_resolved string false - Rule with variables resolved
     table string false - -
     position integer false - -
     comment string false - -
     last_resolved string false - -
     disabled boolean false - -
     created_at string(date-time) false - -
     groups [string] false - List of groups that this rule is in
     os_rules [object] false - The actuall firewall rules enforced at the operating system level
      rule string false - -
      position integer false - -
      table string false - OS level table. This will differ from the VNS3 level table
      rule_type string false - Indicates where this rule exists in OS
   errors [string] false - List of errors for any rules that failed

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Export Firewall Rules

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules/export \
  -H 'Accept: text/plain'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.export_firewall_rules(
    group=group,
    tables=tables,
    type=type)

print(api_response.json())

GET /v2/firewall/rules/export

Download export of firewall rules

Parameters

Name In Type Required Description
group query string false Export group only
tables query string false Tables to export. Accepts csv. Defaults to all.
type query string false One of json or plaintext

Example responses

200 Response

"string"
"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK string
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

List Rule Groups

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules-groups \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_rule_groups()

print(api_response.json())

GET /v2/firewall/rules-groups

Get a list of firewall rule groups

Example responses

200 Response

{
  "response": [
    {
      "name": "VPN2Internet",
      "description": "",
      "rules": [
        "fdf43d86e3a303851085",
        "9538949c46f9a9f6d120",
        "59f87f2c775793a38441"
      ],
      "size": 3
    },
    {
      "name": "BlockVPN2VPN",
      "description": "",
      "rules": [
        "926bc4e70fc7afcd13b8"
      ],
      "size": 1
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

RuleGroupsListResponse

Name Type Required Constraints Description
  response [object] false - -
   RuleGroup object false - -
    name string false - -
    description string false - -
    rules [string] false - List of rule IDs in group
    size integer false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Rule Group

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rules-groups \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_rule_group(
    name=name,
    rule_ids=rule_ids,
    description=description)

print(api_response.json())

POST /v2/firewall/rules-groups

Create a VNS3 firewall rule group

Body parameter

{
  "name": "string",
  "rule_ids": [
    "string"
  ],
  "description": "string"
}

Parameters

Name In Type Required Description
name body string true Name of group
rule_ids body [string] false -
description body string false -

Example responses

201 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "rules": [
      "string"
    ],
    "size": 0
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Group with name foobar already exists"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
201 Created created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 201

RuleGroupDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   rules [string] false - List of rule IDs in group
   size integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Read Rule Group

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rule-groups/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_rule_group(name)

print(api_response.json())

GET /v2/firewall/rule-groups/{name}

Read rule group details

Parameters

Name In Type Required Description
name path string true unique rule group name

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "rules": [
      "string"
    ],
    "size": 0
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "group does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

RuleGroupDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   rules [string] false - List of rule IDs in group
   size integer false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete firewall rule group

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rule-groups/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_rule_group(name,
    force=force)

print(api_response.json())

DELETE /v2/firewall/rule-groups/{name}

Delete firewall rule group

Parameters

Name In Type Required Description
name path string true unique rule group name
force query boolean false Force delete if rule group has rules associated

Example responses

202 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "rules": [
      "string"
    ],
    "size": 0
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915614338789304780698957922014",
    "message": "Group has rules defined. Please delete rules or pass force=true."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "group does not exist"
  }
}

Responses

Status Meaning Description Schema
202 Accepted OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 202

RuleGroupDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   rules [string] false - List of rule IDs in group
   size integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update rule group data

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rule-groups/{name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_update_firewall_rule_group(name,
    name=name,
    description=description,
    rule_ids=rule_ids)

print(api_response.json())

PUT /v2/firewall/rule-groups/{name}

Update rule group data

Body parameter

{
  "name": "string",
  "description": "string",
  "rule_ids": [
    "string"
  ]
}

Parameters

Name In Type Required Description
name path string true unique rule group name
name body string false New name for rule group. This will change the URI as the name is the unique ID
description body string false -
rule_ids body [string] false -

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "rules": [
      "string"
    ],
    "size": 0
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Group with name foobar already exists"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "group does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

RuleGroupDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   rules [string] false - List of rule IDs in group
   size integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Add Rule to Group

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/rule-groups/{name}/rules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.add_rule_to_group(name,
    rule_id=rule_id)

print(api_response.json())

POST /v2/firewall/rule-groups/{name}/rules

Add firewall rule to a firewall rule group

Body parameter

{
  "rule_id": "string"
}

Parameters

Name In Type Required Description
name path string true unique rule group name
rule_id body string true ID of rule to add to group

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "rules": [
      "string"
    ],
    "size": 0
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Rule 926bc4e70fc7afcd13b8 does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "group does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

RuleGroupDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   rules [string] false - List of rule IDs in group
   size integer false - -

Status Code 201

RuleGroupDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   rules [string] false - List of rule IDs in group
   size integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Fwsets v2

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_fwsets()

print(api_response.json())

GET /v2/firewall/fwsets

Get list of all firewall fwsets API v2

Example responses

200 Response

{
  "response": [
    {
      "name": "humans",
      "description": "overlay clients for human beings",
      "created_at": "2022-06-07T16:22:20.206Z",
      "updated_at": "2022-06-07T16:22:20.206Z",
      "size": 1,
      "type": "net",
      "entries": [
        {
          "entry": "${tag_name_alex_person}",
          "comment": "",
          "entry_resolved": "100.64.0.1",
          "last_resolved": "2022-06-07T16:23:02.275Z",
          "created_at": "2022-06-07T16:23:02.283Z"
        }
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallFWSetV2ListResponse

Name Type Required Constraints Description
  response [object] false - -
   FirewallFWSetV2 object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - Valid ipset type. Supported are net, port, list and service
    size integer false - number of entries in set
    entries [object] false - -
     FirewallFWSetEntry object false - -
      entry string false - -
      comment string false - -
      entry_resolved string false - -
      last_resolved string(date-time) false - -
      created_at string(date-time) false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Fwset v2

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_fwset(
    name=name,
    type=type,
    description=description,
    entries=entries,
      *any*=  *any*,
      *any*=  *any*,
       *any*=   *any*,
       *any*=   *any*,
        entry=    entry,
        comment=    comment)

print(api_response.json())

POST /v2/firewall/fwsets

Create firewall fwset API v2

Body parameter

{
  "name": "string",
  "type": "net",
  "description": "string",
  "entries": "string"
}

Parameters

Name In Type Required Description
name body string true Name of fwset. Alphanumeric, _, - characters allowed. No spaces.
type body string true Valid fwset type. This determines the type of data in the set.
description body string false -
entries body any false -
  any body string false resolve entries. accepts csv
  any body [oneOf] false -
   any body string false list of resolvable entries
   any body object false -
    entry body string true -
    comment body string false -

One of the following param combinations are required:

Enumerated Values

Parameter Value
type net
type list
type service
type port

Example responses

201 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "entries": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ],
    "errors": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z",
        "error": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Invalid fwset type"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
201 Created OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 201

FirewallFWsetSaveResponse

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - Valid ipset type. Supported are net, port, list and service
    size integer false - number of entries in set
    entries [#/paths/~1v2~1firewall~1fwsets/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0] false - -
     FirewallFWSetEntry #/paths/~1v2~1firewall~1fwsets/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -
      entry string false - -
      comment string false - -
      entry_resolved string false - -
      last_resolved string(date-time) false - -
      created_at string(date-time) false - -

and

Name Type Required Constraints Description
   any object false - -
    errors [allOf] false - entry objects that failed insertion into fwset

allOf

Name Type Required Constraints Description
     any #/paths/~1v2~1firewall~1fwsets/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -

and

Name Type Required Constraints Description
     any object false - -
      error string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Read Fwset v2

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_fwset(name,
    osview=osview)

print(api_response.json())

GET /v2/firewall/fwsets/{name}

Read firewall fwset data API v2

Parameters

Name In Type Required Description
name path string true unique fwset name
osview query boolean false Show operating system level entries

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "entries": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "FWSet does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallFWSetDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - Valid ipset type. Supported are net, port, list and service
   size integer false - number of entries in set
   entries [object] false - -
    FirewallFWSetEntry object false - -
     entry string false - -
     comment string false - -
     entry_resolved string false - -
     last_resolved string(date-time) false - -
     created_at string(date-time) false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update Fwset

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets/{name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_update_firewall_fwset(name,
    name=name,
    description=description,
    entries=entries,
      *any*=  *any*,
      *any*=  *any*,
       entry=   entry,
       comment=   comment)

print(api_response.json())

PUT /v2/firewall/fwsets/{name}

Update firewall fwset API v2

Body parameter

{
  "name": "string",
  "description": "string",
  "entries": [
    "string"
  ]
}

Parameters

Name In Type Required Description
name path string true unique fwset name
name body string false Name of fwset. Alphanumeric, _, - characters allowed. No spaces. This will change resource URI.
description body string false -
entries body [oneOf] false -
  any body string false list of resolvable entries
  any body object false -
   entry body string true -
   comment body string false -

One of the following param combinations are required:

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "entries": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ],
    "errors": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z",
        "error": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Failed to rename set. OS error: FooBar"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "FWSet does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallFWsetSaveResponse

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - Valid ipset type. Supported are net, port, list and service
    size integer false - number of entries in set
    entries [#/paths/~1v2~1firewall~1fwsets/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0] false - -
     FirewallFWSetEntry #/paths/~1v2~1firewall~1fwsets/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -
      entry string false - -
      comment string false - -
      entry_resolved string false - -
      last_resolved string(date-time) false - -
      created_at string(date-time) false - -

and

Name Type Required Constraints Description
   any object false - -
    errors [allOf] false - entry objects that failed insertion into fwset

allOf

Name Type Required Constraints Description
     any #/paths/~1v2~1firewall~1fwsets/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -

and

Name Type Required Constraints Description
     any object false - -
      error string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Fwset v2

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_fwset(name,
    force=force)

print(api_response.json())

DELETE /v2/firewall/fwsets/{name}

Delete firewall fwset API v2

Parameters

Name In Type Required Description
name path string true unique fwset name
force query boolean false Force delete if fwset is associated with rules or other fwsets

Example responses

202 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "entries": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915614338789304780698957922014",
    "message": "FWSet has references. These can be firewall rules or other fwsets."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "fwset does not exist"
  }
}

Responses

Status Meaning Description Schema
202 Accepted OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 202

FirewallFWSetDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - Valid ipset type. Supported are net, port, list and service
   size integer false - number of entries in set
   entries [object] false - -
    FirewallFWSetEntry object false - -
     entry string false - -
     comment string false - -
     entry_resolved string false - -
     last_resolved string(date-time) false - -
     created_at string(date-time) false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Fwset Entry

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets/{name}/entries \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.add_entry_to_fwset(name,
    entry=entry,
    comment=comment)

print(api_response.json())

POST /v2/firewall/fwsets/{name}/entries

Add entry to Fwset API v2

Body parameter

{
  "entry": "string",
  "comment": "string"
}

Parameters

Name In Type Required Description
name path string true unique fwset name
entry body string true resolvable entry for fwset
comment body string false -

Example responses

201 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "entries": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Error creating entry: foobar"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "FWSet does not exist"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 201

FirewallFWSetDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - Valid ipset type. Supported are net, port, list and service
   size integer false - number of entries in set
   entries [object] false - -
    FirewallFWSetEntry object false - -
     entry string false - -
     comment string false - -
     entry_resolved string false - -
     last_resolved string(date-time) false - -
     created_at string(date-time) false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Fwset Entry

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/v2/firewall/fwsets/{name}/entries \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_entry_from_fwset(name,
    entry=entry)

print(api_response.json())

DELETE /v2/firewall/fwsets/{name}/entries

Remove entry from fwset

Body parameter

{
  "entry": "string"
}

Parameters

Name In Type Required Description
name path string true unique fwset name
entry body string true resolved or resolvable entry to delete

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "entries": [
      {
        "entry": "string",
        "comment": "string",
        "entry_resolved": "string",
        "last_resolved": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Error deleting entry: foobar"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "FWSet does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallFWSetDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - Valid ipset type. Supported are net, port, list and service
   size integer false - number of entries in set
   entries [object] false - -
    FirewallFWSetEntry object false - -
     entry string false - -
     comment string false - -
     entry_resolved string false - -
     last_resolved string(date-time) false - -
     created_at string(date-time) false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

List Subtables

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_subtables()

print(api_response.json())

GET /v2/firewall/subtables

Get list of all firewall subtables API v2

Example responses

200 Response

{
  "response": [
    {
      "name": "test_my_group",
      "description": "Route prerouting traffic to my test ips",
      "type": "prerouting",
      "created_at": "2022-07-12T15:37:41.056Z",
      "updated_at": "2022-07-12T15:37:41.056Z",
      "size": 1,
      "rules": [
        {
          "rule": "test_my_group -i eth0 -j ACCEPT",
          "position": 0,
          "comment": "",
          "rule_resolved": "test_my_group -i eth0 -j ACCEPT",
          "disabled": false,
          "id": "0e85478506eb73b213bb"
        }
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

FirewallSubtableListResponse

Name Type Required Constraints Description
  response [object] false - -
   FirewallSubtable object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - table this subtable can be routed to from such as prerouting
    size integer false - -
    rules [object] false - -
     FirewallSubtableRule object false - -
      rule string false - -
      rule_resolved string false - -
      position integer false - -
      comment string false - -
      id string false - -
      disabled boolean false - -
      os_rules [object] false - -
       rule string false - -
       position integer false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Subtable

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.post_create_firewall_subtable(
    name=name,
    type=type,
    description=description,
    rules=rules,
      rule=  rule,
      position=  position,
      comment=  comment,
      disabled=  disabled)

print(api_response.json())

POST /v2/firewall/subtables

Create firewall subtable API v2

Body parameter

{
  "name": "string",
  "type": "string",
  "description": "string",
  "rules": [
    {
      "rule": "string",
      "position": 0,
      "comment": "string",
      "disabled": false
    }
  ]
}

Parameters

Name In Type Required Description
name body string true Name of subtable. Alphanumeric, _, - characters allowed. No spaces.
type body string true Valid table. This determines which main tables can route to this subtable.
description body string false -
rules body [object] false -
  rule body string true -
  position body integer true -
  comment body string false -
  disabled body boolean false -

Example responses

201 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "rules": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ]
      }
    ],
    "errors": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ],
        "error": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "invalid subtable type"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
201 Created OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 201

FirewallSubtableCreateResponse

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - table this subtable can be routed to from such as prerouting
    size integer false - -
    rules [#/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0] false - -
     FirewallSubtableRule #/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -
      rule string false - -
      rule_resolved string false - -
      position integer false - -
      comment string false - -
      id string false - -
      disabled boolean false - -
      os_rules [object] false - -
       rule string false - -
       position integer false - -

and

Name Type Required Constraints Description
   any object false - -
    errors [allOf] false - Rule objects that failed insertion into subtable

allOf

Name Type Required Constraints Description
     any #/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -

and

Name Type Required Constraints Description
     any object false - -
      error string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Read Subtable

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.get_firewall_subtable(name,
    osview=osview)

print(api_response.json())

GET /v2/firewall/subtables/{name}

Read firewall subtable data API v2

Parameters

Name In Type Required Description
name path string true unique subtable name
osview query boolean false Show operating system level rules

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "rules": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ]
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Subtable does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallSubtableDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - table this subtable can be routed to from such as prerouting
   size integer false - -
   rules [object] false - -
    FirewallSubtableRule object false - -
     rule string false - -
     rule_resolved string false - -
     position integer false - -
     comment string false - -
     id string false - -
     disabled boolean false - -
     os_rules [object] false - -
      rule string false - -
      position integer false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update Subtable

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables/{name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.put_update_firewall_subtable(name,
    description=description,
    rules=rules,
      rule=  rule,
      position=  position,
      comment=  comment,
      disabled=  disabled)

print(api_response.json())

PUT /v2/firewall/subtables/{name}

Update firewall subtable API v2

Body parameter

{
  "description": "string",
  "rules": [
    {
      "rule": "string",
      "position": 0,
      "comment": "string",
      "disabled": false
    }
  ]
}

Parameters

Name In Type Required Description
name path string true unique subtable name
description body string false -
rules body [object] false -
  rule body string true -
  position body integer true -
  comment body string false -
  disabled body boolean false -

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "rules": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ]
      }
    ],
    "errors": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ],
        "error": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Subtable does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

FirewallSubtableCreateResponse

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - table this subtable can be routed to from such as prerouting
    size integer false - -
    rules [#/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0] false - -
     FirewallSubtableRule #/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -
      rule string false - -
      rule_resolved string false - -
      position integer false - -
      comment string false - -
      id string false - -
      disabled boolean false - -
      os_rules [object] false - -
       rule string false - -
       position integer false - -

and

Name Type Required Constraints Description
   any object false - -
    errors [allOf] false - Rule objects that failed insertion into subtable

allOf

Name Type Required Constraints Description
     any #/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -

and

Name Type Required Constraints Description
     any object false - -
      error string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Subtable

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_subtable(name,
    force=force)

print(api_response.json())

DELETE /v2/firewall/subtables/{name}

Delete firewall subtable API v2

Parameters

Name In Type Required Description
name path string true unique subtable name
force query boolean false Force delete if subtable is associated with rules in main firewall policy

Example responses

202 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "rules": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ]
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915614338789304780698957922014",
    "message": "Firewall rule with subtable exists. Please delete rule first."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Subtable does not exist"
  }
}

Responses

Status Meaning Description Schema
202 Accepted OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 202

FirewallSubtableDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - table this subtable can be routed to from such as prerouting
   size integer false - -
   rules [object] false - -
    FirewallSubtableRule object false - -
     rule string false - -
     rule_resolved string false - -
     position integer false - -
     comment string false - -
     id string false - -
     disabled boolean false - -
     os_rules [object] false - -
      rule string false - -
      position integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Subtable rule

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables/{name}/rules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.add_rule_to_subtable(name,
    rule=rule,
    position=position,
    comment=comment,
    disabled=disabled)

print(api_response.json())

POST /v2/firewall/subtables/{name}/rules

Add rule to firewall subtable API v2

Body parameter

{
  "rule": "string",
  "position": -1,
  "comment": "string",
  "disabled": false
}

Parameters

Name In Type Required Description
name path string true unique subtable name
rule body string true -
position body integer false Position of rule in subtable. -1 indicates the end of the subtable
comment body string false -
disabled body boolean false -

Example responses

201 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "rules": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ]
      }
    ],
    "errors": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ],
        "error": "string"
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915664338789304780698957922014",
    "message": "Invalid rule for subtable. Subtable rules must start with name of subtable."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Subtable does not exist"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 201

FirewallSubtableCreateResponse

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    name string false - -
    description string false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    type string false - table this subtable can be routed to from such as prerouting
    size integer false - -
    rules [#/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0] false - -
     FirewallSubtableRule #/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -
      rule string false - -
      rule_resolved string false - -
      position integer false - -
      comment string false - -
      id string false - -
      disabled boolean false - -
      os_rules [object] false - -
       rule string false - -
       position integer false - -

and

Name Type Required Constraints Description
   any object false - -
    errors [allOf] false - Rule objects that failed insertion into subtable

allOf

Name Type Required Constraints Description
     any #/paths/~1v2~1firewall~1subtables/post/responses/201/content/application~1json/schema/properties/response/allOf/1/properties/errors/items/allOf/0 false - -

and

Name Type Required Constraints Description
     any object false - -
      error string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete Subtable Rule

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/v2/firewall/subtables/{name}/rules/{id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.firewall.delete_firewall_subtable_rule(name,id)

print(api_response.json())

DELETE /v2/firewall/subtables/{name}/rules/{id}

Delete firewall subtable rule API v2

Parameters

Name In Type Required Description
name path string true unique subtable name
id path integer true ID of rule

Example responses

202 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": "string",
    "size": 0,
    "rules": [
      {
        "rule": "string",
        "rule_resolved": "string",
        "position": 0,
        "comment": "string",
        "id": "string",
        "disabled": true,
        "os_rules": [
          {
            "rule": "string",
            "position": 0
          }
        ]
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIBadRequestError",
    "log": "1564155261466915614338789304780698957922014",
    "message": "Rule does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Subtable does not exist"
  }
}

Responses

Status Meaning Description Schema
202 Accepted OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 202

FirewallSubtableDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   type string false - table this subtable can be routed to from such as prerouting
   size integer false - -
   rules [object] false - -
    FirewallSubtableRule object false - -
     rule string false - -
     rule_resolved string false - -
     position integer false - -
     comment string false - -
     id string false - -
     disabled boolean false - -
     os_rules [object] false - -
      rule string false - -
      position integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Routing

Control the network route table

Get routes

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/routes \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.routing.get_routes(
    table=table)

print(api_response.json())

GET /routes

Describes routes that this manager has access to via its network interfaces (virtual or otherwise). If advertized, other VNS3 Controllers will receive the route instantly. Network clients will receive it when they get their next route push, which is normally on a re-connect or in neartime if they use the VNS3 Routing agent on their cloud servers. Remote endpoints (other data centers) would not receive the route unless specified as part of their IPsec Configuration AND the Configuration of such a tunnel on the VNS3 controller.

Parameters

Name In Type Required Description
table query string false name of table to get routes for

Example responses

200 Response

{
  "response": {
    "1": {
      "netmask": "240.0.0.0",
      "id": 1,
      "cidr": "224.0.0.0/4",
      "interface": "tun0",
      "description": "Multicast (auto-added)",
      "advertise": false,
      "metric": 0,
      "enabled": true
    },
    "2": {
      "netmask": "255.255.255.0",
      "id": 2,
      "cidr": "192.168.1.0/24",
      "gateway": "192.168.1.1",
      "interface": "eth0",
      "description": "US West Peer",
      "advertise": false,
      "metric": 0,
      "enabled": true
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

RoutesListResponse

Name Type Required Constraints Description
  response object false - -
   Route object false - -
    id integer false - -
    cidr string false - -
    interface string false - -
    netmask string false - -
    description string false - -
    advertise boolean false - -
    enabled boolean false - -
    editable boolean false - -
    metric integer false - -
    gateway string false - -
    table string false - -
    route_based_interface string false - -
    route_based_gateway string false - -
    msg string false - message about state of route
    tunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
    traffic_pair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Create route

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/routes \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.routing.post_create_route(
    cidr=cidr,
    description=description,
    interface=interface,
    gateway=gateway,
    table=table,
    tunnel=tunnel,
    advertise=advertise,
    metric=metric)

print(api_response.json())

POST /routes

Pushes routes that this manager has access to via its network interfaces (virtual or otherwise)

Body parameter

{
  "cidr": "string",
  "description": "string",
  "interface": "string",
  "gateway": "string",
  "table": "main",
  "tunnel": 1,
  "advertise": true,
  "metric": 0
}

Parameters

Name In Type Required Description
cidr body string true CIDR of a route that the VNS3 Controller has access to that it wants to publish throughout the Routing tables of the overlay network
description body string false -
interface body string false Sets the interface where this route will be advertised.
gateway body string false If interface is set, a specific gateway address reachable from that interface
table body string false Table to create route for
tunnel body integer false numerical reference for the GRE endpoint id (must provide either tunnel OR interface)
advertise body boolean false advertise route to overlay network
metric body integer false weight for route

Example responses

200 Response

{
  "response": {
    "1": {
      "netmask": "240.0.0.0",
      "id": 1,
      "cidr": "224.0.0.0/4",
      "interface": "tun0",
      "description": "Multicast (auto-added)",
      "advertise": false,
      "metric": 0,
      "enabled": true
    },
    "2": {
      "netmask": "255.255.255.0",
      "id": 2,
      "cidr": "192.168.1.0/24",
      "interface": "eth0",
      "gateway": "192.168.1.1",
      "description": "Peer 1 subnet Gateway",
      "advertise": false,
      "metric": 0,
      "enabled": true
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "Validation failed: Ipsec tunnel bad tunnel ID"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

RoutesListResponse

Name Type Required Constraints Description
  response object false - -
   Route object false - -
    id integer false - -
    cidr string false - -
    interface string false - -
    netmask string false - -
    description string false - -
    advertise boolean false - -
    enabled boolean false - -
    editable boolean false - -
    metric integer false - -
    gateway string false - -
    table string false - -
    route_based_interface string false - -
    route_based_gateway string false - -
    msg string false - message about state of route
    tunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
    traffic_pair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete route

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/routes/{route_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.routing.delete_route(route_id)

print(api_response.json())

DELETE /routes/{route_id}

Delete route

Parameters

Name In Type Required Description
route_id path integer true ID for Route

Example responses

200 Response

{
  "response": {
    "property1": {
      "id": 1,
      "cidr": "string",
      "interface": "string",
      "netmask": "string",
      "description": "string",
      "advertise": true,
      "enabled": true,
      "editable": true,
      "metric": 0,
      "gateway": "string",
      "table": "string",
      "route_based_interface": "string",
      "route_based_gateway": "string",
      "msg": "string",
      "tunnel": {
        "id": 1,
        "local_subnet": "string",
        "remote_subnet": "string",
        "endpointid": 1,
        "endpoint_id": 1,
        "endpoint_name": "string",
        "enabled": true,
        "active": true,
        "description": "string",
        "bounce": true,
        "connected": true,
        "ping_interface": "eth0",
        "ping_interval": 0,
        "ping_ipaddress": "string",
        "tunnel_params": {
          "phase2": "string",
          "outbound_spi": "string",
          "inbound_spi": "string",
          "bytes_in": "string",
          "bytes_out": "string",
          "esp_time_remaining": "string",
          "esp_port": "string",
          "phase2_algo": "string",
          "phase2_hash": "string",
          "nat_t": "string",
          "dpd": "string",
          "pfs_dh_group": "string",
          "phase1": "string",
          "isakmp_port": "string",
          "isakmp_time_remaining": "string",
          "last_dpd": "string",
          "phase1_cipher": "string",
          "phase1_prf": "string",
          "phase1_dh_group": "string",
          "ike_version": "string"
        }
      },
      "traffic_pair": {
        "id": 1,
        "remote_subnet": "string",
        "local_subnet": "string",
        "ping_ipaddress": "string",
        "ping_interface": "string",
        "ping_interval": 0,
        "enabled": true,
        "description": "string",
        "ipsec_endpoint_id": 0,
        "endpoint_id": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
      }
    },
    "property2": {
      "id": 1,
      "cidr": "string",
      "interface": "string",
      "netmask": "string",
      "description": "string",
      "advertise": true,
      "enabled": true,
      "editable": true,
      "metric": 0,
      "gateway": "string",
      "table": "string",
      "route_based_interface": "string",
      "route_based_gateway": "string",
      "msg": "string",
      "tunnel": {
        "id": 1,
        "local_subnet": "string",
        "remote_subnet": "string",
        "endpointid": 1,
        "endpoint_id": 1,
        "endpoint_name": "string",
        "enabled": true,
        "active": true,
        "description": "string",
        "bounce": true,
        "connected": true,
        "ping_interface": "eth0",
        "ping_interval": 0,
        "ping_ipaddress": "string",
        "tunnel_params": {
          "phase2": "string",
          "outbound_spi": "string",
          "inbound_spi": "string",
          "bytes_in": "string",
          "bytes_out": "string",
          "esp_time_remaining": "string",
          "esp_port": "string",
          "phase2_algo": "string",
          "phase2_hash": "string",
          "nat_t": "string",
          "dpd": "string",
          "pfs_dh_group": "string",
          "phase1": "string",
          "isakmp_port": "string",
          "isakmp_time_remaining": "string",
          "last_dpd": "string",
          "phase1_cipher": "string",
          "phase1_prf": "string",
          "phase1_dh_group": "string",
          "ike_version": "string"
        }
      },
      "traffic_pair": {
        "id": 1,
        "remote_subnet": "string",
        "local_subnet": "string",
        "ping_ipaddress": "string",
        "ping_interface": "string",
        "ping_interval": 0,
        "enabled": true,
        "description": "string",
        "ipsec_endpoint_id": 0,
        "endpoint_id": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
      }
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "bad route id or route not found"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

RoutesListResponse

Name Type Required Constraints Description
  response object false - -
   Route object false - -
    id integer false - -
    cidr string false - -
    interface string false - -
    netmask string false - -
    description string false - -
    advertise boolean false - -
    enabled boolean false - -
    editable boolean false - -
    metric integer false - -
    gateway string false - -
    table string false - -
    route_based_interface string false - -
    route_based_gateway string false - -
    msg string false - message about state of route
    tunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
    traffic_pair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Disable route

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/routes/{route_id}/disable \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.routing.disable_route(route_id)

print(api_response.json())

PUT /routes/{route_id}/disable

Disable route

Parameters

Name In Type Required Description
route_id path integer true ID for Route

Example responses

200 Response

{
  "response": {
    "id": 1,
    "cidr": "string",
    "interface": "string",
    "netmask": "string",
    "description": "string",
    "advertise": true,
    "enabled": true,
    "editable": true,
    "metric": 0,
    "gateway": "string",
    "table": "string",
    "route_based_interface": "string",
    "route_based_gateway": "string",
    "msg": "string",
    "tunnel": {
      "id": 1,
      "local_subnet": "string",
      "remote_subnet": "string",
      "endpointid": 1,
      "endpoint_id": 1,
      "endpoint_name": "string",
      "enabled": true,
      "active": true,
      "description": "string",
      "bounce": true,
      "connected": true,
      "ping_interface": "eth0",
      "ping_interval": 0,
      "ping_ipaddress": "string",
      "tunnel_params": {
        "phase2": "string",
        "outbound_spi": "string",
        "inbound_spi": "string",
        "bytes_in": "string",
        "bytes_out": "string",
        "esp_time_remaining": "string",
        "esp_port": "string",
        "phase2_algo": "string",
        "phase2_hash": "string",
        "nat_t": "string",
        "dpd": "string",
        "pfs_dh_group": "string",
        "phase1": "string",
        "isakmp_port": "string",
        "isakmp_time_remaining": "string",
        "last_dpd": "string",
        "phase1_cipher": "string",
        "phase1_prf": "string",
        "phase1_dh_group": "string",
        "ike_version": "string"
      }
    },
    "traffic_pair": {
      "id": 1,
      "remote_subnet": "string",
      "local_subnet": "string",
      "ping_ipaddress": "string",
      "ping_interface": "string",
      "ping_interval": 0,
      "enabled": true,
      "description": "string",
      "ipsec_endpoint_id": 0,
      "endpoint_id": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "bad route id or route not found"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

RouteDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   cidr string false - -
   interface string false - -
   netmask string false - -
   description string false - -
   advertise boolean false - -
   enabled boolean false - -
   editable boolean false - -
   metric integer false - -
   gateway string false - -
   table string false - -
   route_based_interface string false - -
   route_based_gateway string false - -
   msg string false - message about state of route
   tunnel object false - -
    id integer false - -
    local_subnet string false - -
    remote_subnet string false - -
    endpointid integer false - -
    endpoint_id integer false - -
    endpoint_name string false - -
    enabled boolean false - -
    active boolean false - -
    description string¦null false - -
    bounce boolean false - True if tunnel was just bounced
    connected boolean false - -
    ping_interface string false - -
    ping_interval integer¦null false - Interval for ping in seconds
    ping_ipaddress string false - -
    tunnel_params object false - -
     phase2 string false - -
     outbound_spi string false - -
     inbound_spi string false - -
     bytes_in string false - -
     bytes_out string false - -
     esp_time_remaining string false - -
     esp_port string false - -
     phase2_algo string false - -
     phase2_hash string false - -
     nat_t string false - -
     dpd string false - -
     pfs_dh_group string¦null false - -
     phase1 string false - -
     isakmp_port string false - -
     isakmp_time_remaining string false - -
     last_dpd string false - -
     phase1_cipher string¦null false - -
     phase1_prf string¦null false - -
     phase1_dh_group string¦null false - -
     ike_version string false - -
   traffic_pair object false - -
    id integer false - -
    remote_subnet string false - -
    local_subnet string false - -
    ping_ipaddress string¦null false - -
    ping_interface string false - -
    ping_interval integer false - -
    enabled boolean false - -
    description string¦null false - -
    ipsec_endpoint_id integer false - -
    endpoint_id integer false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Enable route

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/routes/{route_id}/enable \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.routing.enable_route(route_id)

print(api_response.json())

PUT /routes/{route_id}/enable

Enable route

Parameters

Name In Type Required Description
route_id path integer true ID for Route

Example responses

200 Response

{
  "response": {
    "id": 1,
    "cidr": "string",
    "interface": "string",
    "netmask": "string",
    "description": "string",
    "advertise": true,
    "enabled": true,
    "editable": true,
    "metric": 0,
    "gateway": "string",
    "table": "string",
    "route_based_interface": "string",
    "route_based_gateway": "string",
    "msg": "string",
    "tunnel": {
      "id": 1,
      "local_subnet": "string",
      "remote_subnet": "string",
      "endpointid": 1,
      "endpoint_id": 1,
      "endpoint_name": "string",
      "enabled": true,
      "active": true,
      "description": "string",
      "bounce": true,
      "connected": true,
      "ping_interface": "eth0",
      "ping_interval": 0,
      "ping_ipaddress": "string",
      "tunnel_params": {
        "phase2": "string",
        "outbound_spi": "string",
        "inbound_spi": "string",
        "bytes_in": "string",
        "bytes_out": "string",
        "esp_time_remaining": "string",
        "esp_port": "string",
        "phase2_algo": "string",
        "phase2_hash": "string",
        "nat_t": "string",
        "dpd": "string",
        "pfs_dh_group": "string",
        "phase1": "string",
        "isakmp_port": "string",
        "isakmp_time_remaining": "string",
        "last_dpd": "string",
        "phase1_cipher": "string",
        "phase1_prf": "string",
        "phase1_dh_group": "string",
        "ike_version": "string"
      }
    },
    "traffic_pair": {
      "id": 1,
      "remote_subnet": "string",
      "local_subnet": "string",
      "ping_ipaddress": "string",
      "ping_interface": "string",
      "ping_interval": 0,
      "enabled": true,
      "description": "string",
      "ipsec_endpoint_id": 0,
      "endpoint_id": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "bad route id or route not found"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

RouteDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   cidr string false - -
   interface string false - -
   netmask string false - -
   description string false - -
   advertise boolean false - -
   enabled boolean false - -
   editable boolean false - -
   metric integer false - -
   gateway string false - -
   table string false - -
   route_based_interface string false - -
   route_based_gateway string false - -
   msg string false - message about state of route
   tunnel object false - -
    id integer false - -
    local_subnet string false - -
    remote_subnet string false - -
    endpointid integer false - -
    endpoint_id integer false - -
    endpoint_name string false - -
    enabled boolean false - -
    active boolean false - -
    description string¦null false - -
    bounce boolean false - True if tunnel was just bounced
    connected boolean false - -
    ping_interface string false - -
    ping_interval integer¦null false - Interval for ping in seconds
    ping_ipaddress string false - -
    tunnel_params object false - -
     phase2 string false - -
     outbound_spi string false - -
     inbound_spi string false - -
     bytes_in string false - -
     bytes_out string false - -
     esp_time_remaining string false - -
     esp_port string false - -
     phase2_algo string false - -
     phase2_hash string false - -
     nat_t string false - -
     dpd string false - -
     pfs_dh_group string¦null false - -
     phase1 string false - -
     isakmp_port string false - -
     isakmp_time_remaining string false - -
     last_dpd string false - -
     phase1_cipher string¦null false - -
     phase1_prf string¦null false - -
     phase1_dh_group string¦null false - -
     ike_version string false - -
   traffic_pair object false - -
    id integer false - -
    remote_subnet string false - -
    local_subnet string false - -
    ping_ipaddress string¦null false - -
    ping_interface string false - -
    ping_interval integer false - -
    enabled boolean false - -
    description string¦null false - -
    ipsec_endpoint_id integer false - -
    endpoint_id integer false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Overlay Network

Configure and control encrypted overlay network

Get clients status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/status/clients \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_clients_status()

print(api_response.json())

GET /status/clients

Describe overlay clients

Example responses

200 Response

{
  "response": {
    "property1": {
      "managerid": 1,
      "overlay_ipaddress": "string",
      "ipaddress": "string",
      "tags": {
        "property1": "string",
        "property2": "string"
      }
    },
    "property2": {
      "managerid": 1,
      "overlay_ipaddress": "string",
      "ipaddress": "string",
      "tags": {
        "property1": "string",
        "property2": "string"
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

OverlayClientsListResponse

Name Type Required Constraints Description
  response object false - Client details with IPs as keys
   OverlayClient object false - -
    managerid integer false - -
    overlay_ipaddress string false - -
    ipaddress string false - -
    tags object false - Key, value object of tags
     additionalProperties string false - -

Get clientpacks

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/clientpacks \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_clientpacks(
    sorted=sorted)

print(api_response.json())

GET /clientpacks

Returns detailed information about all of the clientpacks in the topology. If manager's are properly peered, this information can come from any of the controllers.

Parameters

Name In Type Required Description
sorted query boolean false Sort resources

Example responses

200 Response

{
  "response": {
    "property1": {
      "name": "string",
      "overlay_ipaddress": "string",
      "linux_onefile": "string",
      "enabled": true,
      "conf_sha1": "string",
      "windows_onefile": "string",
      "ovpn_sha1": "string",
      "tarball_file": "string",
      "tarball_sha1": "string",
      "sequential_id": 0,
      "checked_out": true,
      "zip_sha1": "string",
      "zip_file": "string",
      "last_connect": "string",
      "last_disconnect": "string",
      "compression": "string",
      "manager_id": "string",
      "ipaddress": "string",
      "status": "string",
      "connected": true,
      "tags": {
        "property1": "string",
        "property2": "string"
      }
    },
    "property2": {
      "name": "string",
      "overlay_ipaddress": "string",
      "linux_onefile": "string",
      "enabled": true,
      "conf_sha1": "string",
      "windows_onefile": "string",
      "ovpn_sha1": "string",
      "tarball_file": "string",
      "tarball_sha1": "string",
      "sequential_id": 0,
      "checked_out": true,
      "zip_sha1": "string",
      "zip_file": "string",
      "last_connect": "string",
      "last_disconnect": "string",
      "compression": "string",
      "manager_id": "string",
      "ipaddress": "string",
      "status": "string",
      "connected": true,
      "tags": {
        "property1": "string",
        "property2": "string"
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset is missing",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ClientpackListResponse

Name Type Required Constraints Description
  response object false - -
   ClientPack object false - -
    name string false - -
    overlay_ipaddress string false - -
    linux_onefile string false - -
    enabled boolean false - -
    conf_sha1 string false - -
    windows_onefile string false - -
    ovpn_sha1 string false - -
    tarball_file string false - -
    tarball_sha1 string false - -
    sequential_id integer false - -
    checked_out boolean false - -
    zip_sha1 string false - -
    zip_file string false - -
    last_connect string false - -
    last_disconnect string false - -
    compression string false - VPN compression status. on, off or error message.
    manager_id string false - -
    ipaddress string false - -
    status string false - -
    connected boolean false - -
    tags object false - Key, value object of tags
     additionalProperties string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update all clientpacks

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/clientpacks \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.put_update_all_clientpacks(
    enabled=enabled,
    checked_out=checked_out,
    compression=compression,
    auth_on=auth_on,
    psk_on=psk_on,
    async=async)

print(api_response.json())

PUT /clientpacks

For bulk set of the enabled (true/false) state for all clientpacks and the checked_out (true/false) state for all clientpacks. This enables a variety of work flows by calling these functions after key generation, but before general provisioning of addresses to devivces

Body parameter

{
  "enabled": true,
  "checked_out": true,
  "compression": "string",
  "auth_on": true,
  "psk_on": true,
  "async": true
}

Parameters

Name In Type Required Description
enabled body boolean false Enable or disable clientpacks.
checked_out body boolean false Update whether clientpacks are checked out and thus unavailable
compression body string false Turn compression on or off for all. Can be "on" or "off" currently.
auth_on body boolean false Enable authentication for all clientpacks
psk_on body boolean false Enable PSK for all clientpacks. Wireguard only.
async body boolean false Background task and return task ID instead of blocking

Example responses

200 Response

{
  "response": {
    "enabled": true,
    "checked_out": true
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156383509848878372758564869593812797782733",
    "message": "Argument must have a true or false value"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first.",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

UpdateClientpacksStatusResponse

Name Type Required Constraints Description
  response object false - -
   enabled boolean false - -
   checked_out boolean false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create new clientpack

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/clientpacks/add_clientpacks \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.post_add_clientpacks(
    requested_ips=requested_ips)

print(api_response.json())

POST /clientpacks/add_clientpacks

Incrementally add new clientpacks for use

Body parameter

{
  "requested_ips": "string"
}

Parameters

Name In Type Required Description
requested_ips body string true CSV of IP addresses to be used for new clientpacks

Example responses

200 Response

{
  "response": "string"
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Not enough room in license for 5 more clientpacks.",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get clientpack details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/clientpacks/{clientpack_name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_clientpack(clientpack_name)

print(api_response.json())

GET /clientpacks/{clientpack_name}

Returns detailed information about all of the clientpacks in the topology. If manager's are properly peered, this information can come from any of the controllers.

Parameters

Name In Type Required Description
clientpack_name path string true name of clientpack

Example responses

200 Response

{
  "response": {
    "clientpack": {
      "name": "string",
      "overlay_ipaddress": "string",
      "linux_onefile": "string",
      "enabled": true,
      "conf_sha1": "string",
      "windows_onefile": "string",
      "ovpn_sha1": "string",
      "tarball_file": "string",
      "tarball_sha1": "string",
      "sequential_id": 0,
      "checked_out": true,
      "zip_sha1": "string",
      "zip_file": "string",
      "last_connect": "string",
      "last_disconnect": "string",
      "compression": "string",
      "manager_id": "string",
      "ipaddress": "string",
      "status": "string",
      "connected": true,
      "tags": {
        "property1": "string",
        "property2": "string"
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset is missing",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ClientpackDetailResponse

Name Type Required Constraints Description
  response object false - -
   clientpack object false - -
    name string false - -
    overlay_ipaddress string false - -
    linux_onefile string false - -
    enabled boolean false - -
    conf_sha1 string false - -
    windows_onefile string false - -
    ovpn_sha1 string false - -
    tarball_file string false - -
    tarball_sha1 string false - -
    sequential_id integer false - -
    checked_out boolean false - -
    zip_sha1 string false - -
    zip_file string false - -
    last_connect string false - -
    last_disconnect string false - -
    compression string false - VPN compression status. on, off or error message.
    manager_id string false - -
    ipaddress string false - -
    status string false - -
    connected boolean false - -
    tags object false - Key, value object of tags
     additionalProperties string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Download clientpack

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/clientpack?name=string&fileformat=string \
  -H 'Accept: application/octet-stream'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_download_clientpack(
    name=name,
    fileformat=fileformat)

print(api_response.file_download)   # path to downloaded file

GET /clientpack

Returns clientpack file. Clientpacks are files with the necessary information and credentials for an overlay client to be connected to the VNS3 topology

Parameters

Name In Type Required Description
name query string true name of clientpack. Typical IP address with underscores. e.g. 100_127_255_200.
fileformat query string true One of tarball, tar.gz, zip, conf, ovpn

Example responses

200 Response

"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Clientpack file string
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update clientpack

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/clientpack \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.put_update_clientpack(
    name=name,
    enabled=enabled,
    checked_out=checked_out,
    regenerate=regenerate,
    compression=compression,
    auth_on=auth_on,
    psk_on=psk_on)

print(api_response.json())

PUT /clientpack

Change properties of clientpacks; enabling or disabling, checking in or out, or regenerating

Body parameter

{
  "name": "string",
  "enabled": true,
  "checked_out": true,
  "regenerate": true,
  "compression": "string",
  "auth_on": true,
  "psk_on": true
}

Parameters

Name In Type Required Description
name body string true Name of the clientpack (IP snake case)
enabled body boolean false Enable or disable clientpack.
checked_out body boolean false Update whether clientpack is checked out and thus unavailable
regenerate body boolean false Regenerate clientpack file. Returns a task token in the response.
compression body string false Turn compression on or off for all. Can be "on" or "off" currently.
auth_on body boolean false Enable authentication for clientpack.
psk_on body boolean false Enable PSK for clientpack. Wireguard only.

Example responses

200 Response

{
  "response": {
    "token": "string",
    "status": "string"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156383509848878372758564869593812797782733",
    "message": "name argument must be set"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

UpdateClientpack

Name Type Required Constraints Description
UpdateClientpack any false - -

oneOf

Name Type Required Constraints Description
  any object false - -
   response object false - -
    token string false - -
    status string false - -

xor

Name Type Required Constraints Description
  any object false - -
   response object false - -
    name string false - -
    overlay_ipaddress string false - -
    linux_onefile string false - -
    enabled boolean false - -
    conf_sha1 string false - -
    windows_onefile string false - -
    ovpn_sha1 string false - -
    tarball_file string false - -
    tarball_sha1 string false - -
    sequential_id integer false - -
    checked_out boolean false - -
    zip_sha1 string false - -
    zip_file string false - -
    last_connect string false - -
    last_disconnect string false - -
    compression string false - VPN compression status. on, off or error message.
    manager_id string false - -
    ipaddress string false - -
    status string false - -
    connected boolean false - -
    tags object false - Key, value object of tags
     additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Checkout next clientpack

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/clientpacks/next_available \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.post_checkout_next_clientpack(
    low_ip=low_ip,
    high_ip=high_ip,
    include_disabled=include_disabled)

print(api_response.json())

POST /clientpacks/next_available

Get next sequential client pack. Provides sufficient information to call GET /clientpack. Note, Using this resource against multiple controllers in the same topology could cause distribution of the same clientpack to multiple overlay devices which is not allowed.

Body parameter

{
  "low_ip": "string",
  "high_ip": "string",
  "include_disabled": false
}

Parameters

Name In Type Required Description
low_ip body string false Set the lower bound for the resulting IP
high_ip body string false Set the upper bound for the resulting IP
include_disabled body boolean false Allows clientpack allocation from the disabled pool, for workflows where all clientpacks are disabled at the start.

Example responses

200 Response

{
  "response": {
    "token": "string",
    "status": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset is missing",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

UpdateClientpack

Name Type Required Constraints Description
UpdateClientpack any false - -

oneOf

Name Type Required Constraints Description
  any object false - -
   response object false - -
    token string false - -
    status string false - -

xor

Name Type Required Constraints Description
  any object false - -
   response object false - -
    name string false - -
    overlay_ipaddress string false - -
    linux_onefile string false - -
    enabled boolean false - -
    conf_sha1 string false - -
    windows_onefile string false - -
    ovpn_sha1 string false - -
    tarball_file string false - -
    tarball_sha1 string false - -
    sequential_id integer false - -
    checked_out boolean false - -
    zip_sha1 string false - -
    zip_file string false - -
    last_connect string false - -
    last_disconnect string false - -
    compression string false - VPN compression status. on, off or error message.
    manager_id string false - -
    ipaddress string false - -
    status string false - -
    connected boolean false - -
    tags object false - Key, value object of tags
     additionalProperties string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Reset client

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/client/reset \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.post_reset_client(
    name=name,
    disconnect=disconnect)

print(api_response.json())

POST /client/reset

For resetting the connection of a client to a VNS3 Controller

Body parameter

{
  "name": "string",
  "disconnect": true
}

Parameters

Name In Type Required Description
name body string true Name of the clientpack as returned by the "desc_clientpacks" call
disconnect body boolean false -

Example responses

200 Response

{
  "response": {
    "disconnecting": "string",
    "overlay_ipaddress": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ClientpackStatusResponse

Name Type Required Constraints Description
  response object false - -
   disconnecting string false - -
   overlay_ipaddress string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Reset all clients

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/clients/reset_all \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.post_reset_all_clients()

print(api_response.json())

POST /clients/reset_all

For resetting all of the connections of clients connected to the VNS3 Controller

Example responses

200 Response

{
  "response": {
    "resetting": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

BulkClientResetStatusResponse

Name Type Required Constraints Description
  response object false - -
   resetting [string] false - Cient IPs being reset

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Download clientpack by name

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/clientpack/{clientpack_name} \
  -H 'Accept: application/octet-stream'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_download_named_clientpack(clientpack_name)

print(api_response.file_download)   # path to downloaded file

GET /clientpack/{clientpack_name}

Returns clientpack binary file. Clientpacks are files with the necessary information and credentials for an overlay client to be connected to the VNS3 topology

Parameters

Name In Type Required Description
clientpack_name path string true name of clientpack

Example responses

200 Response

"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Must be licensed first",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK Clientpack file string
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Disconnect clientpack

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/clientpack/{clientpack_name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.put_disconnect_clientpack(clientpack_name,
    disconnect=disconnect)

print(api_response.json())

PUT /clientpack/{clientpack_name}

Force disconnect client for named clientpack

Body parameter

{
  "disconnect": true
}

Parameters

Name In Type Required Description
clientpack_name path string true name of clientpack
disconnect body boolean true -

Example responses

200 Response

{
  "response": {
    "disconnecting": "string",
    "overlay_ipaddress": "string"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156383509848878372758564869593812797782733",
    "message": "Overlay IP address 172.0.10.4 is not connected"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset is missing",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ClientpackStatusResponse

Name Type Required Constraints Description
  response object false - -
   disconnecting string false - -
   overlay_ipaddress string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create clientpack tag

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/clientpack/{clientpack_name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.post_create_clientpack_tag(clientpack_name,
    key=key,
    value=value)

print(api_response.json())

POST /clientpack/{clientpack_name}

For tagging individual clientpacks.

Body parameter

{
  "key": "string",
  "value": "string"
}

Parameters

Name In Type Required Description
clientpack_name path string true name of clientpack
key body string true Alphanumeric characters allowed in snake_case or kebab-case
value body string true -

Example responses

200 Response

{
  "response": {
    "name": "string",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156383509848878372758564869593812797782733",
    "message": "bad tag key: badcharac!er!!"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset is missing",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ClientpackTagsResponse

Name Type Required Constraints Description
  response object false - -
   name string false - Clientpack name
   tags object false - -
    additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete clientpack tag

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/clientpack/{clientpack_name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.delete_clientpack_tag(clientpack_name,
    key=key)

print(api_response.json())

DELETE /clientpack/{clientpack_name}

For deleting individual clientpack tags

Body parameter

{
  "key": "string"
}

Parameters

Name In Type Required Description
clientpack_name path string true name of clientpack
key body string true -

Example responses

200 Response

{
  "response": {
    "name": "string",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156383509848878372758564869593812797782733",
    "message": "Clientpack named '10_0_100_4' does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset is missing",
    "log": "123901290309083024802120939123901023091239",
    "name": "PrerequisiteError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ClientpackTagsResponse

Name Type Required Constraints Description
  response object false - -
   name string false - Clientpack name
   tags object false - -
    additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/links \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_links()

print(api_response.json())

GET /links

Retrieve all links

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "description": "string",
      "interface": "string",
      "clientpack_ip": "string",
      "id": 0,
      "connected": true,
      "type": "string",
      "tags": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "last_connect": "2019-08-24T14:15:22Z",
      "last_disconnect": "2019-08-24T14:15:22Z",
      "last_handshake": "2019-08-24T14:15:22Z",
      "handshake_timeout": 0,
      "remotes": [
        "string"
      ],
      "endpoints": [
        "string"
      ],
      "clientpack": "string",
      "policies": "string",
      "state": "string",
      "device": "string",
      "tun_mtu": 0,
      "link_mtu": 0,
      "local_ip": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Status Code 200

LinksListResponse

Name Type Required Constraints Description
  response [object] false - -
   Link object false - -
    name string false - -
    description string false - -
    interface string false - -
    clientpack_ip string false - -
    id integer false - -
    connected boolean false - -
    type string false - openvpn or wireguard
    tags [object] false - -
     KeyValueTag object false - -
      key string false - -
      value string false - -
    last_connect string(date-time) false - -
    last_disconnect string(date-time) false - -
    last_handshake string(date-time) false - Time of last WG handshake
    handshake_timeout integer false - Timeout for WG connection in seconds
    remotes [string] false - Alias for endpoints
    endpoints [string] false - List of remotes to connect to by IP or dns
    clientpack string false - Clientpack name
    policies string false - Policy insertions for this clientpack
    state string false - Readable state of Link - connecting, connected, disconnected
    device string false - -
    tun_mtu integer false - -
    link_mtu integer false - -
    local_ip string false - -

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/links \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.create_link(
    id=id,
    name=name,
    description=description,
    conf=conf,
    policies=policies,
      *any*=  *any*,
      *any*=  *any*)

print(api_response.json())

POST /links

Create new Link

Body parameter

{
  "id": 0,
  "name": "string",
  "description": "string",
  "vns3_controller": "string",
  "conf": "string",
  "vns3_auth": "string",
  "auth_type": "string",
  "policies": "string"
}
Name In Type Required Description
id body integer false ID for LNK interface. Will create interface called lnk{id}
name body string false -
description body string false -
vns3_controller body string false -
conf body string false -
vns3_auth body string false -
auth_type body string false basic or bearer
policies body any false -
  any body string false -
  any body [string] false -

One of the following param combinations are required:

Example responses

201 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "interface": "string",
    "clientpack_ip": "string",
    "id": 0,
    "connected": true,
    "type": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "last_connect": "2019-08-24T14:15:22Z",
    "last_disconnect": "2019-08-24T14:15:22Z",
    "last_handshake": "2019-08-24T14:15:22Z",
    "handshake_timeout": 0,
    "remotes": [
      "string"
    ],
    "endpoints": [
      "string"
    ],
    "clientpack": "string",
    "policies": "string",
    "state": "string",
    "device": "string",
    "tun_mtu": 0,
    "link_mtu": 0,
    "local_ip": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}
Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Status Code 201

LinkDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   interface string false - -
   clientpack_ip string false - -
   id integer false - -
   connected boolean false - -
   type string false - openvpn or wireguard
   tags [object] false - -
    KeyValueTag object false - -
     key string false - -
     value string false - -
   last_connect string(date-time) false - -
   last_disconnect string(date-time) false - -
   last_handshake string(date-time) false - Time of last WG handshake
   handshake_timeout integer false - Timeout for WG connection in seconds
   remotes [string] false - Alias for endpoints
   endpoints [string] false - List of remotes to connect to by IP or dns
   clientpack string false - Clientpack name
   policies string false - Policy insertions for this clientpack
   state string false - Readable state of Link - connecting, connected, disconnected
   device string false - -
   tun_mtu integer false - -
   link_mtu integer false - -
   local_ip string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/links/global-policies \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_global_link_policies(
    type=type)

print(api_response.json())

GET /links/global-policies

Retrieve global link policies

Name In Type Required Description
type query string false Type of Link. openvpn or wireguard

Example responses

200 Response

{
  "response": "string"
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/links/global-policies \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.put_global_link_policies(
    type=type,
    policies=policies,
      *any*=  *any*,
      *any*=  *any*)

print(api_response.json())

PUT /links/global-policies

Overwrite global link policies

Body parameter

{
  "type": "openvpn",
  "policies": "string"
}
Name In Type Required Description
type body string false Type of Link connection
policies body any true -
  any body string false -
  any body [string] false -

Enumerated Values

Parameter Value
type openvpn
type wireguard

Example responses

200 Response

{
  "response": "string"
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}
Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/links/{link_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_link(link_id)

print(api_response.json())

GET /links/{link_id}

Get link details

Name In Type Required Description
link_id path string true ID for link

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "interface": "string",
    "clientpack_ip": "string",
    "id": 0,
    "connected": true,
    "type": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "last_connect": "2019-08-24T14:15:22Z",
    "last_disconnect": "2019-08-24T14:15:22Z",
    "last_handshake": "2019-08-24T14:15:22Z",
    "handshake_timeout": 0,
    "remotes": [
      "string"
    ],
    "endpoints": [
      "string"
    ],
    "clientpack": "string",
    "policies": "string",
    "state": "string",
    "device": "string",
    "tun_mtu": 0,
    "link_mtu": 0,
    "local_ip": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Status Code 200

LinkDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   interface string false - -
   clientpack_ip string false - -
   id integer false - -
   connected boolean false - -
   type string false - openvpn or wireguard
   tags [object] false - -
    KeyValueTag object false - -
     key string false - -
     value string false - -
   last_connect string(date-time) false - -
   last_disconnect string(date-time) false - -
   last_handshake string(date-time) false - Time of last WG handshake
   handshake_timeout integer false - Timeout for WG connection in seconds
   remotes [string] false - Alias for endpoints
   endpoints [string] false - List of remotes to connect to by IP or dns
   clientpack string false - Clientpack name
   policies string false - Policy insertions for this clientpack
   state string false - Readable state of Link - connecting, connected, disconnected
   device string false - -
   tun_mtu integer false - -
   link_mtu integer false - -
   local_ip string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/links/{link_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.put_update_link(link_id,
    name=name,
    description=description,
    connected=connected,
    policies=policies,
      *any*=  *any*,
      *any*=  *any*)

print(api_response.json())

PUT /links/{link_id}

Update link details

Body parameter

{
  "name": "string",
  "description": "string",
  "connected": true,
  "policies": "string"
}
Name In Type Required Description
link_id path string true ID for link
name body string false -
description body string false -
connected body boolean false -
policies body any false -
  any body string false -
  any body [string] false -

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "interface": "string",
    "clientpack_ip": "string",
    "id": 0,
    "connected": true,
    "type": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "last_connect": "2019-08-24T14:15:22Z",
    "last_disconnect": "2019-08-24T14:15:22Z",
    "last_handshake": "2019-08-24T14:15:22Z",
    "handshake_timeout": 0,
    "remotes": [
      "string"
    ],
    "endpoints": [
      "string"
    ],
    "clientpack": "string",
    "policies": "string",
    "state": "string",
    "device": "string",
    "tun_mtu": 0,
    "link_mtu": 0,
    "local_ip": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Status Code 200

LinkDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   interface string false - -
   clientpack_ip string false - -
   id integer false - -
   connected boolean false - -
   type string false - openvpn or wireguard
   tags [object] false - -
    KeyValueTag object false - -
     key string false - -
     value string false - -
   last_connect string(date-time) false - -
   last_disconnect string(date-time) false - -
   last_handshake string(date-time) false - Time of last WG handshake
   handshake_timeout integer false - Timeout for WG connection in seconds
   remotes [string] false - Alias for endpoints
   endpoints [string] false - List of remotes to connect to by IP or dns
   clientpack string false - Clientpack name
   policies string false - Policy insertions for this clientpack
   state string false - Readable state of Link - connecting, connected, disconnected
   device string false - -
   tun_mtu integer false - -
   link_mtu integer false - -
   local_ip string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/links/{link_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.delete_link(link_id)

print(api_response.json())

DELETE /links/{link_id}

Delete link

Name In Type Required Description
link_id path string true ID for link

Example responses

200 Response

{
  "response": {
    "name": "string",
    "description": "string",
    "interface": "string",
    "clientpack_ip": "string",
    "id": 0,
    "connected": true,
    "type": "string",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "last_connect": "2019-08-24T14:15:22Z",
    "last_disconnect": "2019-08-24T14:15:22Z",
    "last_handshake": "2019-08-24T14:15:22Z",
    "handshake_timeout": 0,
    "remotes": [
      "string"
    ],
    "endpoints": [
      "string"
    ],
    "clientpack": "string",
    "policies": "string",
    "state": "string",
    "device": "string",
    "tun_mtu": 0,
    "link_mtu": 0,
    "local_ip": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Status Code 200

LinkDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   description string false - -
   interface string false - -
   clientpack_ip string false - -
   id integer false - -
   connected boolean false - -
   type string false - openvpn or wireguard
   tags [object] false - -
    KeyValueTag object false - -
     key string false - -
     value string false - -
   last_connect string(date-time) false - -
   last_disconnect string(date-time) false - -
   last_handshake string(date-time) false - Time of last WG handshake
   handshake_timeout integer false - Timeout for WG connection in seconds
   remotes [string] false - Alias for endpoints
   endpoints [string] false - List of remotes to connect to by IP or dns
   clientpack string false - Clientpack name
   policies string false - Policy insertions for this clientpack
   state string false - Readable state of Link - connecting, connected, disconnected
   device string false - -
   tun_mtu integer false - -
   link_mtu integer false - -
   local_ip string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/links/{link_id}/logs \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.get_link_logs(link_id,
    lines=lines,
    sort=sort)

print(api_response.json())

GET /links/{link_id}/logs

Retrieve link log data

Name In Type Required Description
link_id path string true ID for link
lines query integer false number of lines of log to retrieve
sort query string false desc or asc

Example responses

200 Response

{
  "response": [
    "string"
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Status Code 200

SimpleStringListResponse

Name Type Required Constraints Description
  response [string] false - Array of string representation of resource

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/links/{link_id}/tags \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.create_link_tag(link_id,
    key=key,
    value=value)

print(api_response.json())

POST /links/{link_id}/tags

Create new link tag

Body parameter

{
  "key": "string",
  "value": "string"
}
Name In Type Required Description
link_id path string true ID for link
key body string true -
value body string true -

Example responses

200 Response

{
  "response": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}
Status Meaning Description Schema
200 OK OK Inline
201 Created Created Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Status Code 200

KeyValueTagsResponse

Name Type Required Constraints Description
  response [object] false - -
   KeyValueTag object false - -
    key string false - -
    value string false - -

Status Code 201

KeyValueTagsResponse

Name Type Required Constraints Description
  response [object] false - -
   KeyValueTag object false - -
    key string false - -
    value string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/links/{link_id}/tags/{tagkey} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.overlay_network.delete_link_tag(link_id,tagkey)

print(api_response.json())

DELETE /links/{link_id}/tags/{tagkey}

Delete link tag

Name In Type Required Description
link_id path string true ID for link
tagkey path string true Key of link tag to delete

Example responses

200 Response

{
  "response": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Link does not exist"
  }
}
Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Status Code 200

KeyValueTagsResponse

Name Type Required Constraints Description
  response [object] false - -
   KeyValueTag object false - -
    key string false - -
    value string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Peering

Manage VNS3 controller peering for mesh topologies

Get peering status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/peering \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.peering.get_peering_status()

print(api_response.json())

GET /peering

Provides the status of whether a Controller is peered to other Controllers

Example responses

200 Response

{
  "response": {
    "id": 1,
    "peered": true,
    "managers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    },
    "controllers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PeersDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   peered boolean false - -
   managers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -
   controllers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -

Set peering ID

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/peering/self \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.peering.put_self_peering_id(
    id=id,
    force=force)

print(api_response.json())

PUT /peering/self

Sets the Controller ID of a controller so that it can be peered within a topology

Body parameter

{
  "id": 0,
  "force": true
}

Parameters

Name In Type Required Description
id body integer true Cannot be the same as the id of another manager in the topology, and cannot be greater than the number of controllers in the topology
force body boolean false -

Example responses

200 Response

{
  "peered": true,
  "id": 1,
  "managers": {
    "1": {
      "overlay_ipaddress": "100.127.255.253",
      "self": true
    },
    "2": {
      "overlay_ipaddress": "100.127.255.252",
      "not_set": true,
      "id": 2
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1563565922480638538304998251646824695267891",
    "message": "id is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PeersDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   peered boolean false - -
   managers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -
   controllers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create peer

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/peering/peers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.peering.post_create_peer(
    id=id,
    name=name,
    overlay_mtu=overlay_mtu,
    force=force)

print(api_response.json())

POST /peering/peers

Creates a peering relationship from a controller to another controller. The peering call is unidirectional. Reciprocal calls must be made to peer two controllers together and complete the peering process.

Body parameter

{
  "id": 0,
  "name": "string",
  "overlay_mtu": "string",
  "force": true
}

Parameters

Name In Type Required Description
id body integer true Manager ID as an integer of the the manager you are peering with, NOT the id of the one you are calling from
name body string true IP address or host name of the one you are peering with.
overlay_mtu body string false link MTU between 500 and 4800. Defaults to 1500
force body boolean false Setting false will NOT finalize the peering operation. A peer "reconfigure" call would then be required. Default is true

Example responses

200 Response

{
  "response": {
    "id": 1,
    "peered": true,
    "managers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    },
    "controllers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "5 is an invalid controller id"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PeersDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   peered boolean false - -
   managers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -
   controllers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete peer

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/peering/peers/{peer_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.peering.delete_peer(peer_id)

print(api_response.json())

DELETE /peering/peers/{peer_id}

Breaks a peering relationship from a controller to another controller. The peering call is unidirectional. Reciprocal calls must be made to fully break the peer relationship.

Parameters

Name In Type Required Description
peer_id path integer true Peer ID for controller peer

Example responses

200 Response

{
  "response": {
    "id": 1,
    "peered": true,
    "managers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    },
    "controllers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "20 is invalid as controller id."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PeersDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   peered boolean false - -
   managers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -
   controllers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update peer

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/peering/peers/{peer_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.peering.put_update_peer(peer_id,
    name=name,
    overlay_mtu=overlay_mtu,
    force=force)

print(api_response.json())

PUT /peering/peers/{peer_id}

Edits a peering relationship from a controller to another controller. The peering call is unidirectional. Reciprocal calls must be made to peer two controllers together and complete the peering process.

Body parameter

{
  "name": "string",
  "overlay_mtu": "string",
  "force": true
}

Parameters

Name In Type Required Description
peer_id path integer true Peer ID for controller peer
name body string false IP address or host name of the one you are peering with.
overlay_mtu body string false link MTU between 500 and 4800
force body boolean false Setting false will NOT finalize the peering operation. A peer "reconfigure" call would then be required. Default is true

Example responses

200 Response

{
  "response": {
    "id": 1,
    "peered": true,
    "managers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    },
    "controllers": {
      "property1": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      },
      "property2": {
        "id": 1,
        "not_set": true,
        "self": true,
        "mtu": "string",
        "reachable": true,
        "address": "string",
        "overlay_ipaddress": "string"
      }
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156348346294205629750334447737345166168929",
    "message": "mtu must be an integer between 500 and 48,000"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PeersDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   peered boolean false - -
   managers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -
   controllers object false - -
    VNS3ControllerPeer object false - -
     id integer false - -
     not_set boolean false - -
     self boolean false - -
     mtu string false - -
     reachable boolean false - -
     address string false - -
     overlay_ipaddress string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Interfaces

Collection for viewing and editing virtual and system interfaces

Get all interfaces

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_interfaces()

print(api_response.json())

GET /interfaces

(BETA) Describe all physical and virtual interfaces, both system and edge GRE interfaces

Example responses

200 Response

{
  "response": [
    {
      "id": 4,
      "name": "eth0",
      "interface_type": "system",
      "description": "Auto-created interface",
      "ip_internal": "192.168.1.211",
      "mtu": 9001,
      "enabled": true,
      "status": "Up",
      "mask_bits": "24",
      "gateway": null,
      "system_default": true,
      "ip_external": "3.222.68.251",
      "tags": []
    },
    {
      "id": 5,
      "name": "lo",
      "interface_type": "system",
      "description": "Auto-created interface",
      "ip_internal": "127.0.0.1",
      "mtu": 65536,
      "enabled": true,
      "status": "Up",
      "mask_bits": "8",
      "gateway": null,
      "system_default": true,
      "ip_external": null,
      "tags": []
    },
    {
      "id": 7,
      "name": "eth0:0",
      "interface_type": "system",
      "description": "This interface used as IPsec loopback via Local Private IP",
      "ip_internal": "192.168.1.230",
      "mtu": 9001,
      "enabled": true,
      "status": "Up",
      "mask_bits": "31",
      "gateway": null,
      "system_default": true,
      "ip_external": null,
      "tags": []
    },
    {
      "id": 6,
      "name": "plugin0",
      "interface_type": "system_virtual",
      "description": "Auto-created interface",
      "ip_internal": "198.51.100.1",
      "mtu": 1500,
      "enabled": true,
      "status": "Up",
      "mask_bits": "28",
      "gateway": null,
      "system_default": false,
      "ip_external": null,
      "tags": []
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SystemInterfaceListResponse

Name Type Required Constraints Description
  response [object] false - -
   SystemInterface object false - -
    id integer false - -
    name string false - -
    interface_type string false - system or system_virtual
    description string false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    status string false - Availability of interface, Up or Down
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    ip_external string¦null false - -
    tags [string] false - -

Take interface action

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/interfaces/action \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.post_interfaces_action(
    discover_new_primary_adapters=discover_new_primary_adapters,
    discover_ips=discover_ips,
    manage_overlay_interfaces=manage_overlay_interfaces,
    discover_links=discover_links)

print(api_response.json())

POST /interfaces/action

Take action on interfaces collection. Only one action can be taken per request. The available actions are discovering new adapters, new IPs and resync-ing interfaces state with system.

Body parameter

{
  "discover_new_primary_adapters": true,
  "discover_ips": true,
  "manage_overlay_interfaces": true,
  "discover_links": true
}

Parameters

Name In Type Required Description
discover_new_primary_adapters body boolean false Run discovery for new primary adapters
discover_ips body boolean false -
manage_overlay_interfaces body boolean false -
discover_links body boolean false -

Example responses

200 Response

{
  "response": [
    {
      "id": 1,
      "name": "eth0",
      "interface_type": "system",
      "description": "Auto-created interface",
      "ip_internal": "10.0.1.33",
      "mtu": 9001,
      "enabled": true,
      "status": "Up",
      "mask_bits": "24",
      "gateway": "10.0.1.1",
      "system_default": true,
      "ip_external": "3.222.68.251",
      "tags": []
    }
  ]
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "discover_ips is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SystemInterfaceListResponse

Name Type Required Constraints Description
  response [object] false - -
   SystemInterface object false - -
    id integer false - -
    name string false - -
    interface_type string false - system or system_virtual
    description string false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    status string false - Availability of interface, Up or Down
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    ip_external string¦null false - -
    tags [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get all system interfaces

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces/system \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_system_interfaces()

print(api_response.json())

GET /interfaces/system

Get system interfaces

Example responses

200 Response

{
  "response": [
    {
      "id": 4,
      "name": "eth0",
      "interface_type": "system",
      "description": "Auto-created interface",
      "ip_internal": "192.168.1.211",
      "mtu": 9001,
      "enabled": true,
      "status": "Up",
      "mask_bits": "24",
      "gateway": null,
      "system_default": true,
      "ip_external": "3.222.68.251",
      "tags": []
    },
    {
      "id": 5,
      "name": "lo",
      "interface_type": "system",
      "description": "Auto-created interface",
      "ip_internal": "127.0.0.1",
      "mtu": 65536,
      "enabled": true,
      "status": "Up",
      "mask_bits": "8",
      "gateway": null,
      "system_default": true,
      "ip_external": null,
      "tags": []
    },
    {
      "id": 7,
      "name": "eth0:0",
      "interface_type": "system",
      "description": "This interface used as IPsec loopback via Local Private IP",
      "ip_internal": "192.168.1.230",
      "mtu": 9001,
      "enabled": true,
      "status": "Up",
      "mask_bits": "31",
      "gateway": null,
      "system_default": true,
      "ip_external": null,
      "tags": []
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SystemInterfaceListResponse

Name Type Required Constraints Description
  response [object] false - -
   SystemInterface object false - -
    id integer false - -
    name string false - -
    interface_type string false - system or system_virtual
    description string false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    status string false - Availability of interface, Up or Down
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    ip_external string¦null false - -
    tags [string] false - -

Create system interface

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/interfaces/system \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.post_create_system_interface(
    name=name,
    description=description,
    ip_internal=ip_internal,
    ip_external=ip_external,
    mtu=mtu,
    enabled=enabled,
    mask_bits=mask_bits,
    gateway=gateway)

print(api_response.json())

POST /interfaces/system

Create new system interface

Body parameter

{
  "name": "string",
  "description": "string",
  "ip_internal": "string",
  "ip_external": "string",
  "mtu": 0,
  "enabled": false,
  "mask_bits": "string",
  "gateway": "string"
}

Parameters

Name In Type Required Description
name body string true -
description body string false -
ip_internal body string false -
ip_external body string¦null false -
mtu body integer false -
enabled body boolean false -
mask_bits body string false -
gateway body string¦null false -

Example responses

200 Response

{
  "response": {
    "id": 16,
    "name": "tun1:1",
    "interface_type": "system_virtual",
    "description": "",
    "ip_internal": "192.168.1.250",
    "mtu": 9001,
    "enabled": true,
    "status": "Up",
    "mask_bits": "32",
    "gateway": null,
    "system_default": true,
    "ip_external": null,
    "tags": []
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "mtu must be an integer"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SystemInterfaceDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   interface_type string false - system or system_virtual
   description string false - -
   ip_internal string¦null false - -
   mtu integer false - -
   enabled boolean false - -
   status string false - Availability of interface, Up or Down
   mask_bits string¦null false - -
   gateway string¦null false - -
   system_default boolean false - -
   ip_external string¦null false - -
   tags [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get system interface

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_system_interface_details(interface_id)

print(api_response.json())

GET /interfaces/system/{interface_id}

Get interface details by name

Parameters

Name In Type Required Description
interface_id path string true ID for system interface

Example responses

200 Response

{
  "response": {
    "id": 4,
    "name": "eth0",
    "interface_type": "system",
    "description": "Auto-created interface",
    "ip_internal": "192.168.1.211",
    "mtu": 9001,
    "enabled": true,
    "status": "Up",
    "mask_bits": "24",
    "gateway": null,
    "system_default": true,
    "ip_external": "3.222.68.251",
    "tags": []
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "System interface not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SystemInterfaceDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   interface_type string false - system or system_virtual
   description string false - -
   ip_internal string¦null false - -
   mtu integer false - -
   enabled boolean false - -
   status string false - Availability of interface, Up or Down
   mask_bits string¦null false - -
   gateway string¦null false - -
   system_default boolean false - -
   ip_external string¦null false - -
   tags [string] false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update system interface

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.put_update_system_interface(interface_id,
    name=name,
    description=description,
    ip_internal=ip_internal,
    ip_external=ip_external,
    mtu=mtu,
    enabled=enabled,
    mask_bits=mask_bits,
    gateway=gateway)

print(api_response.json())

PUT /interfaces/system/{interface_id}

Update system interface

Body parameter

{
  "name": "string",
  "description": "string",
  "ip_internal": "string",
  "ip_external": "string",
  "mtu": 0,
  "enabled": false,
  "mask_bits": "string",
  "gateway": "string"
}

Parameters

Name In Type Required Description
interface_id path string true ID for system interface
name body string false -
description body string false -
ip_internal body string false -
ip_external body string¦null false -
mtu body integer false -
enabled body boolean false -
mask_bits body string false -
gateway body string¦null false -

Example responses

200 Response

{
  "response": {
    "id": 16,
    "name": "tun1:1",
    "interface_type": "system_virtual",
    "description": "Custom interface created",
    "ip_internal": "192.168.1.250",
    "mtu": 9001,
    "enabled": true,
    "status": "Up",
    "mask_bits": "32",
    "gateway": null,
    "system_default": true,
    "ip_external": null,
    "tags": []
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "ip_internal must be available"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Updated Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

SystemInterfaceDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   interface_type string false - system or system_virtual
   description string false - -
   ip_internal string¦null false - -
   mtu integer false - -
   enabled boolean false - -
   status string false - Availability of interface, Up or Down
   mask_bits string¦null false - -
   gateway string¦null false - -
   system_default boolean false - -
   ip_external string¦null false - -
   tags [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete system interface

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.delete_system_interface(interface_id)

print(api_response.json())

DELETE /interfaces/system/{interface_id}

Delete system interface

Parameters

Name In Type Required Description
interface_id path string true ID for system interface

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "interface_type": "string",
    "description": "string",
    "ip_internal": "string",
    "mtu": 0,
    "enabled": true,
    "status": "string",
    "mask_bits": "string",
    "gateway": "string",
    "system_default": true,
    "ip_external": "string",
    "tags": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "System Interface not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SystemInterfaceDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   interface_type string false - system or system_virtual
   description string false - -
   ip_internal string¦null false - -
   mtu integer false - -
   enabled boolean false - -
   status string false - Availability of interface, Up or Down
   mask_bits string¦null false - -
   gateway string¦null false - -
   system_default boolean false - -
   ip_external string¦null false - -
   tags [string] false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get all system interface addresses

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id}/addresses \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_interface_addresses(interface_id)

print(api_response.json())

GET /interfaces/system/{interface_id}/addresses

Get system interface addresses

Parameters

Name In Type Required Description
interface_id path string true ID for system interface

Example responses

200 Response

{
  "response": [
    {
      "ip_internal": "string",
      "ip_external": "string",
      "description": "string",
      "gateway": "string",
      "mask_bits": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

InterfaceAddressListResponse

Name Type Required Constraints Description
  response [object] false - -
   InterfaceAddress object false - -
    ip_internal string false - -
    ip_external string false - -
    description string false - -
    gateway string false - -
    mask_bits integer false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -

Create system interface address

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id}/addresses \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.create_interface_address(interface_id,
    label=label,
    description=description,
    ip_internal=ip_internal,
    ip_external=ip_external,
    mask_bits=mask_bits,
    gateway=gateway)

print(api_response.json())

POST /interfaces/system/{interface_id}/addresses

Create new system interface address

Body parameter

{
  "label": "string",
  "description": "string",
  "ip_internal": "string",
  "ip_external": "string",
  "mask_bits": 32,
  "gateway": "string"
}

Parameters

Name In Type Required Description
interface_id path string true ID for system interface
label body string true -
description body string false -
ip_internal body string true -
ip_external body string¦null false -
mask_bits body integer false between 1 and 32 inclusive
gateway body string¦null false -

Example responses

200 Response

null

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "mask_bits must be an integer"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get system interface address

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id}/addresses/{address_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_interface_address(interface_id,address_id)

print(api_response.json())

GET /interfaces/system/{interface_id}/addresses/{address_id}

Get interface address details

Parameters

Name In Type Required Description
interface_id path string true ID for system interface
address_id path integer true ID for interface address

Example responses

200 Response

null

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Interface Address not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update system interface address

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id}/addresses/{address_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.put_update_interface_address(interface_id,address_id,
    label=label,
    description=description,
    ip_internal=ip_internal,
    ip_external=ip_external,
    mask_bits=mask_bits,
    gateway=gateway)

print(api_response.json())

PUT /interfaces/system/{interface_id}/addresses/{address_id}

Update system interface address

Body parameter

{
  "label": "string",
  "description": "string",
  "ip_internal": "string",
  "ip_external": "string",
  "mask_bits": 32,
  "gateway": "string"
}

Parameters

Name In Type Required Description
interface_id path string true ID for system interface
address_id path integer true ID for interface address
label body string false -
description body string false -
ip_internal body string false -
ip_external body string¦null false -
mask_bits body integer false between 1 and 32 inclusive
gateway body string¦null false -

Example responses

200 Response

null

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "ip_internal must be available"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Updated Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete system interface address

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/interfaces/system/{interface_id}/addresses/{address_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.delete_interface_address(interface_id,address_id)

print(api_response.json())

DELETE /interfaces/system/{interface_id}/addresses/{address_id}

Delete system interface address

Parameters

Name In Type Required Description
interface_id path string true ID for system interface
address_id path integer true ID for interface address

Example responses

200 Response

null

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "System Interface not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get Edge GRE interfaces

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces/edge_gre \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_gre_interfaces()

print(api_response.json())

GET /interfaces/edge_gre

Get Edge GRE interface details

Example responses

200 Response

{
  "response": [
    {
      "endpoint_name": "string",
      "description": "string",
      "ip_internal": "string",
      "mtu": 0,
      "enabled": false,
      "mask_bits": "string",
      "gateway": "string",
      "system_default": false,
      "local_connection_ip": "string",
      "remote_connection_ip": "string",
      "ttl": 255,
      "id": 1,
      "interface_id": 1,
      "ip_external": "string",
      "name": "string",
      "interface_type": "string",
      "status": "string",
      "tags": [
        "string"
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

GREEndpointListResponse

Name Type Required Constraints Description
  response [allOf] false - -
   GREEndpoint any false - -

allOf

Name Type Required Constraints Description
    any object false - -
     endpoint_name string false - -
     description string¦null false - -
     ip_internal string¦null false - -
     mtu integer false - -
     enabled boolean false - -
     mask_bits string¦null false - -
     gateway string¦null false - -
     system_default boolean false - -
     local_connection_ip string¦null false - -
     remote_connection_ip string¦null false - -
     ttl integer false - -

and

Name Type Required Constraints Description
    any object false - -
     id integer false - -
     interface_id integer false - -
     ip_external string¦null false - -
     name string false - -
     interface_type string false - system or system_virtual
     status string false - Availability of interface, Up or Down
     tags [string] false - -

Create edge GRE interface

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/interfaces/edge_gre \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.undefined.post_create_gre_interface(
    endpoint_name=endpoint_name,
    description=description,
    ip_internal=ip_internal,
    mtu=mtu,
    enabled=enabled,
    mask_bits=mask_bits,
    local_connection_ip=local_connection_ip,
    remote_connection_ip=remote_connection_ip,
    ttl=ttl)

print(api_response.json())

POST /interfaces/edge_gre

Create new edge GRE interface

Body parameter

{
  "endpoint_name": "string",
  "description": "string",
  "ip_internal": "string",
  "mtu": 1350,
  "enabled": false,
  "mask_bits": "string",
  "local_connection_ip": "string",
  "remote_connection_ip": "string",
  "ttl": 255
}

Parameters

Name In Type Required Description
endpoint_name body string false -
description body string false -
ip_internal body string false -
mtu body integer false -
enabled body boolean false -
mask_bits body string false -
local_connection_ip body string false -
remote_connection_ip body string false -
ttl body integer false -

Example responses

200 Response

{
  "response": {
    "endpoint_name": "string",
    "description": "string",
    "ip_internal": "string",
    "mtu": 0,
    "enabled": false,
    "mask_bits": "string",
    "gateway": "string",
    "system_default": false,
    "local_connection_ip": "string",
    "remote_connection_ip": "string",
    "ttl": 255,
    "id": 1,
    "interface_id": 1,
    "ip_external": "string",
    "name": "string",
    "interface_type": "string",
    "status": "string",
    "tags": [
      "string"
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "'ttl' must be between 1 and 255"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

GREEndpointDetail

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    endpoint_name string false - -
    description string¦null false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    local_connection_ip string¦null false - -
    remote_connection_ip string¦null false - -
    ttl integer false - -

and

Name Type Required Constraints Description
   any object false - -
    id integer false - -
    interface_id integer false - -
    ip_external string¦null false - -
    name string false - -
    interface_type string false - system or system_virtual
    status string false - Availability of interface, Up or Down
    tags [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get GRE interface details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/interfaces/edge_gre/{interface_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.get_gre_interface_details(interface_id)

print(api_response.json())

GET /interfaces/edge_gre/{interface_id}

Get GRE interface details by id or name

Parameters

Name In Type Required Description
interface_id path string true ID for system interface

Example responses

200 Response

{
  "response": {
    "endpoint_name": "string",
    "description": "string",
    "ip_internal": "string",
    "mtu": 0,
    "enabled": false,
    "mask_bits": "string",
    "gateway": "string",
    "system_default": false,
    "local_connection_ip": "string",
    "remote_connection_ip": "string",
    "ttl": 255,
    "id": 1,
    "interface_id": 1,
    "ip_external": "string",
    "name": "string",
    "interface_type": "string",
    "status": "string",
    "tags": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "GRE Endpoint not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

GREEndpointDetail

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    endpoint_name string false - -
    description string¦null false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    local_connection_ip string¦null false - -
    remote_connection_ip string¦null false - -
    ttl integer false - -

and

Name Type Required Constraints Description
   any object false - -
    id integer false - -
    interface_id integer false - -
    ip_external string¦null false - -
    name string false - -
    interface_type string false - system or system_virtual
    status string false - Availability of interface, Up or Down
    tags [string] false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update GRE interface

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/interfaces/edge_gre/{interface_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.put_update_gre_interface(interface_id,
    endpoint_name=endpoint_name,
    description=description,
    ip_internal=ip_internal,
    mtu=mtu,
    enabled=enabled,
    mask_bits=mask_bits,
    local_connection_ip=local_connection_ip,
    remote_connection_ip=remote_connection_ip,
    ttl=ttl)

print(api_response.json())

PUT /interfaces/edge_gre/{interface_id}

Update GRE interface

Body parameter

{
  "endpoint_name": "string",
  "description": "string",
  "ip_internal": "string",
  "mtu": 0,
  "enabled": false,
  "mask_bits": "string",
  "local_connection_ip": "string",
  "remote_connection_ip": "string",
  "ttl": 255
}

Parameters

Name In Type Required Description
interface_id path string true ID for system interface
endpoint_name body string false -
description body string false -
ip_internal body string false -
mtu body integer false -
enabled body boolean false -
mask_bits body string false -
local_connection_ip body string false -
remote_connection_ip body string false -
ttl body integer false -

Example responses

200 Response

{
  "response": {
    "endpoint_name": "string",
    "description": "string",
    "ip_internal": "string",
    "mtu": 0,
    "enabled": false,
    "mask_bits": "string",
    "gateway": "string",
    "system_default": false,
    "local_connection_ip": "string",
    "remote_connection_ip": "string",
    "ttl": 255,
    "id": 1,
    "interface_id": 1,
    "ip_external": "string",
    "name": "string",
    "interface_type": "string",
    "status": "string",
    "tags": [
      "string"
    ]
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "1564080470480314545899327872576171314749135",
    "message": "'ttl' must be between 1 and 255"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Updated Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

GREEndpointDetail

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    endpoint_name string false - -
    description string¦null false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    local_connection_ip string¦null false - -
    remote_connection_ip string¦null false - -
    ttl integer false - -

and

Name Type Required Constraints Description
   any object false - -
    id integer false - -
    interface_id integer false - -
    ip_external string¦null false - -
    name string false - -
    interface_type string false - system or system_virtual
    status string false - Availability of interface, Up or Down
    tags [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Snapshots

Backup management with device snapshots

List Snapshots

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/snapshots \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.snapshots.get_snapshots()

print(api_response.json())

GET /snapshots

Get list of snapshots

Example responses

200 Response

{
  "response": {
    "latest_snapshot": "snapshot_20140117_1389943293_50.240.142.209",
    "snapshots": {
      "snapshot_20140117_1389943258_50.240.142.209": {
        "sha1_checksum": "0ea0e930b96a6276b8dcb23d39378128784da557",
        "created_at": "2014/01/17 01:20:58 -0600",
        "created_at_i": 1389943258,
        "size": 334120
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SnapshotsListResponse

Name Type Required Constraints Description
  response object false - -
   latest_snapshot string false - Name of the latest snapshot taken
   snapshots object false - -
    Snapshot object false - -
     sha1_checksum string false - -
     created_at string false - -
     created_at_i integer false - -
     size integer false - -
     status string false - Status of snapshot, pending, finished_ok, finished_failed or invalid
     token string false - Token if snapshot task is still pending for polling

Create snapshot

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/snapshots \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.snapshots.post_create_snapshot(
    name=name,
    async=async)

print(api_response.json())

POST /snapshots

Create a new snapshot

Body parameter

{
  "name": "string",
  "async": true
}

Parameters

Name In Type Required Description
name body string false Name of file. Defaults to a timestamped name
async body boolean false If true, will return a task id rather than wait for snapshot generation

Example responses

200 Response

{
  "response": {
    "snapshot_name": {
      "sha1_checksum": "adc8052f3c0f618b9b1f9564aaa76bf8ce0bd381",
      "created_at": "2016-11-22T16:23:11+00:00",
      "created_at_i": 1479831791,
      "size": 957078
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Maximum number of snapshots reached.",
    "log": "1563472268929826518356034508450851266833526",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SnapshotsDetailResponse

Name Type Required Constraints Description
  response object false - -
   Snapshot object false - -
    sha1_checksum string false - -
    created_at string false - -
    created_at_i integer false - -
    size integer false - -
    status string false - Status of snapshot, pending, finished_ok, finished_failed or invalid
    token string false - Token if snapshot task is still pending for polling

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Download snapshot

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/snapshots/{snapshot_name} \
  -H 'Accept: application/octet-stream'

from cohesivenet import VNS3Client

api_response = vns3_client.snapshots.get_download_snapshot(snapshot_name)

print(api_response.file_download)   # path to downloaded file

GET /snapshots/{snapshot_name}

Download snapshot file

Parameters

Name In Type Required Description
snapshot_name path string true name of Snapshot

Example responses

200 Response

"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "snapshot not found"
  }
}

Responses

Status Meaning Description Schema
200 OK OK string
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete snapshot

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/snapshots/{snapshot_name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.snapshots.delete_snapshot(snapshot_name)

print(api_response.json())

DELETE /snapshots/{snapshot_name}

Delete named snapshot

Parameters

Name In Type Required Description
snapshot_name path string true name of Snapshot

Example responses

200 Response

{
  "response": {
    "latest_snapshot": "string",
    "snapshots": {
      "property1": {
        "sha1_checksum": "string",
        "created_at": "string",
        "created_at_i": 0,
        "size": 0,
        "status": "string",
        "token": "string"
      },
      "property2": {
        "sha1_checksum": "string",
        "created_at": "string",
        "created_at_i": 0,
        "size": 0,
        "status": "string",
        "token": "string"
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "snapshot not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SnapshotsListResponse

Name Type Required Constraints Description
  response object false - -
   latest_snapshot string false - Name of the latest snapshot taken
   snapshots object false - -
    Snapshot object false - -
     sha1_checksum string false - -
     created_at string false - -
     created_at_i integer false - -
     size integer false - -
     status string false - Status of snapshot, pending, finished_ok, finished_failed or invalid
     token string false - Token if snapshot task is still pending for polling

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Import Snapshot

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/snapshots/running_config \
  -H 'Content-Type: text/plain' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.snapshots.put_import_snapshot(
    async=async)

print(api_response.json())

PUT /snapshots/running_config

Import snapshot into the manager and triggers a reboot for the Configuration to take effect.

Body parameter

string

Parameters

Name In Type Required Description
async query boolean false If true, return a task token

Example responses

200 Response

{
  "response": {
    "snapshot": "string",
    "log_lines": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Keyset present - snapshot import not allowed",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SnapshotImportStatusResponse

Name Type Required Constraints Description
  response object false - -
   snapshot string false - Status of import
   log_lines [string] false - Log details if failed

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Network Edge Plugins

Deploy and manage plugin functionality on the edge of the network with containers

Get container system status

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/container_system \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_container_system_status()

print(api_response.json())

GET /container_system

Retrieve status of container system

Example responses

200 Response

{
  "response": {
    "running": true,
    "network": "172.0.20.0/28"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ContainerSystemStatusDetailResponse

Name Type Required Constraints Description
  response object false - -
   network string false - Local network in CIDR notation container system is running on
   running any false - -

oneOf

Name Type Required Constraints Description
    any string false - -

xor

Name Type Required Constraints Description
    any boolean false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update container system

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/container_system \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_configure_container_system(
    network=network)

print(api_response.json())

PUT /container_system

Configures the container network.

Body parameter

{
  "network": "string"
}

Parameters

Name In Type Required Description
network body string true Subnet CIDR that will be used for the container network.

Example responses

200 Response

{
  "response": {
    "running": true,
    "network": "172.0.10.0/28"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ContainerSystemStatusDetailResponse

Name Type Required Constraints Description
  response object false - -
   network string false - Local network in CIDR notation container system is running on
   running any false - -

oneOf

Name Type Required Constraints Description
    any string false - -

xor

Name Type Required Constraints Description
    any boolean false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Take action on container system

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/container_system \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_action_container_system(
    action=action)

print(api_response.json())

POST /container_system

Take action on container system. Supported actions are start and stop.

Body parameter

{
  "action": "start"
}

Parameters

Name In Type Required Description
action body string true argument to pass

Enumerated Values

Parameter Value
action start
action stop

Example responses

200 Response

{
  "response": {
    "running": false,
    "network": "172.0.20.0/28"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347731532179638778333642624237974834407",
    "message": "action bad or missing, nothing to do"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ContainerSystemStatusDetailResponse

Name Type Required Constraints Description
  response object false - -
   network string false - Local network in CIDR notation container system is running on
   running any false - -

oneOf

Name Type Required Constraints Description
    any string false - -

xor

Name Type Required Constraints Description
    any boolean false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get container system IP addresses

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/container_system/ip_addresses \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_container_system_ips()

print(api_response.json())

GET /container_system/ip_addresses

Retrieve IP address list for current container network configuration and address status (e.g. available)

Example responses

200 Response

{
  "response": {
    "addresses": [
      {
        "address": "string",
        "status": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

ContainerSystemIPListResponse

Name Type Required Constraints Description
  response object false - -
   addresses [object] false - -
    ContainerSystemIP object false - -
     address string false - -
     status string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get container images

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/container_system/images \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_container_images(
    uuid=uuid)

print(api_response.json())

GET /container_system/images

Get list of existing container system images

Parameters

Name In Type Required Description
uuid query string false UUID for Container

Example responses

200 Response

{
  "response": {
    "images": [
      {
        "id": "string",
        "image_name": "string",
        "status": "string",
        "status_msg": "string",
        "import_id": "string",
        "created": "2019-08-24T14:15:22Z",
        "description": "string",
        "tag_name": "string",
        "comment": "string",
        "container_config": {
          "Entrypoint": "string",
          "Dns": "string",
          "OpenStdin": true,
          "StdinOnce": true,
          "AttachStderr": true,
          "AttachStdout": true,
          "AttachStdin": true,
          "Env": {},
          "User": "string",
          "Tty": true,
          "ExposedPorts": {},
          "Memory": 0,
          "MemorySwap": 0,
          "VolumesFrom": "string",
          "Volumes": "string",
          "Cmd": "string",
          "PortSpecs": {},
          "Image": "string",
          "WorkingDir": "string",
          "CpuShares": 0,
          "NetworkDisabled": true,
          "Domainname": "string",
          "OnBuild": "string",
          "Hostname": "string"
        }
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

500 Response

{
  "response": {
    "message": "Container system is not running",
    "log": "123901290309083024802120939123901023091239",
    "name": "StandardError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
500 Internal Server Error Invalid server state Inline

Response Schema

Status Code 200

ContainerImageListResponse

Name Type Required Constraints Description
  response object false - -
   images [object] false - -
    ContainerImage object false - -
     id string¦null false - -
     image_name string false - -
     status string false - -
     status_msg string¦null false - -
     import_id string false - -
     created string(date-time) false - -
     description string false - -
     tag_name string false - -
     comment string¦null false - -
     container_config object¦null false - -
      Entrypoint string¦null false - -
      Dns string¦null false - -
      OpenStdin boolean false - -
      StdinOnce boolean false - -
      AttachStderr boolean false - -
      AttachStdout boolean false - -
      AttachStdin boolean false - -
      Env object¦null false - -
      User string false - -
      Tty boolean false - -
      ExposedPorts object¦null false - -
      Memory integer false - -
      MemorySwap integer false - -
      VolumesFrom string false - -
      Volumes string¦null false - -
      Cmd string¦null false - -
      PortSpecs object¦null false - -
      Image string false - -
      WorkingDir string false - -
      CpuShares integer false - -
      NetworkDisabled boolean false - -
      Domainname string false - -
      OnBuild string¦null false - -
      Hostname string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 500

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create container image

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/container_system/images \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_create_container_image(
    name=name,
    url=url,
    description=description,
    version=version)

print(api_response.json())

POST /container_system/images

Create new container image

Body parameter

{
  "name": "string",
  "url": "string",
  "buildurl": "string",
  "localbuild": "string",
  "localimage": "string",
  "imagefile": "string",
  "buildfile": "string",
  "description": "string",
  "version": "string"
}

Parameters

Name In Type Required Description
name body string false Name of the image
url body string false URL of the image file to be imported
buildurl body string false URL of a dockerfile that will be used to build the image
localbuild body string false Local build file to create new image
localimage body string false Local image to tag
imagefile body string(binary) false Upload image file
buildfile body string(binary) false Upload docker file or zipped docker context directory
description body string false -
version body string false -

One of the following param combinations are required:

Example responses

200 Response

{
  "response": {
    "status": "Image being uploaded",
    "import_uuid": "3c4faa02b17a15a0776f53e66337a1baa37fffe9afdb7a03a2886bdb25a6b319"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347731532179638778333642624237974834407",
    "message": "Duplicate name -- name must be unique."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container image limit reached - maximum stored images allowed: 5; currently stored 5",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

CreateImageDetailResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -
   import_uuid string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update container image

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/container_system/images/{uuid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_update_container_image(uuid,
    name=name,
    description=description)

print(api_response.json())

PUT /container_system/images/{uuid}

Edits container image

Body parameter

{
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
uuid path string true uuid of resource
name body string true Name of the image
description body string false Description of the container image

Example responses

200 Response

{
  "response": {
    "uuid": "8a11af14365a57d050c06821f4caa00865461334ca2598ca38d4b4bda9ce3b12",
    "status": "Image updated"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347731532179638778333642624237974834407",
    "message": "Duplicate name -- name must be unique."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

UpdateContainerImageDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   status string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete container image

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/container_system/images/{uuid} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_container_image(uuid,
    force=force)

print(api_response.json())

DELETE /container_system/images/{uuid}

Delete container image

Parameters

Name In Type Required Description
uuid path string true uuid of resource
force query boolean false force operation with cleanup

Example responses

200 Response

{
  "response": {
    "uuid": "8a11af14365a57d050c06821f4caa00865461334ca2598ca38d4b4bda9ce3b12",
    "image_deleted": true
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

DeleteContainerImageDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   image_deleted boolean false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create container image export

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/container_system/images/{uuid}/exports \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_export_image(uuid,
    name=name)

print(api_response.json())

POST /container_system/images/{uuid}/exports

Create exported container image

Body parameter

{
  "name": "string"
}

Parameters

Name In Type Required Description
uuid path string true uuid of resource
name body string true Name of the exported file

Example responses

200 Response

{
  "response": {
    "status": "Image exported"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347731532179638778333642624237974834407",
    "message": "Duplicate name -- name must be unique."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

SimpleStatusResponse

Name Type Required Constraints Description
  response object false - -
   status string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get running containers

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/container_system/containers \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_running_containers(
    show_all=show_all,
    uuid=uuid)

print(api_response.json())

GET /container_system/containers

Provides description information for one or all allocated containers

Parameters

Name In Type Required Description
show_all query boolean false Boolean for full list output of containers
uuid query string false UUID for resource

Example responses

200 Response

{
  "response": {
    "containers": [
      {
        "Id": "string",
        "Created": "string",
        "Path": "string",
        "RestartCount": 0,
        "Args": [
          "string"
        ],
        "AppArmorProfile": "string",
        "Image": "string",
        "Config": {
          "Entrypoint": "string",
          "Dns": "string",
          "OpenStdin": true,
          "StdinOnce": true,
          "AttachStderr": true,
          "AttachStdout": true,
          "AttachStdin": true,
          "Env": {},
          "User": "string",
          "Tty": true,
          "ExposedPorts": {},
          "Memory": 0,
          "MemorySwap": 0,
          "VolumesFrom": "string",
          "Volumes": "string",
          "Cmd": "string",
          "PortSpecs": {},
          "Image": "string",
          "WorkingDir": "string",
          "CpuShares": 0,
          "NetworkDisabled": true,
          "Domainname": "string",
          "OnBuild": "string",
          "Hostname": "string"
        },
        "State": {
          "Status": "string",
          "Running": true,
          "Paused": true,
          "Restarting": true,
          "OOMKilled": true,
          "Pid": 0,
          "ExitCode": 0,
          "Error": "string",
          "StartedAt": "string",
          "FinishedAt": "string",
          "Ghost": true,
          "Dead": true
        },
        "NetworkSettings": {
          "Gateway": "string",
          "SandboxID": "string",
          "HairpinMode": true,
          "Bridge": "string",
          "LinkLocalIPv6Address": "string",
          "LinkLocalIPv6PrefixLen": 0,
          "SandboxKey": "string",
          "SecondaryIPAddresses": "string",
          "SecondaryIPv6Addresses": "string",
          "EndpointID": "string",
          "GlobalIPv6Address": "string",
          "GlobalIPv6PrefixLen": 0,
          "IPAddress": "string",
          "IPPrefixLen": 0,
          "IPv6Gateway": "string",
          "MacAddress": "string",
          "PortMapping": {},
          "Ports": {}
        },
        "ResolvConfPath": "string",
        "HostnamePath": "string",
        "HostsPath": "string",
        "LogPath": "string",
        "Name": "string",
        "Platform": "string",
        "Driver": "string",
        "ExecDriver": "string",
        "MountLabel": "string",
        "ProcessLabel": "string",
        "ExecIDs": [
          "string"
        ],
        "Volumes": {},
        "VolumesRW": {},
        "HostConfig": {}
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

RunningContainersDetailResponse

Name Type Required Constraints Description
  response object false - -
   containers [object] false - -
    Container object false - -
     Id string false - -
     Created string false - -
     Path string false - -
     RestartCount integer false - -
     Args [string] false - -
     AppArmorProfile string false - -
     Image string false - -
     Config object¦null false - -
      Entrypoint string¦null false - -
      Dns string¦null false - -
      OpenStdin boolean false - -
      StdinOnce boolean false - -
      AttachStderr boolean false - -
      AttachStdout boolean false - -
      AttachStdin boolean false - -
      Env object¦null false - -
      User string false - -
      Tty boolean false - -
      ExposedPorts object¦null false - -
      Memory integer false - -
      MemorySwap integer false - -
      VolumesFrom string false - -
      Volumes string¦null false - -
      Cmd string¦null false - -
      PortSpecs object¦null false - -
      Image string false - -
      WorkingDir string false - -
      CpuShares integer false - -
      NetworkDisabled boolean false - -
      Domainname string false - -
      OnBuild string¦null false - -
      Hostname string false - -
     State object false - -
      Status string false - -
      Running boolean false - -
      Paused boolean false - -
      Restarting boolean false - -
      OOMKilled boolean false - -
      Pid integer false - -
      ExitCode integer false - -
      Error string false - -
      StartedAt string false - -
      FinishedAt string false - -
      Ghost boolean false - -
      Dead boolean false - -
     NetworkSettings object false - -
      Gateway string false - -
      SandboxID string false - -
      HairpinMode boolean false - -
      Bridge string false - -
      LinkLocalIPv6Address string false - -
      LinkLocalIPv6PrefixLen integer false - -
      SandboxKey string false - -
      SecondaryIPAddresses string¦null false - -
      SecondaryIPv6Addresses string¦null false - -
      EndpointID string false - -
      GlobalIPv6Address string false - -
      GlobalIPv6PrefixLen integer false - -
      IPAddress string false - -
      IPPrefixLen integer false - -
      IPv6Gateway string false - -
      MacAddress string false - -
      PortMapping object¦null false - -
      Ports object¦null false - -
     ResolvConfPath string false - -
     HostnamePath string false - -
     HostsPath string false - -
     LogPath string false - -
     Name string false - -
     Platform string false - -
     Driver string false - -
     ExecDriver string false - -
     MountLabel string false - -
     ProcessLabel string false - -
     ExecIDs [string]¦null false - -
     Volumes object¦null false - -
     VolumesRW object¦null false - -
     HostConfig object¦null false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Start container

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/container_system/containers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_start_container(
    uuid=uuid,
    ipaddress=ipaddress,
    description=description,
    environment=environment)

print(api_response.json())

POST /container_system/containers

Create (allocate) a new container or start an existing one

Body parameter

{
  "uuid": "string",
  "image_uuid": "string",
  "name": "string",
  "ipaddress": "string",
  "description": "string",
  "command": "string",
  "environment": "string"
}

Parameters

Name In Type Required Description
uuid body string false Id of container if present
image_uuid body string false Container image from which to allocate container
name body string false Name for the allocated container
ipaddress body string false IP address to use for container
description body string false -
command body string false Command used to run container
environment body string false Environment string to pass to container

One of the following param combinations are required:

Example responses

200 Response

{
  "response": {
    "uuid": "a0df70a7ae3f52cdf33d8ee1003b7c2c982f9cba018caf29f6be043741044139",
    "container_started": true,
    "ip_address": "198.51.100.3",
    "status": "Running"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347731532179638778333642624237974834407",
    "message": "Required field missing. Either 'name', 'command', 'image_uuid' must be passed or 'uuid'"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container run limit reached - maximum running containers allowed: 10; currently running 10",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

RunContainerDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   container_started boolean false - -
   ip_address string false - -
   status string false - Container system status for allocated container

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Stop container

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/container_system/containers/{uuid} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_stop_container(uuid)

print(api_response.json())

PUT /container_system/containers/{uuid}

Stops a running container

Parameters

Name In Type Required Description
uuid path string true uuid of resource

Example responses

200 Response

{
  "response": {
    "uuid": "a0df70a7ae3f52cdf33d8ee1003b7c2c982f9cba018caf29f6be043741044139",
    "status": "Stopped"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "error": {
    "name": "string",
    "log": "string",
    "message": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

StopContainerDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   status string false - Container system status for allocated container

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete container

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/container_system/containers/{uuid} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_container(uuid)

print(api_response.json())

DELETE /container_system/containers/{uuid}

Stop and delete container

Parameters

Name In Type Required Description
uuid path string true uuid of resource

Example responses

200 Response

{
  "response": {
    "uuid": "afee0b2ce700770581b5f1a80beb01f2a33e35b8f62c43738203a275c70a40f0",
    "container_deleted": true
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "error": {
    "name": "string",
    "log": "string",
    "message": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

DeleteContainerDetailResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   container_deleted boolean false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Commit container

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/container_system/containers/{uuid}/commit \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_commit_container(uuid,
    name=name,
    description=description)

print(api_response.json())

POST /container_system/containers/{uuid}/commit

Creates a new container image from a running container

Body parameter

{
  "name": true,
  "description": "string"
}

Parameters

Name In Type Required Description
uuid path string true uuid of resource
name body boolean true Name of new image
description body string false -

Example responses

200 Response

{
  "response": {
    "uuid": "e65dfe85fed9826a0649e241aa7c57f09b0bcb9eef638fec3a7d75cfa368e1b7",
    "name": "app2_version_1.2.3"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Unable to commit to new image, container image limit reached - maximum stored images allowed: 5; currently stored 5",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

CreateContainerImageResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - ID of the new image
   name string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get container logs

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/container_system/containers/{uuid}/logs?lines=0 \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_container_logs(uuid,
    lines=lines)

print(api_response.json())

GET /container_system/containers/{uuid}/logs

Fetch containers log messages

Parameters

Name In Type Required Description
uuid path string true uuid of resource
lines query integer true Number of log lines to fetch

Example responses

200 Response

{
  "response": {
    "uuid": "string",
    "logs": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

ContainerLogsResponse

Name Type Required Constraints Description
  response object false - -
   uuid string false - -
   logs [string] false - -

Get plugins

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugins \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugins()

print(api_response.json())

GET /plugins

Get list of plugins. These are container images installed with the container subsystem.

Example responses

200 Response

{
  "response": [
    {
      "id": 0,
      "uuid": "string",
      "name": "string",
      "tag_name": "string",
      "version": "string",
      "status": "string",
      "status_msg": "string",
      "status_message": "string",
      "import_id": "string",
      "created_at": "string",
      "description": "string",
      "url": "string",
      "catalog_id": "string",
      "containers": [
        {
          "id": 0,
          "status": "string"
        }
      ],
      "running_containers": 0,
      "instance_count": 0,
      "instances": [
        0
      ],
      "exports": [
        "string"
      ],
      "documentation_url": "string",
      "support_url": "string",
      "data": {
        "comment": "string",
        "container_config": {}
      }
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginListResponse

Name Type Required Constraints Description
  response [object] false - -
   Plugin object false - -
    id integer false - -
    uuid string¦null false - -
    name string false - -
    tag_name string false - -
    version string false - -
    status string false - -
    status_msg string false - -
    status_message string false - -
    import_id string false - -
    created_at string false - -
    description string false - -
    url string false - -
    catalog_id string false - -
    containers [object] false - -
     id integer false - -
     status string false - -
    running_containers integer false - -
    instance_count integer false - -
    instances [integer] false - list of instance ids created from this plugin
    exports [string] false - -
    documentation_url string¦null false - -
    support_url string¦null false - -
    data object false - -
     comment string false - -
     container_config object false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Install new plugin from the catalog

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugins \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.install_plugin(
    name=name,
    image_url=image_url,
    description=description,
    command=command,
    documentation_url=documentation_url,
    support_url=support_url,
    catalog_id=catalog_id,
    version=version,
    tags=tags,
      **additionalProperties**=  **additionalProperties**,
    metadata=metadata,
      **additionalProperties**=  **additionalProperties**)

print(api_response.json())

POST /plugins

Install a new plugin

Body parameter

{
  "name": "string",
  "image_url": "string",
  "description": "string",
  "command": "string",
  "documentation_url": "string",
  "support_url": "string",
  "catalog_id": "string",
  "version": "1",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
name body string true Name of the new plugin
image_url body string true Plugin Image URL to a tar.gz installable image.
description body string false -
command body string false Plugin start command
documentation_url body string false URL to documentation for the plugin provided by plugin developer
support_url body string false URL to support site provided by plugin developer
catalog_id body string false -
version body string false -
tags body object false Key Value pairs associated with plugin
  additionalProperties body string false -
metadata body object false Optional additional data to associate with metadata
  additionalProperties body string false -

Example responses

201 Response

{
  "response": {
    "id": 0,
    "uuid": "string",
    "name": "string",
    "tag_name": "string",
    "version": "string",
    "status": "string",
    "status_msg": "string",
    "status_message": "string",
    "import_id": "string",
    "created_at": "string",
    "description": "string",
    "url": "string",
    "catalog_id": "string",
    "containers": [
      {
        "id": 0,
        "status": "string"
      }
    ],
    "running_containers": 0,
    "instance_count": 0,
    "instances": [
      0
    ],
    "exports": [
      "string"
    ],
    "documentation_url": "string",
    "support_url": "string",
    "data": {
      "comment": "string",
      "container_config": {}
    }
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Plugin subsystem is not running."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 201

PluginDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   uuid string¦null false - -
   name string false - -
   tag_name string false - -
   version string false - -
   status string false - -
   status_msg string false - -
   status_message string false - -
   import_id string false - -
   created_at string false - -
   description string false - -
   url string false - -
   catalog_id string false - -
   containers [object] false - -
    id integer false - -
    status string false - -
   running_containers integer false - -
   instance_count integer false - -
   instances [integer] false - list of instance ids created from this plugin
   exports [string] false - -
   documentation_url string¦null false - -
   support_url string¦null false - -
   data object false - -
    comment string false - -
    container_config object false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin exports

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-exports \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_system_exports()

print(api_response.json())

GET /plugin-exports

Get list of available plugin exports

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "basename": "string",
      "size": 0,
      "mtime": "string",
      "status": "string",
      "token": "string",
      "url": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginExportsResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginExport object false - -
    name string false - -
    basename string false - -
    size integer false - Size of export (bytes)
    mtime string false - -
    status string false - -
    token string false - -
    url string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get the list of plugins available in the catalog

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-catalog \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_catalog()

print(api_response.json())

GET /plugin-catalog

Get plugin catalog

Example responses

200 Response

{
  "response": {}
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginCatalogResponse

Name Type Required Constraints Description
  response object false - -
   PluginCatalogImage object false - -
    name string false - -
    description string false - -
    documentation string false - -
    support string false - -
    image_url string false - -
    categories [string] false - -
    tags string false - -
    logo string false - -
    keyphrases [string] false - -
    version string false - -
    provider_code string false - -
    vns3_compatability string false - -
    id string false - -
    installed boolean false - -
    installed_image_id integer false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugins/{id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin(id)

print(api_response.json())

GET /plugins/{id}

Get plugin details by id

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "Suricata",
    "tag_name": "vns3local:Suricata",
    "status": "Ready",
    "status_msg": null,
    "import_id": "bb61ffb0c6a7d05870e603130c2089ff80aef96c11e8cf9f88836e3855494aa5",
    "created_at": "2021-01-28T22:29:45.808Z",
    "description": "",
    "url": "/api/plugins/1",
    "containers": {
      "id": 2,
      "status": "running"
    },
    "running_containers": 1,
    "data": {
      "comment": "",
      "container_config": {
        "Hostname": "",
        "Domainname": "",
        "User": ""
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   uuid string¦null false - -
   name string false - -
   tag_name string false - -
   version string false - -
   status string false - -
   status_msg string false - -
   status_message string false - -
   import_id string false - -
   created_at string false - -
   description string false - -
   url string false - -
   catalog_id string false - -
   containers [object] false - -
    id integer false - -
    status string false - -
   running_containers integer false - -
   instance_count integer false - -
   instances [integer] false - list of instance ids created from this plugin
   exports [string] false - -
   documentation_url string¦null false - -
   support_url string¦null false - -
   data object false - -
    comment string false - -
    container_config object false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update plugin data

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/plugins/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_update_plugin(id,
    name=name,
    description=description,
    command=command,
    documentation_url=documentation_url,
    support_url=support_url,
    version=version,
    tags=tags,
      **additionalProperties**=  **additionalProperties**)

print(api_response.json())

PUT /plugins/{id}

Update plugin data

Body parameter

{
  "name": "string",
  "description": "string",
  "command": "string",
  "documentation_url": "string",
  "support_url": "string",
  "version": "string",
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)
name body string false -
description body string false -
command body string false Plugin start command
documentation_url body string false URL to documentation for the plugin provided by plugin developer
support_url body string false URL to support site provided by plugin developer
version body string false -
tags body object false Key Value pairs associated with plugin
  additionalProperties body string false -

Example responses

200 Response

{
  "response": {
    "id": 0,
    "uuid": "string",
    "name": "string",
    "tag_name": "string",
    "version": "string",
    "status": "string",
    "status_msg": "string",
    "status_message": "string",
    "import_id": "string",
    "created_at": "string",
    "description": "string",
    "url": "string",
    "catalog_id": "string",
    "containers": [
      {
        "id": 0,
        "status": "string"
      }
    ],
    "running_containers": 0,
    "instance_count": 0,
    "instances": [
      0
    ],
    "exports": [
      "string"
    ],
    "documentation_url": "string",
    "support_url": "string",
    "data": {
      "comment": "string",
      "container_config": {}
    }
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Plugin with name and version already exists."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   uuid string¦null false - -
   name string false - -
   tag_name string false - -
   version string false - -
   status string false - -
   status_msg string false - -
   status_message string false - -
   import_id string false - -
   created_at string false - -
   description string false - -
   url string false - -
   catalog_id string false - -
   containers [object] false - -
    id integer false - -
    status string false - -
   running_containers integer false - -
   instance_count integer false - -
   instances [integer] false - list of instance ids created from this plugin
   exports [string] false - -
   documentation_url string¦null false - -
   support_url string¦null false - -
   data object false - -
    comment string false - -
    container_config object false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete plugin

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/plugins/{id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_plugin(id)

print(api_response.json())

DELETE /plugins/{id}

Delete plugin

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)

Example responses

200 Response

{
  "response": {
    "id": 0,
    "uuid": "string",
    "name": "string",
    "tag_name": "string",
    "version": "string",
    "status": "string",
    "status_msg": "string",
    "status_message": "string",
    "import_id": "string",
    "created_at": "string",
    "description": "string",
    "url": "string",
    "catalog_id": "string",
    "containers": [
      {
        "id": 0,
        "status": "string"
      }
    ],
    "running_containers": 0,
    "instance_count": 0,
    "instances": [
      0
    ],
    "exports": [
      "string"
    ],
    "documentation_url": "string",
    "support_url": "string",
    "data": {
      "comment": "string",
      "container_config": {}
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   uuid string¦null false - -
   name string false - -
   tag_name string false - -
   version string false - -
   status string false - -
   status_msg string false - -
   status_message string false - -
   import_id string false - -
   created_at string false - -
   description string false - -
   url string false - -
   catalog_id string false - -
   containers [object] false - -
    id integer false - -
    status string false - -
   running_containers integer false - -
   instance_count integer false - -
   instances [integer] false - list of instance ids created from this plugin
   exports [string] false - -
   documentation_url string¦null false - -
   support_url string¦null false - -
   data object false - -
    comment string false - -
    container_config object false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get available plugin export files

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugins/{id}/exports \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_exports(id)

print(api_response.json())

GET /plugins/{id}/exports

Get plugin exports

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "basename": "string",
      "size": 0,
      "mtime": "string",
      "status": "string",
      "token": "string",
      "url": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginExportsResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginExport object false - -
    name string false - -
    basename string false - -
    size integer false - Size of export (bytes)
    mtime string false - -
    status string false - -
    token string false - -
    url string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create new plugin export file

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugins/{id}/exports \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.create_plugin_export(id,
    name=name)

print(api_response.json())

POST /plugins/{id}/exports

Create new plugin export

Body parameter

{
  "name": "string"
}

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)
name body string true -

Example responses

201 Response

{
  "response": {
    "name": "string",
    "basename": "string",
    "size": 0,
    "mtime": "string",
    "status": "string",
    "token": "string",
    "url": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin not found"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 201

PluginExportDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   basename string false - -
   size integer false - Size of export (bytes)
   mtime string false - -
   status string false - -
   token string false - -
   url string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Download plugin export file

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugins/{id}/exports/{export_name} \
  -H 'Accept: application/octet-stream'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_download_plugin_export(id,export_name)

print(api_response.file_download)   # path to downloaded file

GET /plugins/{id}/exports/{export_name}

Download plugin export

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)
export_name path string true Name of export file

Example responses

200 Response

"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "export not found"
  }
}

Responses

Status Meaning Description Schema
200 OK OK string
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete plugin export file

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/plugins/{id}/exports/{export_name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_plugin_export(id,export_name)

print(api_response.json())

DELETE /plugins/{id}/exports/{export_name}

Delete plugin export

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)
export_name path string true Name of export file

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "basename": "string",
      "size": 0,
      "mtime": "string",
      "status": "string",
      "token": "string",
      "url": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Export name does not exist for plugin."
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginExportsResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginExport object false - -
    name string false - -
    basename string false - -
    size integer false - Size of export (bytes)
    mtime string false - -
    status string false - -
    token string false - -
    url string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin manager config json

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugins/{id}/manager \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_manager_config(id)

print(api_response.json())

GET /plugins/{id}/manager

Get plugin manager config

Parameters

Name In Type Required Description
id path integer true ID for plugin (container image)

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin instances

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instances()

print(api_response.json())

GET /plugin-instances

Get running plugin instances. These are running containers allocated from plugin images.

Example responses

200 Response

{
  "response": [
    {
      "id": 0,
      "name": "string",
      "description": "string",
      "url": "string",
      "command": "string",
      "image_id": 0,
      "uuid": "string",
      "status": "string",
      "ip_address": "string",
      "created_at": "string",
      "updated_at": "string",
      "status_message": "string",
      "environment": "string",
      "image_name": "string",
      "firewall": [
        {
          "rule": "string",
          "tags": [
            "string"
          ],
          "plugin_port": 0,
          "destination_port": 0
        }
      ],
      "port_maps": {
        "property1": 0,
        "property2": 0
      },
      "manager": {
        "log_files": [
          {
            "path": "string",
            "description": "string"
          }
        ],
        "configuration_files": [
          {
            "name": "string",
            "path": "string",
            "description": "string",
            "version": 0,
            "created_at": "2019-08-24T14:15:22Z",
            "previous_versions": [
              {
                "version": 0,
                "path": "string",
                "created_at": "string"
              }
            ]
          }
        ],
        "ports": [
          {
            "port": 0,
            "protocol": "string",
            "ui": true,
            "ssl": true,
            "ui_path": "string"
          }
        ],
        "process_manager": {
          "name": "string",
          "subprocesses": [
            "string"
          ]
        },
        "executables": [
          {
            "path": "string",
            "name": "string",
            "commands": {
              "property1": "string",
              "property2": "string"
            }
          }
        ]
      },
      "data": {
        "Id": "string",
        "Created": "string",
        "Path": "string",
        "RestartCount": 0,
        "Args": [
          "string"
        ],
        "AppArmorProfile": "string",
        "Image": "string",
        "Config": {
          "Entrypoint": "string",
          "Dns": "string",
          "OpenStdin": true,
          "StdinOnce": true,
          "AttachStderr": true,
          "AttachStdout": true,
          "AttachStdin": true,
          "Env": {},
          "User": "string",
          "Tty": true,
          "ExposedPorts": {},
          "Memory": 0,
          "MemorySwap": 0,
          "VolumesFrom": "string",
          "Volumes": "string",
          "Cmd": "string",
          "PortSpecs": {},
          "Image": "string",
          "WorkingDir": "string",
          "CpuShares": 0,
          "NetworkDisabled": true,
          "Domainname": "string",
          "OnBuild": "string",
          "Hostname": "string"
        },
        "State": {
          "Status": "string",
          "Running": true,
          "Paused": true,
          "Restarting": true,
          "OOMKilled": true,
          "Pid": 0,
          "ExitCode": 0,
          "Error": "string",
          "StartedAt": "string",
          "FinishedAt": "string",
          "Ghost": true,
          "Dead": true
        },
        "NetworkSettings": {
          "Gateway": "string",
          "SandboxID": "string",
          "HairpinMode": true,
          "Bridge": "string",
          "LinkLocalIPv6Address": "string",
          "LinkLocalIPv6PrefixLen": 0,
          "SandboxKey": "string",
          "SecondaryIPAddresses": "string",
          "SecondaryIPv6Addresses": "string",
          "EndpointID": "string",
          "GlobalIPv6Address": "string",
          "GlobalIPv6PrefixLen": 0,
          "IPAddress": "string",
          "IPPrefixLen": 0,
          "IPv6Gateway": "string",
          "MacAddress": "string",
          "PortMapping": {},
          "Ports": {}
        },
        "ResolvConfPath": "string",
        "HostnamePath": "string",
        "HostsPath": "string",
        "LogPath": "string",
        "Name": "string",
        "Platform": "string",
        "Driver": "string",
        "ExecDriver": "string",
        "MountLabel": "string",
        "ProcessLabel": "string",
        "ExecIDs": [
          "string"
        ],
        "Volumes": {},
        "VolumesRW": {},
        "HostConfig": {}
      }
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginInstanceListResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginInstance object false - -
    id integer false - -
    name string false - -
    description string false - -
    url string false - -
    command string false - -
    image_id integer false - -
    uuid string false - -
    status string false - -
    ip_address string false - -
    created_at string false - -
    updated_at string false - -
    status_message string false - -
    environment string false - -
    image_name string false - -
    firewall [object] false - -
     PluginInstanceFirewallRule object false - -
      rule string false - -
      tags [string] false - -
      plugin_port integer false - -
      destination_port integer false - -
    port_maps object false - Map of plugin ports -> VNS3 ports
     additionalProperties integer false - -
    manager object false - -
     log_files [object] false - -
      path string false - -
      description string false - -
     configuration_files [object] false - -
      PluginManagerConfigConfigFile object false - -
       name string false - -
       path string false - -
       description string false - -
       version integer false - -
       created_at string(date-time) false - -
       previous_versions [object] false - -
        version integer false - -
        path string false - -
        created_at string false - -
     ports [object] false - -
      PluginManagerConfigPort object false - -
       port integer false - -
       protocol string false - -
       ui boolean false - -
       ssl boolean false - -
       ui_path string false - -
     process_manager object false - -
      name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
      subprocesses [string] false - Name of programs, services or units managed
     executables [object] false - -
      PluginManagerConfigExecutable object false - -
       path string false - -
       name string false - -
       commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
        additionalProperties string false - -
    data object false - -
     Id string false - -
     Created string false - -
     Path string false - -
     RestartCount integer false - -
     Args [string] false - -
     AppArmorProfile string false - -
     Image string false - -
     Config object¦null false - -
      Entrypoint string¦null false - -
      Dns string¦null false - -
      OpenStdin boolean false - -
      StdinOnce boolean false - -
      AttachStderr boolean false - -
      AttachStdout boolean false - -
      AttachStdin boolean false - -
      Env object¦null false - -
      User string false - -
      Tty boolean false - -
      ExposedPorts object¦null false - -
      Memory integer false - -
      MemorySwap integer false - -
      VolumesFrom string false - -
      Volumes string¦null false - -
      Cmd string¦null false - -
      PortSpecs object¦null false - -
      Image string false - -
      WorkingDir string false - -
      CpuShares integer false - -
      NetworkDisabled boolean false - -
      Domainname string false - -
      OnBuild string¦null false - -
      Hostname string false - -
     State object false - -
      Status string false - -
      Running boolean false - -
      Paused boolean false - -
      Restarting boolean false - -
      OOMKilled boolean false - -
      Pid integer false - -
      ExitCode integer false - -
      Error string false - -
      StartedAt string false - -
      FinishedAt string false - -
      Ghost boolean false - -
      Dead boolean false - -
     NetworkSettings object false - -
      Gateway string false - -
      SandboxID string false - -
      HairpinMode boolean false - -
      Bridge string false - -
      LinkLocalIPv6Address string false - -
      LinkLocalIPv6PrefixLen integer false - -
      SandboxKey string false - -
      SecondaryIPAddresses string¦null false - -
      SecondaryIPv6Addresses string¦null false - -
      EndpointID string false - -
      GlobalIPv6Address string false - -
      GlobalIPv6PrefixLen integer false - -
      IPAddress string false - -
      IPPrefixLen integer false - -
      IPv6Gateway string false - -
      MacAddress string false - -
      PortMapping object¦null false - -
      Ports object¦null false - -
     ResolvConfPath string false - -
     HostnamePath string false - -
     HostsPath string false - -
     LogPath string false - -
     Name string false - -
     Platform string false - -
     Driver string false - -
     ExecDriver string false - -
     MountLabel string false - -
     ProcessLabel string false - -
     ExecIDs [string]¦null false - -
     Volumes object¦null false - -
     VolumesRW object¦null false - -
     HostConfig object¦null false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Start new plugin instance from a plugin

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.start_plugin_instance(
    name=name,
    plugin_id=plugin_id,
    description=description,
    ip_address=ip_address,
    command=command,
    manager_config=manager_config,
      log_files=  log_files,
       path=   path,
       description=   description,
      configuration_files=  configuration_files,
       PluginManagerConfigConfigFile=   PluginManagerConfigConfigFile,
        name=    name,
        path=    path,
        description=    description,
        version=    version,
        created_at=    created_at,
        previous_versions=    previous_versions,
         version=     version,
         path=     path,
         created_at=     created_at,
      ports=  ports,
       PluginManagerConfigPort=   PluginManagerConfigPort,
        port=    port,
        protocol=    protocol,
        ui=    ui,
        ssl=    ssl,
        ui_path=    ui_path,
      process_manager=  process_manager,
       name=   name,
       subprocesses=   subprocesses,
      executables=  executables,
       PluginManagerConfigExecutable=   PluginManagerConfigExecutable,
        path=    path,
        name=    name,
        commands=    commands,
         **additionalProperties**=     **additionalProperties**,
    environment=environment,
      key=  key,
      value=  value,
       *any*=   *any*,
       *any*=   *any*,
       *any*=   *any*)

print(api_response.json())

POST /plugin-instances

Start plugin instance

Body parameter

{
  "name": "string",
  "plugin_id": 0,
  "description": "string",
  "ip_address": "string",
  "command": "string",
  "manager_config": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  },
  "environment": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}

Parameters

Name In Type Required Description
name body string true Name of the new plugin instance
plugin_id body integer true ID of plugin
description body string false -
ip_address body string false IP to use from plugin network
command body string false Optionally override the plugins command. Required if plugin command not defined.
manager_config body #/paths/~1plugin-instances/post/requestBody/content/application~1json/schema/properties/manager_config false -
  log_files body [object] false -
   path body string false -
   description body string false -
  configuration_files body [object] false -
   PluginManagerConfigConfigFile body object false -
    name body string false -
    path body string false -
    description body string false -
    version body integer false -
    created_at body string(date-time) false -
    previous_versions body [object] false -
     version body integer false -
     path body string false -
     created_at body string false -
  ports body [object] false -
   PluginManagerConfigPort body object false -
    port body integer false -
    protocol body string false -
    ui body boolean false -
    ssl body boolean false -
    ui_path body string false -
  process_manager body object false -
   name body string false name of process manager such as supervisor. Currently we support commands for supervisor and service.
   subprocesses body [string] false Name of programs, services or units managed
  executables body [object] false -
   PluginManagerConfigExecutable body object false -
    path body string false -
    name body string false -
    commands body object false Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
     additionalProperties body string false -
environment body [object] false -
  key body string false -
  value body any false -
   any body string false -
   any body integer false -
   any body boolean false -

Example responses

201 Response

{
  "response": {
    "id": 0,
    "name": "string",
    "description": "string",
    "url": "string",
    "command": "string",
    "image_id": 0,
    "uuid": "string",
    "status": "string",
    "ip_address": "string",
    "created_at": "string",
    "updated_at": "string",
    "status_message": "string",
    "environment": "string",
    "image_name": "string",
    "firewall": [
      {
        "rule": "string",
        "tags": [
          "string"
        ],
        "plugin_port": 0,
        "destination_port": 0
      }
    ],
    "port_maps": {
      "property1": 0,
      "property2": 0
    },
    "manager": {
      "log_files": [
        {
          "path": "string",
          "description": "string"
        }
      ],
      "configuration_files": [
        {
          "name": "string",
          "path": "string",
          "description": "string",
          "version": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "previous_versions": [
            {
              "version": 0,
              "path": "string",
              "created_at": "string"
            }
          ]
        }
      ],
      "ports": [
        {
          "port": 0,
          "protocol": "string",
          "ui": true,
          "ssl": true,
          "ui_path": "string"
        }
      ],
      "process_manager": {
        "name": "string",
        "subprocesses": [
          "string"
        ]
      },
      "executables": [
        {
          "path": "string",
          "name": "string",
          "commands": {
            "property1": "string",
            "property2": "string"
          }
        }
      ]
    },
    "data": {
      "Id": "string",
      "Created": "string",
      "Path": "string",
      "RestartCount": 0,
      "Args": [
        "string"
      ],
      "AppArmorProfile": "string",
      "Image": "string",
      "Config": {
        "Entrypoint": "string",
        "Dns": "string",
        "OpenStdin": true,
        "StdinOnce": true,
        "AttachStderr": true,
        "AttachStdout": true,
        "AttachStdin": true,
        "Env": {},
        "User": "string",
        "Tty": true,
        "ExposedPorts": {},
        "Memory": 0,
        "MemorySwap": 0,
        "VolumesFrom": "string",
        "Volumes": "string",
        "Cmd": "string",
        "PortSpecs": {},
        "Image": "string",
        "WorkingDir": "string",
        "CpuShares": 0,
        "NetworkDisabled": true,
        "Domainname": "string",
        "OnBuild": "string",
        "Hostname": "string"
      },
      "State": {
        "Status": "string",
        "Running": true,
        "Paused": true,
        "Restarting": true,
        "OOMKilled": true,
        "Pid": 0,
        "ExitCode": 0,
        "Error": "string",
        "StartedAt": "string",
        "FinishedAt": "string",
        "Ghost": true,
        "Dead": true
      },
      "NetworkSettings": {
        "Gateway": "string",
        "SandboxID": "string",
        "HairpinMode": true,
        "Bridge": "string",
        "LinkLocalIPv6Address": "string",
        "LinkLocalIPv6PrefixLen": 0,
        "SandboxKey": "string",
        "SecondaryIPAddresses": "string",
        "SecondaryIPv6Addresses": "string",
        "EndpointID": "string",
        "GlobalIPv6Address": "string",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "string",
        "IPPrefixLen": 0,
        "IPv6Gateway": "string",
        "MacAddress": "string",
        "PortMapping": {},
        "Ports": {}
      },
      "ResolvConfPath": "string",
      "HostnamePath": "string",
      "HostsPath": "string",
      "LogPath": "string",
      "Name": "string",
      "Platform": "string",
      "Driver": "string",
      "ExecDriver": "string",
      "MountLabel": "string",
      "ProcessLabel": "string",
      "ExecIDs": [
        "string"
      ],
      "Volumes": {},
      "VolumesRW": {},
      "HostConfig": {}
    }
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Plugin with ID 5 does not exist."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 201

PluginInstanceDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   description string false - -
   url string false - -
   command string false - -
   image_id integer false - -
   uuid string false - -
   status string false - -
   ip_address string false - -
   created_at string false - -
   updated_at string false - -
   status_message string false - -
   environment string false - -
   image_name string false - -
   firewall [object] false - -
    PluginInstanceFirewallRule object false - -
     rule string false - -
     tags [string] false - -
     plugin_port integer false - -
     destination_port integer false - -
   port_maps object false - Map of plugin ports -> VNS3 ports
    additionalProperties integer false - -
   manager object false - -
    log_files [object] false - -
     path string false - -
     description string false - -
    configuration_files [object] false - -
     PluginManagerConfigConfigFile object false - -
      name string false - -
      path string false - -
      description string false - -
      version integer false - -
      created_at string(date-time) false - -
      previous_versions [object] false - -
       version integer false - -
       path string false - -
       created_at string false - -
    ports [object] false - -
     PluginManagerConfigPort object false - -
      port integer false - -
      protocol string false - -
      ui boolean false - -
      ssl boolean false - -
      ui_path string false - -
    process_manager object false - -
     name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
     subprocesses [string] false - Name of programs, services or units managed
    executables [object] false - -
     PluginManagerConfigExecutable object false - -
      path string false - -
      name string false - -
      commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
       additionalProperties string false - -
   data object false - -
    Id string false - -
    Created string false - -
    Path string false - -
    RestartCount integer false - -
    Args [string] false - -
    AppArmorProfile string false - -
    Image string false - -
    Config object¦null false - -
     Entrypoint string¦null false - -
     Dns string¦null false - -
     OpenStdin boolean false - -
     StdinOnce boolean false - -
     AttachStderr boolean false - -
     AttachStdout boolean false - -
     AttachStdin boolean false - -
     Env object¦null false - -
     User string false - -
     Tty boolean false - -
     ExposedPorts object¦null false - -
     Memory integer false - -
     MemorySwap integer false - -
     VolumesFrom string false - -
     Volumes string¦null false - -
     Cmd string¦null false - -
     PortSpecs object¦null false - -
     Image string false - -
     WorkingDir string false - -
     CpuShares integer false - -
     NetworkDisabled boolean false - -
     Domainname string false - -
     OnBuild string¦null false - -
     Hostname string false - -
    State object false - -
     Status string false - -
     Running boolean false - -
     Paused boolean false - -
     Restarting boolean false - -
     OOMKilled boolean false - -
     Pid integer false - -
     ExitCode integer false - -
     Error string false - -
     StartedAt string false - -
     FinishedAt string false - -
     Ghost boolean false - -
     Dead boolean false - -
    NetworkSettings object false - -
     Gateway string false - -
     SandboxID string false - -
     HairpinMode boolean false - -
     Bridge string false - -
     LinkLocalIPv6Address string false - -
     LinkLocalIPv6PrefixLen integer false - -
     SandboxKey string false - -
     SecondaryIPAddresses string¦null false - -
     SecondaryIPv6Addresses string¦null false - -
     EndpointID string false - -
     GlobalIPv6Address string false - -
     GlobalIPv6PrefixLen integer false - -
     IPAddress string false - -
     IPPrefixLen integer false - -
     IPv6Gateway string false - -
     MacAddress string false - -
     PortMapping object¦null false - -
     Ports object¦null false - -
    ResolvConfPath string false - -
    HostnamePath string false - -
    HostsPath string false - -
    LogPath string false - -
    Name string false - -
    Platform string false - -
    Driver string false - -
    ExecDriver string false - -
    MountLabel string false - -
    ProcessLabel string false - -
    ExecIDs [string]¦null false - -
    Volumes object¦null false - -
    VolumesRW object¦null false - -
    HostConfig object¦null false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin instance

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance(id,
    system_data=system_data)

print(api_response.json())

GET /plugin-instances/{id}

Get plugin instance details by id

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
system_data query boolean false Fetch instance system data

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "HA",
    "description": "",
    "command": "/usr/bin/supervisord",
    "image_id": 2,
    "uuid": "1d56040d823c02d93dedd8835d8bdebba620d9ca26d0767ba99a37cc2b89e7ff",
    "status\"": "running",
    "ip_address": "198.51.100.2",
    "created_at": "2021-01-28T22:36:58.095Z",
    "updated_at": "2021-01-28T22:36:59.804Z",
    "status_message": null,
    "environment": "",
    "image_name": "HA Plugin",
    "data": {
      "Id": "1d56040d823c02d93dedd8835d8bdebba620d9ca26d0767ba99a37cc2b89e7ff",
      "Created": "2021-01-28T22:36:59.244192439Z",
      "Path": "/usr/bin/supervisord",
      "Args": [],
      "State": {
        "Status": "running",
        "Running": true,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 249880,
        "ExitCode": 0,
        "Error": "",
        "StartedAt": "2021-01-28T22:36:59.780044985Z",
        "FinishedAt": "0001-01-01T00:00:00Z"
      },
      "Image": "sha256:0eb951a96b6ecb47e3a16053737c3308060ca028544065882d718d5759bf275c"
    },
    "firewall": [],
    "port_maps": {},
    "manager": {
      "log_files": [
        {
          "path": "/opt/hacontainer/log/process.log",
          "description": "HA Process Log"
        }
      ],
      "configuration_files": [
        {
          "name": "HA Variables",
          "path": "/opt/hacontainer/conf/vars.yml",
          "version": 2,
          "created": "2021-01-28 22:40:30 UTC",
          "previous_versions": [
            {
              "version": 1,
              "path": "/opt/plugin-manager/backups/vars.1.yml",
              "created": "2021-01-28 22:40:30 UTC"
            }
          ]
        }
      ],
      "ports": [],
      "process_manager": {
        "name": "supervisor",
        "subprocesses": [
          "hacontainer",
          "ui"
        ]
      }
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginInstanceDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   description string false - -
   url string false - -
   command string false - -
   image_id integer false - -
   uuid string false - -
   status string false - -
   ip_address string false - -
   created_at string false - -
   updated_at string false - -
   status_message string false - -
   environment string false - -
   image_name string false - -
   firewall [object] false - -
    PluginInstanceFirewallRule object false - -
     rule string false - -
     tags [string] false - -
     plugin_port integer false - -
     destination_port integer false - -
   port_maps object false - Map of plugin ports -> VNS3 ports
    additionalProperties integer false - -
   manager object false - -
    log_files [object] false - -
     path string false - -
     description string false - -
    configuration_files [object] false - -
     PluginManagerConfigConfigFile object false - -
      name string false - -
      path string false - -
      description string false - -
      version integer false - -
      created_at string(date-time) false - -
      previous_versions [object] false - -
       version integer false - -
       path string false - -
       created_at string false - -
    ports [object] false - -
     PluginManagerConfigPort object false - -
      port integer false - -
      protocol string false - -
      ui boolean false - -
      ssl boolean false - -
      ui_path string false - -
    process_manager object false - -
     name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
     subprocesses [string] false - Name of programs, services or units managed
    executables [object] false - -
     PluginManagerConfigExecutable object false - -
      path string false - -
      name string false - -
      commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
       additionalProperties string false - -
   data object false - -
    Id string false - -
    Created string false - -
    Path string false - -
    RestartCount integer false - -
    Args [string] false - -
    AppArmorProfile string false - -
    Image string false - -
    Config object¦null false - -
     Entrypoint string¦null false - -
     Dns string¦null false - -
     OpenStdin boolean false - -
     StdinOnce boolean false - -
     AttachStderr boolean false - -
     AttachStdout boolean false - -
     AttachStdin boolean false - -
     Env object¦null false - -
     User string false - -
     Tty boolean false - -
     ExposedPorts object¦null false - -
     Memory integer false - -
     MemorySwap integer false - -
     VolumesFrom string false - -
     Volumes string¦null false - -
     Cmd string¦null false - -
     PortSpecs object¦null false - -
     Image string false - -
     WorkingDir string false - -
     CpuShares integer false - -
     NetworkDisabled boolean false - -
     Domainname string false - -
     OnBuild string¦null false - -
     Hostname string false - -
    State object false - -
     Status string false - -
     Running boolean false - -
     Paused boolean false - -
     Restarting boolean false - -
     OOMKilled boolean false - -
     Pid integer false - -
     ExitCode integer false - -
     Error string false - -
     StartedAt string false - -
     FinishedAt string false - -
     Ghost boolean false - -
     Dead boolean false - -
    NetworkSettings object false - -
     Gateway string false - -
     SandboxID string false - -
     HairpinMode boolean false - -
     Bridge string false - -
     LinkLocalIPv6Address string false - -
     LinkLocalIPv6PrefixLen integer false - -
     SandboxKey string false - -
     SecondaryIPAddresses string¦null false - -
     SecondaryIPv6Addresses string¦null false - -
     EndpointID string false - -
     GlobalIPv6Address string false - -
     GlobalIPv6PrefixLen integer false - -
     IPAddress string false - -
     IPPrefixLen integer false - -
     IPv6Gateway string false - -
     MacAddress string false - -
     PortMapping object¦null false - -
     Ports object¦null false - -
    ResolvConfPath string false - -
    HostnamePath string false - -
    HostsPath string false - -
    LogPath string false - -
    Name string false - -
    Platform string false - -
    Driver string false - -
    ExecDriver string false - -
    MountLabel string false - -
    ProcessLabel string false - -
    ExecIDs [string]¦null false - -
    Volumes object¦null false - -
    VolumesRW object¦null false - -
    HostConfig object¦null false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete plugin instance

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_plugin_instance(id,
    force=force)

print(api_response.json())

DELETE /plugin-instances/{id}

Delete plugin instance

Body parameter

{
  "force": true
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance
force body boolean false Stop and delete if running

Example responses

200 Response

{
  "response": {
    "id": 0,
    "name": "string",
    "description": "string",
    "url": "string",
    "command": "string",
    "image_id": 0,
    "uuid": "string",
    "status": "string",
    "ip_address": "string",
    "created_at": "string",
    "updated_at": "string",
    "status_message": "string",
    "environment": "string",
    "image_name": "string",
    "firewall": [
      {
        "rule": "string",
        "tags": [
          "string"
        ],
        "plugin_port": 0,
        "destination_port": 0
      }
    ],
    "port_maps": {
      "property1": 0,
      "property2": 0
    },
    "manager": {
      "log_files": [
        {
          "path": "string",
          "description": "string"
        }
      ],
      "configuration_files": [
        {
          "name": "string",
          "path": "string",
          "description": "string",
          "version": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "previous_versions": [
            {
              "version": 0,
              "path": "string",
              "created_at": "string"
            }
          ]
        }
      ],
      "ports": [
        {
          "port": 0,
          "protocol": "string",
          "ui": true,
          "ssl": true,
          "ui_path": "string"
        }
      ],
      "process_manager": {
        "name": "string",
        "subprocesses": [
          "string"
        ]
      },
      "executables": [
        {
          "path": "string",
          "name": "string",
          "commands": {
            "property1": "string",
            "property2": "string"
          }
        }
      ]
    },
    "data": {
      "Id": "string",
      "Created": "string",
      "Path": "string",
      "RestartCount": 0,
      "Args": [
        "string"
      ],
      "AppArmorProfile": "string",
      "Image": "string",
      "Config": {
        "Entrypoint": "string",
        "Dns": "string",
        "OpenStdin": true,
        "StdinOnce": true,
        "AttachStderr": true,
        "AttachStdout": true,
        "AttachStdin": true,
        "Env": {},
        "User": "string",
        "Tty": true,
        "ExposedPorts": {},
        "Memory": 0,
        "MemorySwap": 0,
        "VolumesFrom": "string",
        "Volumes": "string",
        "Cmd": "string",
        "PortSpecs": {},
        "Image": "string",
        "WorkingDir": "string",
        "CpuShares": 0,
        "NetworkDisabled": true,
        "Domainname": "string",
        "OnBuild": "string",
        "Hostname": "string"
      },
      "State": {
        "Status": "string",
        "Running": true,
        "Paused": true,
        "Restarting": true,
        "OOMKilled": true,
        "Pid": 0,
        "ExitCode": 0,
        "Error": "string",
        "StartedAt": "string",
        "FinishedAt": "string",
        "Ghost": true,
        "Dead": true
      },
      "NetworkSettings": {
        "Gateway": "string",
        "SandboxID": "string",
        "HairpinMode": true,
        "Bridge": "string",
        "LinkLocalIPv6Address": "string",
        "LinkLocalIPv6PrefixLen": 0,
        "SandboxKey": "string",
        "SecondaryIPAddresses": "string",
        "SecondaryIPv6Addresses": "string",
        "EndpointID": "string",
        "GlobalIPv6Address": "string",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "string",
        "IPPrefixLen": 0,
        "IPv6Gateway": "string",
        "MacAddress": "string",
        "PortMapping": {},
        "Ports": {}
      },
      "ResolvConfPath": "string",
      "HostnamePath": "string",
      "HostsPath": "string",
      "LogPath": "string",
      "Name": "string",
      "Platform": "string",
      "Driver": "string",
      "ExecDriver": "string",
      "MountLabel": "string",
      "ProcessLabel": "string",
      "ExecIDs": [
        "string"
      ],
      "Volumes": {},
      "VolumesRW": {},
      "HostConfig": {}
    }
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginInstanceDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   description string false - -
   url string false - -
   command string false - -
   image_id integer false - -
   uuid string false - -
   status string false - -
   ip_address string false - -
   created_at string false - -
   updated_at string false - -
   status_message string false - -
   environment string false - -
   image_name string false - -
   firewall [object] false - -
    PluginInstanceFirewallRule object false - -
     rule string false - -
     tags [string] false - -
     plugin_port integer false - -
     destination_port integer false - -
   port_maps object false - Map of plugin ports -> VNS3 ports
    additionalProperties integer false - -
   manager object false - -
    log_files [object] false - -
     path string false - -
     description string false - -
    configuration_files [object] false - -
     PluginManagerConfigConfigFile object false - -
      name string false - -
      path string false - -
      description string false - -
      version integer false - -
      created_at string(date-time) false - -
      previous_versions [object] false - -
       version integer false - -
       path string false - -
       created_at string false - -
    ports [object] false - -
     PluginManagerConfigPort object false - -
      port integer false - -
      protocol string false - -
      ui boolean false - -
      ssl boolean false - -
      ui_path string false - -
    process_manager object false - -
     name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
     subprocesses [string] false - Name of programs, services or units managed
    executables [object] false - -
     PluginManagerConfigExecutable object false - -
      path string false - -
      name string false - -
      commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
       additionalProperties string false - -
   data object false - -
    Id string false - -
    Created string false - -
    Path string false - -
    RestartCount integer false - -
    Args [string] false - -
    AppArmorProfile string false - -
    Image string false - -
    Config object¦null false - -
     Entrypoint string¦null false - -
     Dns string¦null false - -
     OpenStdin boolean false - -
     StdinOnce boolean false - -
     AttachStderr boolean false - -
     AttachStdout boolean false - -
     AttachStdin boolean false - -
     Env object¦null false - -
     User string false - -
     Tty boolean false - -
     ExposedPorts object¦null false - -
     Memory integer false - -
     MemorySwap integer false - -
     VolumesFrom string false - -
     Volumes string¦null false - -
     Cmd string¦null false - -
     PortSpecs object¦null false - -
     Image string false - -
     WorkingDir string false - -
     CpuShares integer false - -
     NetworkDisabled boolean false - -
     Domainname string false - -
     OnBuild string¦null false - -
     Hostname string false - -
    State object false - -
     Status string false - -
     Running boolean false - -
     Paused boolean false - -
     Restarting boolean false - -
     OOMKilled boolean false - -
     Pid integer false - -
     ExitCode integer false - -
     Error string false - -
     StartedAt string false - -
     FinishedAt string false - -
     Ghost boolean false - -
     Dead boolean false - -
    NetworkSettings object false - -
     Gateway string false - -
     SandboxID string false - -
     HairpinMode boolean false - -
     Bridge string false - -
     LinkLocalIPv6Address string false - -
     LinkLocalIPv6PrefixLen integer false - -
     SandboxKey string false - -
     SecondaryIPAddresses string¦null false - -
     SecondaryIPv6Addresses string¦null false - -
     EndpointID string false - -
     GlobalIPv6Address string false - -
     GlobalIPv6PrefixLen integer false - -
     IPAddress string false - -
     IPPrefixLen integer false - -
     IPv6Gateway string false - -
     MacAddress string false - -
     PortMapping object¦null false - -
     Ports object¦null false - -
    ResolvConfPath string false - -
    HostnamePath string false - -
    HostsPath string false - -
    LogPath string false - -
    Name string false - -
    Platform string false - -
    Driver string false - -
    ExecDriver string false - -
    MountLabel string false - -
    ProcessLabel string false - -
    ExecIDs [string]¦null false - -
    Volumes object¦null false - -
    VolumesRW object¦null false - -
    HostConfig object¦null false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Commit plugin instance

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/commit \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_commit_plugin_instance(id,
    name=name,
    description=description,
    version=version)

print(api_response.json())

POST /plugin-instances/{id}/commit

Create new plugin image from a running plugin instance. This will create a new container image.

Body parameter

{
  "name": "string",
  "description": "string",
  "version": "string"
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
name body string true -
description body string false -
version body string false -

Example responses

201 Response

{
  "response": {
    "id": 0,
    "uuid": "string",
    "name": "string",
    "tag_name": "string",
    "version": "string",
    "status": "string",
    "status_msg": "string",
    "status_message": "string",
    "import_id": "string",
    "created_at": "string",
    "description": "string",
    "url": "string",
    "catalog_id": "string",
    "containers": [
      {
        "id": 0,
        "status": "string"
      }
    ],
    "running_containers": 0,
    "instance_count": 0,
    "instances": [
      0
    ],
    "exports": [
      "string"
    ],
    "documentation_url": "string",
    "support_url": "string",
    "data": {
      "comment": "string",
      "container_config": {}
    }
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "156347797058992573673734848595852371200179",
    "message": "name is missing"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 201

PluginDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   uuid string¦null false - -
   name string false - -
   tag_name string false - -
   version string false - -
   status string false - -
   status_msg string false - -
   status_message string false - -
   import_id string false - -
   created_at string false - -
   description string false - -
   url string false - -
   catalog_id string false - -
   containers [object] false - -
    id integer false - -
    status string false - -
   running_containers integer false - -
   instance_count integer false - -
   instances [integer] false - list of instance ids created from this plugin
   exports [string] false - -
   documentation_url string¦null false - -
   support_url string¦null false - -
   data object false - -
    comment string false - -
    container_config object false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create Manager Config

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/manager \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.post_create_manager_config(id,
    body=body)

print(api_response.json())

POST /plugin-instances/{id}/manager

Create new manager configuration for running plugin instance. If no payload is passed, an example configuration will be created for getting started.

Body parameter

{
  "log_files": [
    {
      "path": "string",
      "description": "string"
    }
  ],
  "configuration_files": [
    {
      "name": "string",
      "path": "string",
      "description": "string",
      "version": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "previous_versions": [
        {
          "version": 0,
          "path": "string",
          "created_at": "string"
        }
      ]
    }
  ],
  "ports": [
    {
      "port": 0,
      "protocol": "string",
      "ui": true,
      "ssl": true,
      "ui_path": "string"
    }
  ],
  "process_manager": {
    "name": "string",
    "subprocesses": [
      "string"
    ]
  },
  "executables": [
    {
      "path": "string",
      "name": "string",
      "commands": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
body body #/paths/~1plugin-instances/post/requestBody/content/application~1json/schema/properties/manager_config false -

Example responses

201 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Manager configuration is not empty.  Please issue a PUT request to update.\n"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 201

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update Manager Config

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/manager \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_update_manager_config(id)

print(api_response.json())

PUT /plugin-instances/{id}/manager

Update manager configuration for running plugin instance.

Body parameter

null

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Invalid plugin manager config:  All configuration_files must be objects with a \"path\" key.\n"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin instance logs

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/logs \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_log_files(id)

print(api_response.json())

GET /plugin-instances/{id}/logs

Get plugin instance log file configurations

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)

Example responses

200 Response

{
  "response": [
    {
      "path": "/opt/hacontainer/log/process.log",
      "description": "HA Process Log"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigListLogFilesResponse

Name Type Required Constraints Description
  response [object] false - -
   path string false - -
   description string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Read plugin instance log

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/logs/{slug}/content \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_log_content(id,slug,
    lines=lines)

print(api_response.json())

GET /plugin-instances/{id}/logs/{slug}/content

Get plugin instance log file contents

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
slug path any true Either the index of the log file in the configuration or the name of the log file. e.g. 0 or "name"
lines query integer false Number of log lines to return

Detailed descriptions

slug: Either the index of the log file in the configuration or the name of the log file. e.g. 0 or "name"

Example responses

200 Response

{
  "response": [
    "string"
  ]
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Failed to fetch logs for process_log.  Does the log file exist?\n"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SimpleStringListResponse

Name Type Required Constraints Description
  response [string] false - Array of string representation of resource

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin instance configs

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/configurations \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_config_files(id)

print(api_response.json())

GET /plugin-instances/{id}/configurations

Get plugin instance configuration file configs

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)

Example responses

200 Response

{
  "response": [
    {
      "name": "HA Variables",
      "path": "/opt/hacontainer/conf/vars.yml",
      "version": 2,
      "created_at": "2021-01-28 22:40:30 UTC",
      "previous_versions": [
        {
          "version": 1,
          "path": "/opt/plugin-manager/backups/vars.1.yml",
          "created_at": "2021-01-28 22:40:30 UTC"
        }
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigConfigFilesResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginManagerConfigConfigFile object false - -
    name string false - -
    path string false - -
    description string false - -
    version integer false - -
    created_at string(date-time) false - -
    previous_versions [object] false - -
     version integer false - -
     path string false - -
     created_at string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Revert plugin instance config file

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/configurations/{slug}/revert \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.revert_plugin_instance_config_file(id,slug,
    version=version)

print(api_response.json())

POST /plugin-instances/{id}/configurations/{slug}/revert

Revert plugin instance configuration file to a different version

Body parameter

{
  "version": 0
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
slug path any true Either the index of the config file in the manager configuration or the name of the confiig file. e.g. 0 or "name"
version body integer true Version to revert to

Detailed descriptions

slug: Either the index of the config file in the manager configuration or the name of the confiig file. e.g. 0 or "name"

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Version 4 does not exist."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Read plugin instance config file

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/configurations/{slug}/content \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_config_content(id,slug,
    version=version)

print(api_response.json())

GET /plugin-instances/{id}/configurations/{slug}/content

Get plugin instance config file contents

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
slug path any true Either the index of the config file in the configuration or the name of the config file. e.g. 0 or "name"
version query integer false Optional version to read content from

Detailed descriptions

slug: Either the index of the config file in the configuration or the name of the config file. e.g. 0 or "name"

Example responses

200 Response

{
  "response": "string"
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Configuration file at /var/log/app.log could not be found."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Configuration file version 4 does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

SimpleStringResponse

Name Type Required Constraints Description
  response string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update plugin instance config file

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/configurations/{slug}/content \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_update_plugin_instance_config_content(id,slug,
    content=content)

print(api_response.json())

PUT /plugin-instances/{id}/configurations/{slug}/content

Update plugin instance config file contents

Body parameter

{
  "content": "string"
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
slug path any true Either the index of the config file in the configuration or the name of the config file. e.g. 0 or "name"
content body string true New config file contents

Detailed descriptions

slug: Either the index of the config file in the configuration or the name of the config file. e.g. 0 or "name"

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Failed to write contents to file /opt/app/config.json: error output"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Clear plugin instance configuration file versions except for the current

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/configurations/{slug}/clear \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.clear_plugin_instance_conf_file_history(id,slug)

print(api_response.json())

POST /plugin-instances/{id}/configurations/{slug}/clear

Clear plugin instance configuration file history

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
slug path any true Either the index of the config file in the manager configuration or the name of the confiig file. e.g. 0 or "name"

Detailed descriptions

slug: Either the index of the config file in the manager configuration or the name of the confiig file. e.g. 0 or "name"

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete plugin instance config file version

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/configurations/{slug}/versions/{version} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_plugin_instance_config_version(id,slug,version)

print(api_response.json())

DELETE /plugin-instances/{id}/configurations/{slug}/versions/{version}

Delete plugin instance config file version

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
slug path any true Either the index of the config file in the configuration or the name of the config file. e.g. 0 or "name"
version path integer true Version to delete

Detailed descriptions

slug: Either the index of the config file in the configuration or the name of the config file. e.g. 0 or "name"

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Can't delete current version of configuration file"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Version does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin instance processes

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/processes \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_processes(id)

print(api_response.json())

GET /plugin-instances/{id}/processes

Get plugin instance process manager

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)

Example responses

200 Response

{
  "response": {
    "name": "supervisor",
    "subprocesses": [
      "hacontainer",
      "ui"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigProcessManagerResponse

Name Type Required Constraints Description
  response object false - -
   name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
   subprocesses [string] false - Name of programs, services or units managed

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Run plugin instance process action

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/processes/action \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.run_plugin_instance_process_action(id,
    process=process,
    action=action,
    timeout=timeout)

print(api_response.json())

POST /plugin-instances/{id}/processes/action

Take action on a managed process

Body parameter

{
  "process": "string",
  "action": "string",
  "timeout": 20
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
process body string true Name of the process. Should be listed in subprocesses list of config.
action body string true Action to take. See documentation for supported actions for your process manager.
timeout body integer false Number of seconds to wait before timing out.

Example responses

200 Response

{
  "response": {
    "output": "string",
    "timeout": true,
    "failed": true,
    "error": "string"
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Process manager abc unsupported."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerCommandResponse

Name Type Required Constraints Description
  response object false - -
   output string false - -
   timeout boolean false - -
   failed boolean false - -
   error string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Run plugin instance executable command

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/commands/execute \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.run_plugin_instance_executable_command(id,
    command=command,
    executable_path=executable_path,
    timeout=timeout)

print(api_response.json())

POST /plugin-instances/{id}/commands/execute

Run command for plugin instance executable

Body parameter

{
  "command": "string",
  "executable_path": "string",
  "timeout": 30
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
command body string true The command to run. (A key in the commands object)
executable_path body string false Path to the executable. This is required if more than 1 executable is defined in plugin configuration.
timeout body integer false Number of seconds to wait before timing out.

Example responses

200 Response

{
  "response": {
    "output": "string",
    "timeout": true,
    "failed": true,
    "error": "string"
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "No executables defined for plugin instance."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerCommandResponse

Name Type Required Constraints Description
  response object false - -
   output string false - -
   timeout boolean false - -
   failed boolean false - -
   error string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get plugin instance firewall

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/firewall \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_firewall(id)

print(api_response.json())

GET /plugin-instances/{id}/firewall

Get plugin instance firewall

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)

Example responses

200 Response

{
  "response": [
    {
      "rule": "PREROUTING_CUST -i eth0 -p tcp -s 0.0.0.0/0 --dport 10000 -j DNAT --to 198.51.100.2:3000",
      "tags": [
        "port map"
      ],
      "destination_port": 10000,
      "plugin_port": 3000
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginInstanceFirewallResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginInstanceFirewallRule object false - -
    rule string false - -
    tags [string] false - -
    plugin_port integer false - -
    destination_port integer false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create plugin instance firewall rule

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/firewall \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_plugin_instance_firewall_rule(id,
    preset=preset,
    host_port=host_port,
    container_port=container_port,
    protocol=protocol)

print(api_response.json())

PUT /plugin-instances/{id}/firewall

Create preset plugin instance firewall rule

Body parameter

{
  "preset": "string",
  "host_port": 0,
  "container_port": 0,
  "protocol": "string"
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance (container)
preset body string true One of ssh, internet or port_map
host_port body integer false VNS3 port. Required for preset "port_map"
container_port body integer false Plugin port to map VNS3 port to. Required for preset "port_map"
protocol body string false Protocol for port map. Required for preset "port_map"

Example responses

200 Response

{
  "response": [
    {
      "rule": "string",
      "tags": [
        "string"
      ],
      "plugin_port": 0,
      "destination_port": 0
    }
  ]
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "Invalid host port. Port can't be TCP ports 22, 8000, or UDP ports between 1070 and 1220."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Updated Inline
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginInstanceFirewallResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginInstanceFirewallRule object false - -
    rule string false - -
    tags [string] false - -
    plugin_port integer false - -
    destination_port integer false - -

Status Code 201

PluginInstanceFirewallResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginInstanceFirewallRule object false - -
    rule string false - -
    tags [string] false - -
    plugin_port integer false - -
    destination_port integer false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get list of plugin instance users

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/users \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instanceusers(id)

print(api_response.json())

GET /plugin-instances/{id}/users

Get plugin instance users

Parameters

Name In Type Required Description
id path integer true ID for plugin instance

Example responses

200 Response

{
  "response": [
    {
      "username": "string",
      "password": true,
      "public_key": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginInstanceUsersResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginInstanceUser object false - -
    username string false - -
    password boolean false - -
    public_key string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update or create a plugin instance user

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/users \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.put_plugin_instance_user(id,
    username=username,
    password=password,
    public_key=public_key,
    require_public_key=require_public_key)

print(api_response.json())

PUT /plugin-instances/{id}/users

Update or create plugin instance user

Body parameter

{
  "username": "string",
  "password": "string",
  "public_key": "string",
  "require_public_key": true
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance
username body string false -
password body string false password for ssh login
public_key body string false -
require_public_key body boolean false -

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

400 Response

{
  "error": {
    "name": "VPNCubed::API::APIBadRequestError",
    "log": "156347797058992573673734848595852371200179",
    "message": "No SSH server process running in plugin."
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "response": {
    "message": "Container support not available",
    "log": "123901290309083024802120939123901023091239",
    "name": "OperationNotAllowedError"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 403

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete plugin instance SSH user

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/users/{username} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_plugin_instance_user(id,username)

print(api_response.json())

DELETE /plugin-instances/{id}/users/{username}

Delete plugin instance user

Parameters

Name In Type Required Description
id path integer true ID for plugin instance
username path string true Name of user

Example responses

200 Response

{
  "response": {
    "log_files": [
      {
        "path": "string",
        "description": "string"
      }
    ],
    "configuration_files": [
      {
        "name": "string",
        "path": "string",
        "description": "string",
        "version": 0,
        "created_at": "2019-08-24T14:15:22Z",
        "previous_versions": [
          {
            "version": 0,
            "path": "string",
            "created_at": "string"
          }
        ]
      }
    ],
    "ports": [
      {
        "port": 0,
        "protocol": "string",
        "ui": true,
        "ssl": true,
        "ui_path": "string"
      }
    ],
    "process_manager": {
      "name": "string",
      "subprocesses": [
        "string"
      ]
    },
    "executables": [
      {
        "path": "string",
        "name": "string",
        "commands": {
          "property1": "string",
          "property2": "string"
        }
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested exported image is not ready for download"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginManagerConfigResponse

Name Type Required Constraints Description
  response object false - -
   log_files [object] false - -
    path string false - -
    description string false - -
   configuration_files [object] false - -
    PluginManagerConfigConfigFile object false - -
     name string false - -
     path string false - -
     description string false - -
     version integer false - -
     created_at string(date-time) false - -
     previous_versions [object] false - -
      version integer false - -
      path string false - -
      created_at string false - -
   ports [object] false - -
    PluginManagerConfigPort object false - -
     port integer false - -
     protocol string false - -
     ui boolean false - -
     ssl boolean false - -
     ui_path string false - -
   process_manager object false - -
    name string false - name of process manager such as supervisor. Currently we support commands for supervisor and service.
    subprocesses [string] false - Name of programs, services or units managed
   executables [object] false - -
    PluginManagerConfigExecutable object false - -
     path string false - -
     name string false - -
     commands object false - Map of "name" to the command for the underlying executable. For example, start -> execute would pass "execute" to the executable for the "start" command.
      additionalProperties string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get available plugin instance export files

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/exports \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_plugin_instance_exports(id)

print(api_response.json())

GET /plugin-instances/{id}/exports

Get plugin instance exports

Parameters

Name In Type Required Description
id path integer true ID for plugin instance

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "basename": "string",
      "size": 0,
      "mtime": "string",
      "status": "string",
      "token": "string",
      "url": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginExportsResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginExport object false - -
    name string false - -
    basename string false - -
    size integer false - Size of export (bytes)
    mtime string false - -
    status string false - -
    token string false - -
    url string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Create new plugin instance export file

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/exports \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.create_plugin_instance_export(id,
    name=name)

print(api_response.json())

POST /plugin-instances/{id}/exports

Create new plugin instance export

Body parameter

{
  "name": "string"
}

Parameters

Name In Type Required Description
id path integer true ID for plugin instance
name body string true -

Example responses

201 Response

{
  "response": {
    "name": "string",
    "basename": "string",
    "size": 0,
    "mtime": "string",
    "status": "string",
    "token": "string",
    "url": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Plugin instance not found"
  }
}

Responses

Status Meaning Description Schema
201 Created Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 201

PluginExportDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - -
   basename string false - -
   size integer false - Size of export (bytes)
   mtime string false - -
   status string false - -
   token string false - -
   url string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Download plugin instance export file

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/exports/{export_name} \
  -H 'Accept: application/octet-stream'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.get_download_plugin_instance_export(id,export_name)

print(api_response.file_download)   # path to downloaded file

GET /plugin-instances/{id}/exports/{export_name}

Download plugin instance export

Parameters

Name In Type Required Description
id path integer true ID for plugin instance
export_name path string true Name of export file

Example responses

200 Response

"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "export not found"
  }
}

Responses

Status Meaning Description Schema
200 OK OK string
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete plugin instance export file

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/plugin-instances/{id}/exports/{export_name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.network_edge_plugins.delete_plugin_instance_export(id,export_name)

print(api_response.json())

DELETE /plugin-instances/{id}/exports/{export_name}

Delete plugin instance export

Parameters

Name In Type Required Description
id path integer true ID for plugin instance
export_name path string true Name of export file

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "basename": "string",
      "size": 0,
      "mtime": "string",
      "status": "string",
      "token": "string",
      "url": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

403 Response

{
  "unlicensedExample": {
    "value": {
      "error": {
        "name": "PrerequisiteError",
        "log": "1563472268929826518356034508450851266833526",
        "message": "Must be licensed first."
      }
    }
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Export name does not exist for plugin instance."
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
403 Forbidden Request Forbidden - operation not allowed Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

PluginExportsResponse

Name Type Required Constraints Description
  response [object] false - -
   PluginExport object false - -
    name string false - -
    basename string false - -
    size integer false - Size of export (bytes)
    mtime string false - -
    status string false - -
    token string false - -
    url string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

BGP

Configure and control Border Gateway Protocol system and peering

Create BGP Peer

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/ebgp_peers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.bgp.create_bgp_peer(endpoint_id,
    ipaddress=ipaddress,
    asn=asn,
    local_asn_alias=local_asn_alias,
    access_list=access_list,
    bgp_password=bgp_password,
    add_network_distance=add_network_distance,
    add_network_distance_direction=add_network_distance_direction,
    add_network_distance_hops=add_network_distance_hops,
    hold_time=hold_time,
    keepalive_interval=keepalive_interval)

print(api_response.json())

POST /ipsec/endpoints/{endpoint_id}/ebgp_peers

Create new BGP peer connection for IPsec endpoint

Body parameter

{
  "ipaddress": "string",
  "asn": 0,
  "local_asn_alias": 0,
  "access_list": "string",
  "bgp_password": "string",
  "add_network_distance": true,
  "add_network_distance_direction": "string",
  "add_network_distance_hops": 0,
  "hold_time": 0,
  "keepalive_interval": 0
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
ipaddress body string true IP address of the desired BGP peer.
asn body integer true Autonomous system number assigned to device at ipaddress
local_asn_alias body integer false Autonomous system number alias
access_list body string false List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
bgp_password body string false String to be agreed upon by both peers as a simple password.
add_network_distance body boolean false Enable network distance for BGP peer
add_network_distance_direction body string false Add distance direction for BGP peer, in or out
add_network_distance_hops body integer false Distance metric weight indicating distance in hops for BGP peer
hold_time body integer false -
keepalive_interval body integer false Distance metric weight indicating distance in hops for BGP peer

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "105308145066358823906955697179258509823716",
    "message": "asn is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get eBGP peer

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/ebgp_peers/{bgp_peer_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.bgp.get_bgp_peer(endpoint_id,bgp_peer_id,
    verbose=verbose)

print(api_response.json())

GET /ipsec/endpoints/{endpoint_id}/ebgp_peers/{bgp_peer_id}

Get eBGP peer details

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
bgp_peer_id path integer true ID for BGP peer
verbose query boolean false True for verbose output

Example responses

200 Response

{
  "response": {
    "id": 2,
    "ipaddress": "55.55.55.55",
    "asn": 65123,
    "bgp_password": "asdfasdf",
    "access_list": "",
    "add_network_distance": true,
    "add_network_distance_direction": "out",
    "add_network_distance_hops": 0,
    "keepalive_interval": 10,
    "hold_time": 32
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

BGPPeerResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   asn integer false - -
   ipaddress string false - -
   access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
   local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
   keepalive_interval integer false - Interval for checking if BGP peers are still alive
   hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
   bgp_password string false - -
   add_network_distance boolean false - -
   add_network_distance_direction string false - in or out
   add_network_distance_hops integer false - -
   connection_detail string false - -

Update BGP Peer

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/ebgp_peers/{bgp_peer_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.bgp.update_bgp_peer(endpoint_id,bgp_peer_id,
    ipaddress=ipaddress,
    asn=asn,
    local_asn_alias=local_asn_alias,
    access_list=access_list,
    bgp_password=bgp_password,
    add_network_distance=add_network_distance,
    add_network_distance_direction=add_network_distance_direction,
    add_network_distance_hops=add_network_distance_hops,
    hold_time=hold_time,
    keepalive_interval=keepalive_interval)

print(api_response.json())

PUT /ipsec/endpoints/{endpoint_id}/ebgp_peers/{bgp_peer_id}

Edit IPsec endpoint BGP peer connection parameters

Body parameter

{
  "ipaddress": "string",
  "asn": 0,
  "local_asn_alias": 0,
  "access_list": "string",
  "bgp_password": "string",
  "add_network_distance": true,
  "add_network_distance_direction": "string",
  "add_network_distance_hops": 0,
  "hold_time": 0,
  "keepalive_interval": 0
}

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
bgp_peer_id path integer true ID for BGP peer
ipaddress body string true IP address of the desired BGP peer.
asn body integer true Autonomous system number assigned to device at ipaddress
local_asn_alias body integer false Autonomous system number alias
access_list body string false List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
bgp_password body string false String to be agreed upon by both peers as a simple password.
add_network_distance body boolean false Enable network distance for BGP peer
add_network_distance_direction body string false Add distance direction for BGP peer, in or out
add_network_distance_hops body integer false Distance metric weight indicating distance in hops for BGP peer
hold_time body integer false -
keepalive_interval body integer false Distance metric weight indicating distance in hops for BGP peer

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "105308145066358823906955697179258509823716",
    "message": "add_network_distance_hops is invalid"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete BGP Peer

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/ipsec/endpoints/{endpoint_id}/ebgp_peers/{bgp_peer_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.bgp.delete_bgp_peer(endpoint_id,bgp_peer_id)

print(api_response.json())

DELETE /ipsec/endpoints/{endpoint_id}/ebgp_peers/{bgp_peer_id}

Delete BGP Peer connection for IPsec endpoint

Parameters

Name In Type Required Description
endpoint_id path integer true ID for IPsec endpoint
bgp_peer_id path integer true ID for BGP peer

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "EndpointB",
    "ipaddress": "13.53.72.182",
    "pfs": true,
    "ike_version": 2,
    "nat_t_enabled": true,
    "private_ipaddress": "192.0.2.254",
    "extra_config": [],
    "description": "To datacenter B",
    "tunnels": {
      "3": {
        "id": 3,
        "local_subnet": "172.31.0.0/28",
        "remote_subnet": "192.168.10.0/22",
        "endpoint_id": 1,
        "enabled": true,
        "description": "tunnel description",
        "ping_ipaddress": "",
        "ping_interface": "tun0",
        "ping_interval": null
      }
    },
    "bgp_peers": {},
    "type": "ipsec",
    "vpn_type": "policy",
    "psk": "testtest"
  }
}

400 Response

{
  "error": {
    "name": "APIArgumentError",
    "log": "105308145066358823906955697179258509823716",
    "message": "bgp_peer does not exist"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
400 Bad Request Bad request indicating BGP peer does not exist Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

IpsecRemoteEndpointDetail

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   ipaddress string false - -
   description string false - -
   nat_t_enabled boolean false - -
   ike_version integer false - -
   pfs boolean false - Perfect forward secrecy enabled
   private_ipaddress string false - -
   extra_config [string] false - -
   tunnels object false - -
    IpsecTunnel object false - -
     id integer false - -
     local_subnet string false - -
     remote_subnet string false - -
     endpointid integer false - -
     endpoint_id integer false - -
     endpoint_name string false - -
     enabled boolean false - -
     active boolean false - -
     description string¦null false - -
     bounce boolean false - True if tunnel was just bounced
     connected boolean false - -
     ping_interface string false - -
     ping_interval integer¦null false - Interval for ping in seconds
     ping_ipaddress string false - -
     tunnel_params object false - -
      phase2 string false - -
      outbound_spi string false - -
      inbound_spi string false - -
      bytes_in string false - -
      bytes_out string false - -
      esp_time_remaining string false - -
      esp_port string false - -
      phase2_algo string false - -
      phase2_hash string false - -
      nat_t string false - -
      dpd string false - -
      pfs_dh_group string¦null false - -
      phase1 string false - -
      isakmp_port string false - -
      isakmp_time_remaining string false - -
      last_dpd string false - -
      phase1_cipher string¦null false - -
      phase1_prf string¦null false - -
      phase1_dh_group string¦null false - -
      ike_version string false - -
   traffic_pairs object false - -
    IpsecEndpointTrafficPair object false - -
     id integer false - -
     remote_subnet string false - -
     local_subnet string false - -
     ping_ipaddress string¦null false - -
     ping_interface string false - -
     ping_interval integer false - -
     enabled boolean false - -
     description string¦null false - -
     ipsec_endpoint_id integer false - -
     endpoint_id integer false - -
     created_at string(date-time) false - -
     updated_at string(date-time) false - -
   bgp_peers object false - -
    BGPPeer object false - -
     id integer false - -
     asn integer false - -
     ipaddress string false - -
     access_list string false - List of "in permit CIDR" and/or "out permit CIDR" statements in a string delimited by "\n"
     local_asn_alias integer false - Allow BGP configuration to use any ASN required by peer
     keepalive_interval integer false - Interval for checking if BGP peers are still alive
     hold_time integer false - The length of inactive time after which BGP session is torn down. The timer is reset after updates and keepalives
     bgp_password string false - -
     add_network_distance boolean false - -
     add_network_distance_direction string false - in or out
     add_network_distance_hops integer false - -
     connection_detail string false - -
   type string false - Indicating Ipsec or GRE over ipsec
   vpn_type string false - -
   gre_interface_address string false - -
   route_based_int_address string false - -
   route_based_local string false - -
   route_based_remote string false - -
   psk string false - -

Enumerated Values

Property Value
ping_interface eth0
ping_interface tun0

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Monitoring and Alerting

Setup and view alerts and monitors for feedback and analysis of your network

Get all webhooks

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/webhooks \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_webhooks()

print(api_response.json())

GET /webhooks

Retrieve all webhooks

Example responses

200 Response

{
  "response": [
    {
      "id": 1,
      "name": "string",
      "validate_cert": true,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "system": true,
      "url": "string",
      "body": "string",
      "custom_properties": [
        {
          "name": "string",
          "value": "string",
          "description": "string"
        }
      ],
      "headers": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "parameters": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "events": [
        "string"
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

WebhooksListResponse

Name Type Required Constraints Description
  response [object] false - -
   WebhookIntegration object false - -
    id integer false - -
    name string false - -
    validate_cert boolean false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    system boolean false - -
    url string¦null false - -
    body string¦null false - -
    custom_properties [object] false - -
     WebhookCustomProperty object false - -
      name string false - -
      value string false - -
      description string false - -
    headers [object] false - -
     WebhookHeader object false - -
      name string false - -
      value string false - -
    parameters [object] false - -
     WebhookParameter object false - -
      name string false - -
      value string false - -
    events [string] false - -

Create new webhook integration

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/webhook \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.post_create_webhook(
    name=name,
    url=url,
    events=events,
    body=body,
    validate_cert=validate_cert,
    custom_properties=custom_properties,
      name=  name,
      value=  value,
      description=  description,
    headers=headers,
      name=  name,
      value=  value,
    parameters=parameters,
      name=  name,
      value=  value)

print(api_response.json())

POST /webhook

Create new Webhook integration. Webhooks are endpoints for posting alerts.

Body parameter

{
  "name": "string",
  "url": "string",
  "events": [
    "tunnel_up",
    "tunnel_down"
  ],
  "body": "string",
  "validate_cert": true,
  "custom_properties": [
    {
      "name": "string",
      "value": "string",
      "description": "string"
    }
  ],
  "headers": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "parameters": [
    {
      "name": "string",
      "value": "string"
    }
  ]
}

Parameters

Name In Type Required Description
name body string true -
url body string false -
events body [string] false -
body body string false Serialized HTTP Post request body
validate_cert body boolean false -
custom_properties body [object] false -
  name body string true -
  value body string false -
  description body string false -
headers body [object] false -
  name body string true -
  value body string true -
parameters body [object] false -
  name body string true -
  value body string true -

Example responses

201 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "validate_cert": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "system": true,
    "url": "string",
    "body": "string",
    "custom_properties": [
      {
        "name": "string",
        "value": "string",
        "description": "string"
      }
    ],
    "headers": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "parameters": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "events": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 201

WebhookDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   validate_cert boolean false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   system boolean false - -
   url string¦null false - -
   body string¦null false - -
   custom_properties [object] false - -
    WebhookCustomProperty object false - -
     name string false - -
     value string false - -
     description string false - -
   headers [object] false - -
    WebhookHeader object false - -
     name string false - -
     value string false - -
   parameters [object] false - -
    WebhookParameter object false - -
     name string false - -
     value string false - -
   events [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get webhook details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/webhook/{webhook_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_webhook(webhook_id)

print(api_response.json())

GET /webhook/{webhook_id}

Retrieve details for single webhook integration

Parameters

Name In Type Required Description
webhook_id path integer true ID for webhook integration

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "validate_cert": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "system": true,
    "url": "string",
    "body": "string",
    "custom_properties": [
      {
        "name": "string",
        "value": "string",
        "description": "string"
      }
    ],
    "headers": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "parameters": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "events": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested webhook does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

WebhookDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   validate_cert boolean false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   system boolean false - -
   url string¦null false - -
   body string¦null false - -
   custom_properties [object] false - -
    WebhookCustomProperty object false - -
     name string false - -
     value string false - -
     description string false - -
   headers [object] false - -
    WebhookHeader object false - -
     name string false - -
     value string false - -
   parameters [object] false - -
    WebhookParameter object false - -
     name string false - -
     value string false - -
   events [string] false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Update webhook configuration

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/webhook/{webhook_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.put_update_webhook(webhook_id,
    name=name,
    url=url,
    events=events,
    body=body,
    validate_cert=validate_cert,
    custom_properties=custom_properties,
      name=  name,
      value=  value,
      description=  description,
    headers=headers,
      name=  name,
      value=  value,
    parameters=parameters,
      name=  name,
      value=  value)

print(api_response.json())

PUT /webhook/{webhook_id}

Edit defined webhook integration

Body parameter

{
  "name": "string",
  "url": "string",
  "events": [
    "tunnel_up",
    "tunnel_down"
  ],
  "body": "string",
  "validate_cert": true,
  "custom_properties": [
    {
      "name": "string",
      "value": "string",
      "description": "string"
    }
  ],
  "headers": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "parameters": [
    {
      "name": "string",
      "value": "string"
    }
  ]
}

Parameters

Name In Type Required Description
webhook_id path integer true ID for webhook integration
name body string false -
url body string false -
events body [string] false -
body body string false Serialized HTTP Post request body
validate_cert body boolean false -
custom_properties body [object] false -
  name body string true -
  value body string false -
  description body string false -
headers body [object] false -
  name body string true -
  value body string true -
parameters body [object] false -
  name body string true -
  value body string true -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "validate_cert": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "system": true,
    "url": "string",
    "body": "string",
    "custom_properties": [
      {
        "name": "string",
        "value": "string",
        "description": "string"
      }
    ],
    "headers": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "parameters": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "events": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested webhook does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

WebhookDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   validate_cert boolean false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   system boolean false - -
   url string¦null false - -
   body string¦null false - -
   custom_properties [object] false - -
    WebhookCustomProperty object false - -
     name string false - -
     value string false - -
     description string false - -
   headers [object] false - -
    WebhookHeader object false - -
     name string false - -
     value string false - -
   parameters [object] false - -
    WebhookParameter object false - -
     name string false - -
     value string false - -
   events [string] false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete webhook

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/webhook/{webhook_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.delete_webhook(webhook_id)

print(api_response.json())

DELETE /webhook/{webhook_id}

Delete defined webhook integration.

Parameters

Name In Type Required Description
webhook_id path integer true ID for webhook integration

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "validate_cert": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "system": true,
    "url": "string",
    "body": "string",
    "custom_properties": [
      {
        "name": "string",
        "value": "string",
        "description": "string"
      }
    ],
    "headers": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "parameters": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "events": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested webhook does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

WebhookDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   validate_cert boolean false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   system boolean false - -
   url string¦null false - -
   body string¦null false - -
   custom_properties [object] false - -
    WebhookCustomProperty object false - -
     name string false - -
     value string false - -
     description string false - -
   headers [object] false - -
    WebhookHeader object false - -
     name string false - -
     value string false - -
   parameters [object] false - -
    WebhookParameter object false - -
     name string false - -
     value string false - -
   events [string] false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get all alerts

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/alerts \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_alerts()

print(api_response.json())

GET /alerts

Retrieve all alerts

Example responses

200 Response

{
  "response": [
    {
      "id": 1,
      "name": "string",
      "url": "string",
      "enabled": true,
      "webhook_id": 1,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "events": [
        "string"
      ],
      "custom_properties": [
        {
          "name": "string",
          "value": "string"
        }
      ]
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

AlertsListResponse

Name Type Required Constraints Description
  response [object] false - -
   Alert object false - -
    id integer false - -
    name string false - -
    url string¦null false - -
    enabled boolean false - -
    webhook_id integer false - -
    created_at string(date-time) false - -
    updated_at string(date-time) false - -
    events [string] false - -
    custom_properties [object] false - -
     name string false - -
     value string false - -

Get all alert events

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/alert_events \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_alert_events()

print(api_response.json())

GET /alert_events

Retrieve all possible alert events

Example responses

200 Response

{
  "response": [
    "tunnel_up",
    "tunnel_down",
    "process_change",
    "user_password_change",
    "controller_reboot",
    "controller_reset_defaults",
    "system_general",
    "clientpack_up",
    "clientpack_down",
    "bgp_session_up",
    "bgp_session_down"
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

AlertEventTypesListResponse

Name Type Required Constraints Description
  response [string] false - -

Define new alert

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/alert \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.post_create_alert(
    name=name,
    url=url,
    webhook_id=webhook_id,
    events=events,
    webhook_name=webhook_name,
    custom_properties=custom_properties,
      name=  name,
      value=  value,
    enabled=enabled)

print(api_response.json())

POST /alert

Define new alert. Events will trigger this alert and an alert will be pushed to webhook endpoint.

Body parameter

{
  "name": "string",
  "url": "string",
  "webhook_id": 0,
  "events": [
    "string"
  ],
  "webhook_name": "string",
  "custom_properties": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "enabled": true
}

Parameters

Name In Type Required Description
name body string true -
url body string true -
webhook_id body integer true -
events body [string] false -
webhook_name body string false -
custom_properties body [object] false -
  name body string true -
  value body string false -
enabled body boolean false -

Example responses

201 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "url": "string",
    "enabled": true,
    "webhook_id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "events": [
      "string"
    ],
    "custom_properties": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
201 Created Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 201

AlertDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   url string¦null false - -
   enabled boolean false - -
   webhook_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   events [string] false - -
   custom_properties [object] false - -
    name string false - -
    value string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get alert definition details

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/alert/{alert_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_alert(alert_id)

print(api_response.json())

GET /alert/{alert_id}

Retrieve details for single alert

Parameters

Name In Type Required Description
alert_id path integer true ID for Alert definition

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "url": "string",
    "enabled": true,
    "webhook_id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "events": [
      "string"
    ],
    "custom_properties": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested alert does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AlertDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   url string¦null false - -
   enabled boolean false - -
   webhook_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   events [string] false - -
   custom_properties [object] false - -
    name string false - -
    value string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Edit alert definition

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/alert/{alert_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.put_update_alert(alert_id,
    name=name,
    url=url,
    webhook_id=webhook_id,
    events=events,
    custom_properties=custom_properties,
      name=  name,
      value=  value,
    enabled=enabled)

print(api_response.json())

PUT /alert/{alert_id}

Edit defined alert

Body parameter

{
  "name": "string",
  "url": "string",
  "webhook_id": 0,
  "events": [
    "string"
  ],
  "custom_properties": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "enabled": true
}

Parameters

Name In Type Required Description
alert_id path integer true ID for Alert definition
name body string false -
url body string false -
webhook_id body integer false -
events body [string] false -
custom_properties body [object] false -
  name body string true -
  value body string true -
enabled body boolean false -

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "url": "string",
    "enabled": true,
    "webhook_id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "events": [
      "string"
    ],
    "custom_properties": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested alert does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AlertDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   url string¦null false - -
   enabled boolean false - -
   webhook_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   events [string] false - -
   custom_properties [object] false - -
    name string false - -
    value string false - -

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Delete alert

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/alert/{alert_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.delete_alert(alert_id)

print(api_response.json())

DELETE /alert/{alert_id}

Delete defined alert

Parameters

Name In Type Required Description
alert_id path integer true ID for Alert definition

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "url": "string",
    "enabled": true,
    "webhook_id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "events": [
      "string"
    ],
    "custom_properties": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested alert does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AlertDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   url string¦null false - -
   enabled boolean false - -
   webhook_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   events [string] false - -
   custom_properties [object] false - -
    name string false - -
    value string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Enable alert

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/alert/{alert_id}/toggle_enabled \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.post_toggle_enable_alert(alert_id)

print(api_response.json())

POST /alert/{alert_id}/toggle_enabled

Enable this alert. Associated events will trigger alerts sent to configured webhook.

Parameters

Name In Type Required Description
alert_id path integer true ID for Alert definition

Example responses

200 Response

{
  "response": {
    "id": 1,
    "name": "string",
    "url": "string",
    "enabled": true,
    "webhook_id": 1,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "events": [
      "string"
    ],
    "custom_properties": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested alert does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

AlertDetailResponse

Name Type Required Constraints Description
  response object false - -
   id integer false - -
   name string false - -
   url string¦null false - -
   enabled boolean false - -
   webhook_id integer false - -
   created_at string(date-time) false - -
   updated_at string(date-time) false - -
   events [string] false - -
   custom_properties [object] false - -
    name string false - -
    value string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Send test alert

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/alert/{alert_id}/test \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.post_test_alert(alert_id)

print(api_response.json())

POST /alert/{alert_id}/test

Send test alert for this defined alert to configured webhook endpoint

Parameters

Name In Type Required Description
alert_id path integer true ID for Alert definition

Example responses

200 Response

{
  "response": {
    "status": "string",
    "code": "string",
    "message": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "Requested alert does not exist"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

Name Type Required Constraints Description
  response object false - -
   status string false - success or failed
   code string false - status code
   message string false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get all packet monitors

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/packet_monitors \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_packet_monitors()

print(api_response.json())

GET /packet_monitors

[Beta] Retrieve all packet monitors

Example responses

200 Response

{
  "response": [
    {
      "name": "string",
      "type": "string",
      "interface": "string",
      "filter": "string",
      "duration": "string",
      "destination": "string"
    }
  ]
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

PacketMonitorsListResponse

Name Type Required Constraints Description
  response [object] false - -
   PacketMonitor object false - -
    name string false - Name of packet monitor. Must be conntrack for type=conntrack as only one conntrack monitor can run at a time
    type string false - conntrack, netflow or pcap
    interface string false - -
    filter string false - filter strings are particular to the type of packet monitor. For instance, "-p 8000" for pcap
    duration string false - Indicates length of time to run capture for. Can be forever or some string parsable by the Linux date command
    destination string false - must be file if pcap or conntrack. Otherwise a host should be specified with the prefix "host". E.g. "host:10.0.3.2:4000"

Create packet monitor

Code samples

# You can also use wget
curl -X POST -u api:myapipassword https://vns3-host:8000/api/packet_monitor \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.create_packet_monitor(
    name=name,
    type=type,
    interface=interface,
    filter=filter,
    duration=duration,
    destination=destination)

print(api_response.json())

POST /packet_monitor

[Beta] Define new packet monitor. Three types of packet monitors are supported: conntrack for connection tracking, netflow for Netflow formatted data, and pcap for local packet capture

Body parameter

{
  "name": "string",
  "type": "string",
  "interface": "string",
  "filter": "string",
  "duration": "string",
  "destination": "string"
}

Parameters

Name In Type Required Description
name body string true Name of packet monitor. Must be conntrack for type=conntrack as only one conntrack monitor can run at a time
type body string true conntrack, netflow or pcap
interface body string true -
filter body string¦null true filter strings are particular to the type of packet monitor. For instance, "-p 8000" for pcap. Can be empty string.
duration body string true Indicates length of time to run capture for. Can be forever or some string parsable by the Linux date command
destination body string true must be file if pcap or conntrack. Otherwise a host should be specified with the prefix "host". E.g. "host:10.0.3.2:4000"

Example responses

200 Response

{
  "response": {
    "name": "string",
    "type": "string",
    "interface": "string",
    "filter": "string",
    "duration": "string",
    "destination": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Created Inline
400 Bad Request Bad request Inline
401 Unauthorized Authentication information missing or invalid Inline

Response Schema

Status Code 200

PacketMonitorDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - Name of packet monitor. Must be conntrack for type=conntrack as only one conntrack monitor can run at a time
   type string false - conntrack, netflow or pcap
   interface string false - -
   filter string false - filter strings are particular to the type of packet monitor. For instance, "-p 8000" for pcap
   duration string false - Indicates length of time to run capture for. Can be forever or some string parsable by the Linux date command
   destination string false - must be file if pcap or conntrack. Otherwise a host should be specified with the prefix "host". E.g. "host:10.0.3.2:4000"

Status Code 400

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Get packet monitor

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/packet_monitor/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.get_packet_monitor(name)

print(api_response.json())

GET /packet_monitor/{name}

[Beta] Retrieve details for single Packet Monitor

Parameters

Name In Type Required Description
name path string true Unique name for packet monitor

Example responses

200 Response

{
  "response": {
    "name": "string",
    "type": "string",
    "interface": "string",
    "filter": "string",
    "duration": "string",
    "destination": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found -

Response Schema

Status Code 200

PacketMonitorDetailResponse

Name Type Required Constraints Description
  response object false - -
   name string false - Name of packet monitor. Must be conntrack for type=conntrack as only one conntrack monitor can run at a time
   type string false - conntrack, netflow or pcap
   interface string false - -
   filter string false - filter strings are particular to the type of packet monitor. For instance, "-p 8000" for pcap
   duration string false - Indicates length of time to run capture for. Can be forever or some string parsable by the Linux date command
   destination string false - must be file if pcap or conntrack. Otherwise a host should be specified with the prefix "host". E.g. "host:10.0.3.2:4000"

Delete packet monitor

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/packet_monitor/{name} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.delete_packet_monitor(name)

print(api_response.json())

DELETE /packet_monitor/{name}

[Beta] Delete packet monitor

Parameters

Name In Type Required Description
name path string true Unique name for packet monitor

Example responses

200 Response

{
  "response": {
    "success": true,
    "output": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found -

Response Schema

Status Code 200

SimpleOutputResponse

Name Type Required Constraints Description
  response object false - -
   success boolean false - -
   output string false - -

Start packet monitor

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/packet_monitor/{name}/start \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.put_start_packet_monitor(name)

print(api_response.json())

PUT /packet_monitor/{name}/start

[Beta] Start packet monitor

Parameters

Name In Type Required Description
name path string true Unique name for packet monitor

Example responses

200 Response

{
  "response": {
    "success": true,
    "output": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found -

Response Schema

Status Code 200

SimpleOutputResponse

Name Type Required Constraints Description
  response object false - -
   success boolean false - -
   output string false - -

Stop packet monitor

Code samples

# You can also use wget
curl -X PUT -u api:myapipassword https://vns3-host:8000/api/packet_monitor/{name}/stop \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.put_stop_packet_monitor(name)

print(api_response.json())

PUT /packet_monitor/{name}/stop

[Beta] Stop packet monitor

Parameters

Name In Type Required Description
name path string true Unique name for packet monitor

Example responses

200 Response

{
  "response": {
    "success": true,
    "output": "string"
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found -

Response Schema

Status Code 200

SimpleOutputResponse

Name Type Required Constraints Description
  response object false - -
   success boolean false - -
   output string false - -

Download packet data

Code samples

# You can also use wget
curl -X GET -u api:myapipassword https://vns3-host:8000/api/packet_monitor/{name}/download \
  -H 'Accept: text/plain'

from cohesivenet import VNS3Client

api_response = vns3_client.monitoring.download_packet_monitor_data(name)

print(api_response.file_download)   # path to downloaded file

GET /packet_monitor/{name}/download

[Beta] Returns packet monitoring data archive.

Parameters

Name In Type Required Description
name path string true Unique name for packet monitor

Example responses

200 Response

"string"

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

Responses

Status Meaning Description Schema
200 OK Packet data string
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found -

Response Schema

Interface

Delete GRE interface

Code samples

# You can also use wget
curl -X DELETE -u api:myapipassword https://vns3-host:8000/api/interfaces/edge_gre/{interface_id} \
  -H 'Accept: application/json'

from cohesivenet import VNS3Client

api_response = vns3_client.interfaces.delete_gre_interface(interface_id)

print(api_response.json())

DELETE /interfaces/edge_gre/{interface_id}

Delete GRE Interface

Parameters

Name In Type Required Description
interface_id path string true ID for system interface

Example responses

200 Response

{
  "response": {
    "endpoint_name": "string",
    "description": "string",
    "ip_internal": "string",
    "mtu": 0,
    "enabled": false,
    "mask_bits": "string",
    "gateway": "string",
    "system_default": false,
    "local_connection_ip": "string",
    "remote_connection_ip": "string",
    "ttl": 255,
    "id": 1,
    "interface_id": 1,
    "ip_external": "string",
    "name": "string",
    "interface_type": "string",
    "status": "string",
    "tags": [
      "string"
    ]
  }
}

Authentication information missing or invalid

{
  "error": {
    "name": "UnauthorizedError",
    "log": "1563472268929826518356034508450851266833526",
    "message": "Invalid or expired token"
  }
}

404 Response

{
  "error": {
    "name": "APINotFoundError",
    "log": "15640808375976073208002188741879242245537",
    "message": "GRE Endpoint not found"
  }
}

Responses

Status Meaning Description Schema
200 OK Accepted Inline
401 Unauthorized Authentication information missing or invalid Inline
404 Not Found Not found Inline

Response Schema

Status Code 200

GREEndpointDetail

Name Type Required Constraints Description
  response any false - -

allOf

Name Type Required Constraints Description
   any object false - -
    endpoint_name string false - -
    description string¦null false - -
    ip_internal string¦null false - -
    mtu integer false - -
    enabled boolean false - -
    mask_bits string¦null false - -
    gateway string¦null false - -
    system_default boolean false - -
    local_connection_ip string¦null false - -
    remote_connection_ip string¦null false - -
    ttl integer false - -

and

Name Type Required Constraints Description
   any object false - -
    id integer false - -
    interface_id integer false - -
    ip_external string¦null false - -
    name string false - -
    interface_type string false - system or system_virtual
    status string false - Availability of interface, Up or Down
    tags [string] false - -

Status Code 404

Error

Name Type Required Constraints Description
  error object false - -
   name string false - -
   log string false - -
   message string false - -

Errors

Cohesive Networks APIs use the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API token or basic credentials are invalid.
403 Forbidden -- API endpoint requires elevated permissions for access. OR pre-condition that elevates permissions has not been met such as VNS3 not being licensed yet.
404 Not Found -- Endpoint or resource does not exist
405 Method Not Allowed -- HTTP Method is not supported for endpoint
406 Not Acceptable -- You requested a format unsupported by this endpoint
500 Internal Server Error -- We had a problem with our server. Try again later. Contact us @ support@cohesive.net.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.