Networking¶
Networks, address ranges, routing, Internet gateways and the network topology.
Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.
Request and response examples are generated from the schema; the tables under Schemas are the reference.
Get the network map summary¶
GET /
Every project the caller can see, with the number of networks, routers and connected resources in each location.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
cursor |
query | string | Yes | ||
limit |
query | integer | 20 | No | |
org_id |
path | string | No |
Responses
{
"complete": true,
"next_cursor": "string",
"project_count": 0,
"projects": [
{
"complete": true,
"label": "string",
"lifecycle_state": "string",
"locations": [
{
"complete": true,
"counts": [
{
"count": 0,
"kind": "network",
"observed": 0
}
],
"label": "string",
"location_id": "string",
"placement_id": "string",
"regions": [
"string"
],
"sources": [
{
"data_as_of": "string",
"group": "string",
"id": "string",
"last_success_at": "string",
"location": "string",
"reason": "string",
"region": "string",
"service": "string",
"status": "string"
}
]
}
],
"project_id": "string"
}
],
"schema_version": 0,
"scope": "organization",
"truncated": true,
"view_revision": "string"
}
Get a project's network map¶
GET /
The project's networks, routers, instances and other connected resources in its locations, and how they connect.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
cursor |
query | string | Yes | ||
focus |
query | string | Yes | ||
layers |
query | string | structure | No | |
limit |
query | integer | 100 | No | |
location |
query | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Responses
{
"complete": true,
"edges": [
{
"evidence": "string",
"id": "string",
"kind": "string",
"label": "string",
"observed_at": "string",
"source": "string",
"state": "observed",
"target": "string"
}
],
"focus": "string",
"groups": [
{
"id": "string",
"label": "string",
"location_id": "string",
"placement_id": "string",
"project_id": "string",
"region": "string"
}
],
"layers": [
"string"
],
"location": "string",
"next_cursor": "string",
"nodes": [
{
"details": {},
"group": "string",
"href": "string",
"id": "string",
"incomplete": true,
"kind": "string",
"label": "string",
"observed_at": "string",
"operation_href": "string",
"origin": "string",
"parent": "string",
"source": "string",
"state": "observed",
"status": "string"
}
],
"notices": [
"string"
],
"observed_resource_count": 0,
"omitted_adjacency": 0,
"project_id": "string",
"resource_count": 0,
"schema_version": 0,
"sources": [
{
"data_as_of": "string",
"group": "string",
"id": "string",
"last_success_at": "string",
"location": "string",
"reason": "string",
"region": "string",
"service": "string",
"status": "string"
}
],
"truncated": true,
"unresolved_count": 0,
"view_revision": "string"
}
Create a network¶
POST /
Creates a private network with one address range in one location, attached to the project's private routing unless asked otherwise. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
{
"display_name": "string",
"execute_before": "2022-04-13T15:42:05.901Z",
"internet_access": true,
"location": "string",
"routed": true,
"subnet": {
"allocation_pools": [
{
"end": "string",
"start": "string"
}
],
"cidr": "string",
"dns_nameservers": [
"string"
],
"enable_dhcp": true,
"gateway_ip": "string",
"no_gateway": true
},
"tags": {}
}
Responses
Connect two networks¶
POST /
No longer offered: networks attached to the project's private routing already reach each other. Always refused with connections_retired.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
network_id |
path | string | No | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Disconnect two networks¶
DELETE /
Removes an existing connection between two networks made before private routing. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
network_id |
path | string | No | ||
org_id |
path | string | No | ||
peer_id |
path | string | No | ||
project_id |
path | string | No |
Responses
Add an address range¶
POST /
Adds an address range to a network. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
network_id |
path | string | No | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Turn a network's Internet access on or off¶
POST /
Attaches the network to the location's Internet gateway, or detaches it; private routing is unchanged. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
network_id |
path | string | No | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Attach or detach private routing¶
POST /
Attaches the network to the project's private router in its location, so it reaches the project's other routed networks, or detaches it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
network_id |
path | string | No | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Delete a network¶
DELETE /
Deletes the network with its range and routing attachment; other networks and private routing stay. Refused while anything still has an address on it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Responses
Rename a network¶
PATCH /
Changes the network's name or description. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Request body
Set a network's tags¶
PUT /
Replaces the network's tags with the whole set given and writes them to it in its location with the nx. prefix, keeping every tag set there without the prefix. Send the tags_version you read in If-Match: a set changed since is 412. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
if-match |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Request body
Remove the Internet gateway¶
DELETE /
Removes the location's outbound Internet connection; private routing, routes, networks and instances stay. Refused while a public IP in the location is attached. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
placement_id |
path | string | No | ||
project_id |
path | string | No |
Responses
Add an Internet gateway¶
POST /
Gives the project's private routing in one location an outbound Internet connection (NAT). Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
placement_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Create a ready network¶
POST /
Creates a network with one address range in one location, attached to the project's private routing, in one request. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
placement_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Create a router¶
POST /
Creates a router in one location. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Delete a router¶
DELETE /
Deletes a router. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
remove_interfaces |
query | boolean | False | No | |
resource_id |
path | string | No |
Responses
Rename a router¶
PATCH /
Changes the router's name or description. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Request body
Attach a range to a router¶
POST /
Connects an address range to the router. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
router_id |
path | string | No |
Request body
Detach a range from a router¶
POST /
Disconnects an address range from the router. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
router_id |
path | string | No |
Request body
Set a router's public gateway¶
POST /
Connects the router to the location's public network, or disconnects it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
router_id |
path | string | No |
Request body
Set a router's routes¶
POST /
Replaces the router's whole list of static routes; an empty list clears it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
router_id |
path | string | No |
Request body
Delete an address range¶
DELETE /
Deletes an address range that nothing uses. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Responses
Change an address range¶
PATCH /
Changes the range's name, gateway, DNS servers or address handout; the range itself cannot change. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Request body
{
"allocation_pools": [
{
"end": "string",
"start": "string"
}
],
"display_name": "string",
"dns_nameservers": [
"string"
],
"enable_dhcp": true,
"execute_before": "2022-04-13T15:42:05.901Z",
"gateway_ip": "string",
"host_routes": [
{
"destination": "string",
"nexthop": "string"
}
],
"no_gateway": true
}
Responses
Schemas¶
Accepted¶
| Name | Type | Description |
|---|---|---|
operation |
OperationLink |
ActionBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null |
BootstrapBody¶
| Name | Type | Description |
|---|---|---|
cidr |
string | |
dns_nameservers |
Array<string> | |
execute_before |
string(date-time) | null |
ConnectBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
peer_network_id |
string |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
InternetAccessBody¶
| Name | Type | Description |
|---|---|---|
enabled |
boolean | |
execute_before |
string(date-time) | null |
LocationSummary¶
| Name | Type | Description |
|---|---|---|
complete |
boolean | |
counts |
Array<TopologyCount> | |
label |
string | |
location_id |
string | |
placement_id |
string | |
regions |
Array<string> | |
sources |
Array<TopologySource> |
NetworkCreateBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null | |
internet_access |
boolean | null | |
location |
string | |
routed |
boolean | null | |
subnet |
SubnetBody | |
tags |
Labels key: value NubeStack Cloud keeps and writes to the resource in its location as `nx. (a volume's metadata key nx.), keeping its other tags. At most 20; a key is 1-32 of a-z, 0-9, _, ., -, starting with a letter; a value is 0-24 of A-Z, a-z, 0-9, _, ., :, -`. An organization uses at most 50 keys. |
OperationLink¶
| Name | Type | Description |
|---|---|---|
href |
string | Where to read the operation; also the Location header. |
id |
string | The operation's ID (op_…). |
state |
string | null | Its state when accepted, normally queued. |
PoolBody¶
| Name | Type | Description |
|---|---|---|
end |
string | |
start |
string |
ProjectSummary¶
| Name | Type | Description |
|---|---|---|
complete |
boolean | |
label |
string | |
lifecycle_state |
string | |
locations |
Array<LocationSummary> | |
project_id |
string |
RouteBody¶
| Name | Type | Description |
|---|---|---|
destination |
string | |
nexthop |
string |
RouterCreateBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null | |
location |
string | |
public_gateway |
boolean | |
subnet_ids |
Array<string> |
RouterGatewayBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
public |
boolean |
RouterInterfaceBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
subnet_id |
string |
RouterRoutesBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
routes |
Array<RouteBody> |
SubnetBody¶
| Name | Type | Description |
|---|---|---|
allocation_pools |
Array<PoolBody> | |
cidr |
string | |
dns_nameservers |
Array<string> | |
enable_dhcp |
boolean | |
gateway_ip |
string | null | |
no_gateway |
boolean |
SubnetCreateBody¶
| Name | Type | Description |
|---|---|---|
allocation_pools |
Array<PoolBody> | |
cidr |
string | |
display_name |
string | |
dns_nameservers |
Array<string> | |
enable_dhcp |
boolean | |
execute_before |
string(date-time) | null | |
gateway_ip |
string | null | |
no_gateway |
boolean |
SubnetPatchBody¶
TagsBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
tags |
Labels key: value NubeStack Cloud keeps and writes to the resource in its location as `nx. (a volume's metadata key nx.), keeping its other tags. At most 20; a key is 1-32 of a-z, 0-9, _, ., -, starting with a letter; a value is 0-24 of A-Z, a-z, 0-9, _, ., :, -`. An organization uses at most 50 keys. |
TopologyCount¶
| Name | Type | Description |
|---|---|---|
count |
integer | null | |
kind |
string | |
observed |
integer |
TopologyEdge¶
| Name | Type | Description |
|---|---|---|
evidence |
string | |
id |
string | |
kind |
string | |
label |
string | |
observed_at |
string | null | |
source |
string | |
state |
string | |
target |
string |
TopologyGroup¶
| Name | Type | Description |
|---|---|---|
id |
string | |
label |
string | |
location_id |
string | |
placement_id |
string | |
project_id |
string | |
region |
string |
TopologyNode¶
| Name | Type | Description |
|---|---|---|
details |
||
group |
string | |
href |
string | null | |
id |
string | |
incomplete |
boolean | |
kind |
string | |
label |
string | |
observed_at |
string | null | |
operation_href |
string | null | |
origin |
string | null | |
parent |
string | null | |
source |
string | null | |
state |
string | |
status |
string | null |
TopologySource¶
| Name | Type | Description |
|---|---|---|
data_as_of |
string | null | |
group |
string | |
id |
string | |
last_success_at |
string | null | |
location |
string | |
reason |
string | null | |
region |
string | |
service |
string | |
status |
string |
TopologySummary¶
| Name | Type | Description |
|---|---|---|
complete |
boolean | |
next_cursor |
string | null | |
project_count |
integer | |
projects |
Array<ProjectSummary> | |
schema_version |
integer | |
scope |
string | |
truncated |
boolean | |
view_revision |
string |
TopologyView¶
| Name | Type | Description |
|---|---|---|
complete |
boolean | |
edges |
Array<TopologyEdge> | |
focus |
string | null | |
groups |
Array<TopologyGroup> | |
layers |
Array<string> | |
location |
string | null | |
next_cursor |
string | null | |
nodes |
Array<TopologyNode> | |
notices |
Array<string> | |
observed_resource_count |
integer | |
omitted_adjacency |
integer | |
project_id |
string | |
resource_count |
integer | null | |
schema_version |
integer | |
sources |
Array<TopologySource> | |
truncated |
boolean | |
unresolved_count |
integer | |
view_revision |
string |
UpdateBody¶
| Name | Type | Description |
|---|---|---|
description |
string | null | |
display_name |
string | |
execute_before |
string(date-time) | null |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |