Openstack Routers
Operations Summary
| Method | Endpoint | Description |
|---|---|---|
| Core CRUD | ||
| GET | /api/openstack-routers/ |
List routers |
| GET | /api/openstack-routers/{uuid}/ |
Get router details |
| POST | /api/openstack-routers/ |
Create router |
| DELETE | /api/openstack-routers/{uuid}/ |
Delete router |
| Other Actions | ||
| GET | /api/openstack-routers/{uuid}/available_external_networks/ |
List available external networks |
| GET | /api/openstack-routers/{uuid}/effective_routes/ |
Effective routes for this router |
| POST | /api/openstack-routers/{uuid}/add_router_interface/ |
Add router interface |
| POST | /api/openstack-routers/{uuid}/remove_external_gateway/ |
Remove external gateway |
| POST | /api/openstack-routers/{uuid}/remove_router_interface/ |
Remove router interface |
| POST | /api/openstack-routers/{uuid}/set_erred/ |
Mark router as ERRED |
| POST | /api/openstack-routers/{uuid}/set_external_gateway/ |
Set external gateway |
| POST | /api/openstack-routers/{uuid}/set_ok/ |
Mark router as OK |
| POST | /api/openstack-routers/{uuid}/set_routes/ |
Set static routes |
Core CRUD
List routers
Get a list of routers.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
- Model Source:
CoreStates - Model Source:
OpenStackRouterFieldEnum - API Source:
openstack_routers_list
1 2 3 4 5 6 7 8 9 10 | |
| Name | Type | Description |
|---|---|---|
field |
array | |
name |
string | Name |
name_exact |
string | Name (exact) |
page |
integer | A page number within the paginated result set. |
page_size |
integer | Number of results to return per page. |
state |
array | State |
tenant |
string (uri) | Tenant URL |
tenant_uuid |
string (uuid) | Tenant UUID |
200 -
The response body is an array of objects, where each object has the following structure:
| Field | Type | Description |
|---|---|---|
url |
string (uri) | |
uuid |
string (uuid) | |
name |
string | |
description |
string | |
service_name |
string | |
service_settings |
string (uri) | |
service_settings_uuid |
string (uuid) | |
service_settings_state |
string | |
service_settings_error_message |
string | |
project |
string (uri) | |
project_name |
string | |
project_uuid |
string (uuid) | |
customer |
string (uri) | |
customer_uuid |
string (uuid) | |
customer_name |
string | |
customer_native_name |
string | |
customer_abbreviation |
string | |
error_message |
string | |
error_traceback |
string | |
resource_type |
string | |
state |
any | |
created |
string (date-time) | |
modified |
string (date-time) | |
backend_id |
string | Router ID in OpenStack |
access_url |
any | |
tenant |
string (uri) | OpenStack tenant this router belongs to |
tenant_name |
string | |
tenant_uuid |
string (uuid) | |
routes |
array of objects | |
routes.destination |
string | |
routes.nexthop |
any | An IPv4 or IPv6 address. |
fixed_ips |
array of objects | |
fixed_ips.ip_address |
any | IP address to assign to the port |
fixed_ips.subnet_id |
string | ID of the subnet in which to assign the IP address |
ports |
array of objects | |
ports.url |
string (uri) | |
ports.fixed_ips |
array of objects | |
ports.fixed_ips.ip_address |
any | IP address to assign to the port |
ports.fixed_ips.subnet_id |
string | ID of the subnet in which to assign the IP address |
ports.mac_address |
string | MAC address of the port |
ports.subnet |
string (uri) | Subnet to which this port belongs |
ports.subnet_uuid |
string (uuid) | |
ports.subnet_name |
string | |
ports.subnet_description |
string | |
ports.subnet_cidr |
string | IPv4 network address in CIDR format (e.g. 192.168.0.0/24) |
ports.allowed_address_pairs |
array of objects | |
ports.allowed_address_pairs.mac_address |
string | |
ports.device_id |
string | ID of device (instance, router etc) to which this port is connected |
ports.device_owner |
string | Entity that uses this port (e.g. network:router_interface) |
ports.security_groups |
array of objects | |
ports.security_groups.url |
string (uri) | |
ports.security_groups.uuid |
string (uuid) | |
ports.security_groups.name |
string | |
ports.security_groups.description |
string | |
ports.security_groups.service_name |
string | |
ports.security_groups.service_settings |
string (uri) | |
ports.security_groups.service_settings_uuid |
string (uuid) | |
ports.security_groups.service_settings_state |
string | |
ports.security_groups.service_settings_error_message |
string | |
ports.security_groups.project |
string (uri) | |
ports.security_groups.project_name |
string | |
ports.security_groups.project_uuid |
string (uuid) | |
ports.security_groups.customer |
string (uri) | |
ports.security_groups.customer_uuid |
string (uuid) | |
ports.security_groups.customer_name |
string | |
ports.security_groups.customer_native_name |
string | |
ports.security_groups.customer_abbreviation |
string | |
ports.security_groups.error_message |
string | |
ports.security_groups.error_traceback |
string | |
ports.security_groups.resource_type |
string | |
ports.security_groups.state |
any | |
ports.security_groups.created |
string (date-time) | |
ports.security_groups.modified |
string (date-time) | |
ports.security_groups.backend_id |
string | |
ports.security_groups.access_url |
any | |
ports.security_groups.tenant |
string (uri) | |
ports.security_groups.tenant_name |
string | |
ports.security_groups.tenant_uuid |
string (uuid) | |
ports.security_groups.rules |
array of objects | |
ports.security_groups.rules.ethertype |
any | IP protocol version - either 'IPv4' or 'IPv6' |
ports.security_groups.rules.direction |
any | Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing) |
ports.security_groups.rules.protocol |
string | Network protocol: 'tcp', 'udp', 'icmp', empty (any) or an IANA protocol number 0-255 (e.g. '112' for VRRP). |
ports.security_groups.rules.from_port |
integer | Starting port number in the range (1-65535) |
ports.security_groups.rules.to_port |
integer | Ending port number in the range (1-65535) |
ports.security_groups.rules.cidr |
string | CIDR notation for the source/destination network address range |
ports.security_groups.rules.description |
string | |
ports.security_groups.rules.remote_group_name |
string | |
ports.security_groups.rules.remote_group_uuid |
string (uuid) | |
ports.security_groups.rules.id |
integer | |
ports.security_groups.rules.remote_group |
string (uri) | Remote security group that this rule references, if any |
ports.security_groups.marketplace_offering_uuid |
string | |
ports.security_groups.marketplace_offering_name |
string | |
ports.security_groups.marketplace_offering_type |
string | |
ports.security_groups.marketplace_offering_plugin_options |
object (free-form) | |
ports.security_groups.marketplace_category_uuid |
string | |
ports.security_groups.marketplace_category_name |
string | |
ports.security_groups.marketplace_resource_uuid |
string | |
ports.security_groups.marketplace_plan_uuid |
string | |
ports.security_groups.marketplace_resource_state |
string | |
ports.security_groups.is_usage_based |
boolean | |
ports.security_groups.is_limit_based |
boolean | |
external_network_id |
string | Backend ID of the external network used as gateway |
external_network_uuid |
string (uuid) | |
external_network_name |
string | |
has_external_gateway |
boolean | |
enable_snat |
boolean | Whether SNAT is enabled on the external gateway. None means OpenStack default (True). |
external_fixed_ips |
any | |
marketplace_offering_uuid |
string | |
marketplace_offering_name |
string | |
marketplace_offering_type |
string | |
marketplace_offering_plugin_options |
object (free-form) | |
marketplace_category_uuid |
string | |
marketplace_category_name |
string | |
marketplace_resource_uuid |
string | |
marketplace_plan_uuid |
string | |
marketplace_resource_state |
string | |
is_usage_based |
boolean | |
is_limit_based |
boolean | |
offering_external_ips |
array of strings |
Get router details
Retrieve details of a specific router.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
- Model Source:
OpenStackRouterFieldEnum - API Source:
openstack_routers_retrieve
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Name | Type |
|---|---|
field |
array |
200 -
| Field | Type | Description |
|---|---|---|
url |
string (uri) | |
uuid |
string (uuid) | |
name |
string | |
description |
string | |
service_name |
string | |
service_settings |
string (uri) | |
service_settings_uuid |
string (uuid) | |
service_settings_state |
string | |
service_settings_error_message |
string | |
project |
string (uri) | |
project_name |
string | |
project_uuid |
string (uuid) | |
customer |
string (uri) | |
customer_uuid |
string (uuid) | |
customer_name |
string | |
customer_native_name |
string | |
customer_abbreviation |
string | |
error_message |
string | |
error_traceback |
string | |
resource_type |
string | |
state |
any | |
created |
string (date-time) | |
modified |
string (date-time) | |
backend_id |
string | Router ID in OpenStack |
access_url |
any | |
tenant |
string (uri) | OpenStack tenant this router belongs to |
tenant_name |
string | |
tenant_uuid |
string (uuid) | |
routes |
array of objects | |
routes.destination |
string | |
routes.nexthop |
any | An IPv4 or IPv6 address. |
fixed_ips |
array of objects | |
fixed_ips.ip_address |
any | IP address to assign to the port |
fixed_ips.subnet_id |
string | ID of the subnet in which to assign the IP address |
ports |
array of objects | |
ports.url |
string (uri) | |
ports.fixed_ips |
array of objects | |
ports.fixed_ips.ip_address |
any | IP address to assign to the port |
ports.fixed_ips.subnet_id |
string | ID of the subnet in which to assign the IP address |
ports.mac_address |
string | MAC address of the port |
ports.subnet |
string (uri) | Subnet to which this port belongs |
ports.subnet_uuid |
string (uuid) | |
ports.subnet_name |
string | |
ports.subnet_description |
string | |
ports.subnet_cidr |
string | IPv4 network address in CIDR format (e.g. 192.168.0.0/24) |
ports.allowed_address_pairs |
array of objects | |
ports.allowed_address_pairs.mac_address |
string | |
ports.device_id |
string | ID of device (instance, router etc) to which this port is connected |
ports.device_owner |
string | Entity that uses this port (e.g. network:router_interface) |
ports.security_groups |
array of objects | |
ports.security_groups.url |
string (uri) | |
ports.security_groups.uuid |
string (uuid) | |
ports.security_groups.name |
string | |
ports.security_groups.description |
string | |
ports.security_groups.service_name |
string | |
ports.security_groups.service_settings |
string (uri) | |
ports.security_groups.service_settings_uuid |
string (uuid) | |
ports.security_groups.service_settings_state |
string | |
ports.security_groups.service_settings_error_message |
string | |
ports.security_groups.project |
string (uri) | |
ports.security_groups.project_name |
string | |
ports.security_groups.project_uuid |
string (uuid) | |
ports.security_groups.customer |
string (uri) | |
ports.security_groups.customer_uuid |
string (uuid) | |
ports.security_groups.customer_name |
string | |
ports.security_groups.customer_native_name |
string | |
ports.security_groups.customer_abbreviation |
string | |
ports.security_groups.error_message |
string | |
ports.security_groups.error_traceback |
string | |
ports.security_groups.resource_type |
string | |
ports.security_groups.state |
any | |
ports.security_groups.created |
string (date-time) | |
ports.security_groups.modified |
string (date-time) | |
ports.security_groups.backend_id |
string | |
ports.security_groups.access_url |
any | |
ports.security_groups.tenant |
string (uri) | |
ports.security_groups.tenant_name |
string | |
ports.security_groups.tenant_uuid |
string (uuid) | |
ports.security_groups.rules |
array of objects | |
ports.security_groups.rules.ethertype |
any | IP protocol version - either 'IPv4' or 'IPv6' |
ports.security_groups.rules.direction |
any | Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing) |
ports.security_groups.rules.protocol |
string | Network protocol: 'tcp', 'udp', 'icmp', empty (any) or an IANA protocol number 0-255 (e.g. '112' for VRRP). |
ports.security_groups.rules.from_port |
integer | Starting port number in the range (1-65535) |
ports.security_groups.rules.to_port |
integer | Ending port number in the range (1-65535) |
ports.security_groups.rules.cidr |
string | CIDR notation for the source/destination network address range |
ports.security_groups.rules.description |
string | |
ports.security_groups.rules.remote_group_name |
string | |
ports.security_groups.rules.remote_group_uuid |
string (uuid) | |
ports.security_groups.rules.id |
integer | |
ports.security_groups.rules.remote_group |
string (uri) | Remote security group that this rule references, if any |
ports.security_groups.marketplace_offering_uuid |
string | |
ports.security_groups.marketplace_offering_name |
string | |
ports.security_groups.marketplace_offering_type |
string | |
ports.security_groups.marketplace_offering_plugin_options |
object (free-form) | |
ports.security_groups.marketplace_category_uuid |
string | |
ports.security_groups.marketplace_category_name |
string | |
ports.security_groups.marketplace_resource_uuid |
string | |
ports.security_groups.marketplace_plan_uuid |
string | |
ports.security_groups.marketplace_resource_state |
string | |
ports.security_groups.is_usage_based |
boolean | |
ports.security_groups.is_limit_based |
boolean | |
external_network_id |
string | Backend ID of the external network used as gateway |
external_network_uuid |
string (uuid) | |
external_network_name |
string | |
has_external_gateway |
boolean | |
enable_snat |
boolean | Whether SNAT is enabled on the external gateway. None means OpenStack default (True). |
external_fixed_ips |
any | |
marketplace_offering_uuid |
string | |
marketplace_offering_name |
string | |
marketplace_offering_type |
string | |
marketplace_offering_plugin_options |
object (free-form) | |
marketplace_category_uuid |
string | |
marketplace_category_name |
string | |
marketplace_resource_uuid |
string | |
marketplace_plan_uuid |
string | |
marketplace_resource_state |
string | |
is_usage_based |
boolean | |
is_limit_based |
boolean | |
offering_external_ips |
array of strings |
Create router
Create a new router.
1 2 3 4 5 6 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
- Model Source:
CreateRouterRequest - API Source:
openstack_routers_create
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
| Field | Type | Required | Description |
|---|---|---|---|
tenant |
string (uri) | ✓ | OpenStack tenant this router belongs to |
name |
string | ✓ |
201 -
| Field | Type | Description |
|---|---|---|
url |
string (uri) | |
uuid |
string (uuid) | |
tenant |
string (uri) | OpenStack tenant this router belongs to |
name |
string | |
project |
string (uri) | |
service_settings |
string (uri) |
Delete router
Delete a router.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
- API Source:
openstack_routers_destroy
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
204 - No response body
Other Actions
List available external networks
Returns a merged list of external networks available for this router's tenant, from both global external networks and RBAC-exposed networks.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
- Model Source:
CoreStates - API Source:
openstack_routers_available_external_networks_list
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Name | Type | Description |
|---|---|---|
name |
string | Name |
name_exact |
string | Name (exact) |
page |
integer | A page number within the paginated result set. |
page_size |
integer | Number of results to return per page. |
state |
array | State |
tenant |
string (uri) | Tenant URL |
tenant_uuid |
string (uuid) | Tenant UUID |
200 -
The response body is an array of objects, where each object has the following structure:
| Field | Type |
|---|---|
backend_id |
string |
name |
string |
description |
string |
source |
string |
subnets |
array of objects |
subnets.backend_id |
string |
subnets.name |
string |
subnets.cidr |
string |
Effective routes for this router
Compose the router's routing table from three sources: the default route inherited from the external gateway subnet, the on-link routes implied by each attached interface, and the user-set static routes. SNAT state is reported alongside.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
- API Source:
openstack_routers_effective_routes_retrieve
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
200 -
| Field | Type | Description |
|---|---|---|
snat |
boolean | |
has_external_gateway |
boolean | |
routes |
array of objects | |
routes.destination |
string | |
routes.nexthop |
any | An IPv4 or IPv6 address. |
routes.source |
string | Enum: default, connected, static |
routes.subnet_uuid |
string | |
routes.subnet_name |
string | |
routes.subnet_cidr |
string | |
routes.port_uuid |
string | |
routes.port_backend_id |
string | |
routes.ip_on_router |
any | An IPv4 or IPv6 address. |
routes.gateway_ip_on_router |
any | An IPv4 or IPv6 address. |
routes.external_network_uuid |
string | |
routes.external_network_name |
string |
Add router interface
Add interface to router. Either subnet or port must be provided.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
- Model Source:
OpenStackRouterInterfaceRequest - API Source:
openstack_routers_add_router_interface
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Field | Type | Required | Description |
|---|---|---|---|
subnet |
string (uri) | The subnet to connect to the router. Either subnet or port must be specified, but not both. | |
port |
string (uri) | The port to connect to the router. Either subnet or port must be specified, but not both. |
202 -
| Field | Type |
|---|---|
status |
string |
Remove external gateway
Remove the external gateway from this router.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
- API Source:
openstack_routers_remove_external_gateway
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
202 -
| Field | Type |
|---|---|
status |
string |
Remove router interface
Remove interface from router. Either subnet or port must be provided.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
- Model Source:
OpenStackRouterInterfaceRequest - API Source:
openstack_routers_remove_router_interface
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Field | Type | Required | Description |
|---|---|---|---|
subnet |
string (uri) | The subnet to connect to the router. Either subnet or port must be specified, but not both. | |
port |
string (uri) | The port to connect to the router. Either subnet or port must be specified, but not both. |
202 -
| Field | Type |
|---|---|
status |
string |
Mark router as ERRED
Manually transition the router to ERRED state. This is useful for routers stuck in transitional states (CREATING, UPDATING, DELETING) that cannot be synced via pull. Staff-only operation.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
- Model Source:
SetErredRequest - API Source:
openstack_routers_set_erred
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Field | Type | Required |
|---|---|---|
error_message |
string | |
error_traceback |
string |
200 -
| Field | Type |
|---|---|
detail |
string |
Set external gateway
Set an external network as the gateway for this router. Advanced options (SNAT control, fixed IPs) require additional permissions.
1 2 3 4 5 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
- Model Source:
SetExternalGatewayRequest - API Source:
openstack_routers_set_external_gateway
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Field | Type | Required | Description |
|---|---|---|---|
external_network_id |
string | ✓ | Backend ID (OpenStack UUID) of the external network. |
enable_snat |
boolean | Whether to enable SNAT on the gateway. None means use OpenStack default (True). Requires advanced permissions. | |
external_fixed_ips |
array of objects | List of fixed IP specifications for the gateway port. Each entry should have 'ip_address' and optionally 'subnet_id'. Requires advanced permissions. | |
external_fixed_ips.ip_address |
string | ✓ | IP address specification for the gateway port. |
external_fixed_ips.subnet_id |
string | Backend ID of the subnet. |
202 -
| Field | Type |
|---|---|
status |
string |
Mark router as OK
Manually transition the router to OK state and clear error fields. Staff-only operation.
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
- API Source:
openstack_routers_set_ok
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
200 -
| Field | Type |
|---|---|
detail |
string |
Set static routes
Define or overwrite the static routes for the router.
1 2 3 4 5 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
- Model Source:
OpenStackRouterSetRoutesRequest - API Source:
openstack_routers_set_routes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
| Name | Type | Required |
|---|---|---|
uuid |
string (uuid) | ✓ |
| Field | Type | Required | Description |
|---|---|---|---|
routes |
array of objects | ✓ | |
routes.destination |
string | ✓ | |
routes.nexthop |
any | ✓ | An IPv4 or IPv6 address. |
202 -
| Field | Type |
|---|---|
status |
string |