List routers

Lists logical routers that are accessible to the project who submits the request.

URI

/v2.0/routers

HTTP method

GET

Response status

Status code Description
200 Normal response codes
unauthorized (401) Error response codes

Response body (normal status)


       {
       "routers": [
       {
       "status": "ACTIVE",
       "external_gateway_info": null,
       "name": "second_routers",
       "admin_state_up": true,
       "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
       "id": "7177abc4-5ae9-4bb7-b0d4-89e94a4abf3b",
       "routes": [
       {
       "nexthop": "10.1.0.10",
       "destination": "40.0.1.0/24"
       }
       ],
       "availability_zone": "AZ1"
       },
       {
       "status": "ACTIVE",
       "external_gateway_info": {
       "network_id": "3c5bcddd-6af9-4e6b-9c3e-c153e521cab8"
       "enable_snat": true,
       "external_fixed_ips": [
       {
       "subnet_id": "41dc310d-52a2-42ab-a193-1564c0cf8cc6",
       "ip_address": "133.162.136.103"	 
       }			 
       ]
       },
       "name": "router1",
       "admin_state_up": true,
       "tenant_id": "33a40233088643acb66ff6eb0ebea679",
       "id": "a9254bdb-2613-4a13-ac4c-adc581fba50d",
       "routes": [
       {
       "nexthop": "11.1.0.10",
       "destination": "41.0.1.0/24"
       }
       ],
       "availability_zone": "AZ1"
       }
       ]
       }  
     

Description of response body (normal status)

Item Description
status The router status.
external_gateway_info The external gateway information of the router. If the router has an external gateway, this would be a dict with network_id, enable_snat and external_fixed_ips. Otherwise, this would be null.
name The router name.
admin_state_up The administrative state of the router, which is up (true) or down (false).
tenant_id The Project ID.
id The router ID.
routes List of dictionary(static route definitions) in this format:

[
  {
    "nexthop":"IPADDRESS",
    "destination":"CIDR"
  }
]                 
               
Static route definitions:

next_hop is the IP address of the next hop.

destination is the destination CIDR.

availability_zone The Availability Zone name