• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Routers
  6. List routers

List routers

Function Description

This interface is used to query routers.

Interface Format

Method

URI

Description

GET

/v2.0/routers?id={ id }&name={ name }&admin_state_up={admin_state_up}&tenant_id={tenant_id}&status={status}

Queries all routers accessible to the tenant submitting the request.

Restrictions

N/A

Request Parameter

None

Response Parameter

Parameter

Type

Mandatory

Description

routers

List(router)

Yes

Specifies the router list. For details, see Table 1.

Request Example

GET  /v2.0/routers

Response Example

{
    "routers": [
        {
            "status": "ACTIVE",
            "external_gateway_info": {
                "network_id": "9daeac7c-a98f-430f-8e38-67f9c044e299",
                "enable_snat": false
            },
            "name": "router",
            "admin_state_up": true,
            "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
            "routes": [],
            "id": "b147a74b-39bb-4c7a-aed5-19cac4c2df13",
        }
    ]
}

Error Code

See section Return Code Processing.