POST
/api/v1/vpc/{VPC_NETWORK_ID}/subnet/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/vpc/{VPC_NETWORK_ID}/subnet/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "ipv4": "10.10.0.16/28", "name": "Subnet-597"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/vpc/{VPC_NETWORK_ID}/subnet/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "ipv4": "10.10.0.16/28", "name": "Subnet-597", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/vpc/{VPC_NETWORK_ID}/subnet/");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.16/28", "name": "Subnet-597" }),});console.log(await response.json());Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”VPC_NETWORK_ID
required
integer
VPC Network ID
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
Provide IPv4 Subnet CIDR Block
string
Example
10.10.0.16/28name
string
Example
Subnet-597Responses
Section titled “Responses”Created Successfully
Media typeapplication/json
object
code
integer
data
object
id
integer
name
string
network_id
integer
is_credit_sufficient
boolean
project_id
string
errors
object
key
additional properties
string
message
string
Example
{ "code": 201, "data": { "id": 30, "name": "Subnet-597", "network_id": 38187, "is_credit_sufficient": true, "project_id": "41534" }, "errors": {}, "message": "Created Successfully"}