Change Subnet
PUThttps://core-pl.ocplanet.cloud/backend/api/openstack/subnets/:subnet_id
Host: https://core.ocplanet.cloud
Change a specific subnet associated with the user's VPS identified by ID.
Request
- application/json
Body
allocation_pools object[]required
cidr stringrequired
id uuid
dns_nameservers objects[]
host_routes array
network_mask integer
ipv6_ra_mode nullstring
ipv6_address_mode nullstring
enable_dhcp booleanrequired
gateway_ip stringrequired
ip_version integerrequired
name stringrequired
network_address_source stringrequired
network_id stringrequired
setGatewayIp stringrequired
Responses
- 200
- application/json
- Schema
- Example (from schema)
- Example
Schema
id uuidrequired
allocation_pools arrayrequired
cidr stringrequired
dns_nameservers arrayrequired
host_routes arrayrequired
gateway_ip nullrequired
name stringrequired
description nullrequired
subnetpool_id nullrequired
ip_version integerrequired
enable_dhcp booleanrequired
created_at nullrequired
updated_at nullrequired
project uuidrequired
sync_version integerrequired
extra stringrequired
network stringrequired
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"allocation_pools": [
null
],
"cidr": "string",
"dns_nameservers": [
null
],
"host_routes": [
null
],
"name": "string",
"ip_version": 0,
"enable_dhcp": true,
"project": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sync_version": 0,
"extra": "string",
"network": "string"
}
{
"id": "9a9da325-4314-4b67-8996-250b6c9fadba",
"dns_nameservers": [],
"host_routes": [],
"gateway_ip": "10.0.1.1",
"allocation_pools": [
{
"start": "10.0.1.2",
"end": "10.0.1.254"
}
],
"name": "subnet99981",
"description": "",
"subnetpool_id": null,
"ip_version": 4,
"cidr": "10.0.1.0/24",
"enable_dhcp": true,
"created_at": "2024-03-18T14:31:43Z",
"updated_at": "2024-03-18T14:31:43Z",
"sync_version": 1710772303703,
"extra": "{'ipv6_address_mode': None, 'ipv6_ra_mode': None, 'host_routes': [], 'dns_nameservers': []}",
"network": "fdd1339c-423e-481e-bc9f-1b9d2a60edce",
"project": "41e4ce1e550a4b4c922db7c287cf5a53"
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: Use 'OpenAPIToken {token}' as the value
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://core-pl.ocplanet.cloud/backend/api/openstack/subnets/:subnet_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
--data-raw '{
"allocation_pools": [
{
"end": "string",
"start": "string"
}
],
"cidr": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dns_nameservers": [
null
],
"host_routes": [
null
],
"network_mask": 0,
"enable_dhcp": true,
"gateway_ip": "string",
"ip_version": 0,
"name": "string",
"network_address_source": "string",
"network_id": "string",
"setGatewayIp": "string"
}'
ResponseClear