POST
/api/v1/vpc/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/vpc/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "ipv4": "10.10.0.0/23", "is_e2e_vpc": false, "vpc_name": "VPC-241"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/vpc/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "ipv4": "10.10.0.0/23", "is_e2e_vpc": False, "vpc_name": "VPC-241", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/vpc/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "ipv4": "10.10.0.0/23", "is_e2e_vpc": false, "vpc_name": "VPC-241" }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
ipv4
Required if is_e2e_vpc is false. Do not provide this field if is_e2e_vpc is true, because the CIDR will be assigned automatically by E2E.
string
Example
10.10.0.0/23is_e2e_vpc
boolean
Example
falsevpc_name
string
Example
VPC-241Responses
Section titled “Responses”Created Successfully
Media typeapplication/json
object
code
integer
data
object
vpc_id
integer
vpc_name
string
network_id
integer
is_credit_sufficient
boolean
resource_type
string
label_id
string
project_id
string
errors
object
key
additional properties
string
message
string
Example
{ "code": 201, "data": { "vpc_id": 3956, "vpc_name": "VPC-765", "network_id": 27835, "is_credit_sufficient": true, "resource_type": null, "label_id": null, "project_id": "17925" }, "errors": {}, "message": "Created Successfully"}