• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Keystone
  5. Region
  6. Querying a Region List

Querying a Region List

Function Description

This interface is used to query a region list. This interface applies only to domain names in the Global zone.

URI

  • URI format

    GET /v3/regions

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    Content-Type

    Yes

    String

    Fill application/json;charset=utf8 in this field.

    X-Auth-Token

    Yes

    String

    Authenticated token. If the token does not contain the tag of a private region, the system does not return the private region in the query result.

  • Sample request
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X GET https://172.30.48.86:31943/v3/regions

Response

  • Response body parameter description

    Parameter

    Mandatory

    Type

    Description

    links

    Yes

    Dict

    Links of a region, including nextprevious, and self.

    regions

    Yes

    List

    Region list.

  • Description for the services format

    Parameter

    Mandatory

    Type

    Description

    description

    Yes

    String

    Region description.

    parent_region_id

    Yes

    String

    Parent region ID of a region.

    id

    Yes

    String

    Region ID.

    locales

    Yes

    Dict

    Region name.

    type

    Yes

    String

    Region type.

    links

    Yes

    Dict

    Links of a region.

  • Sample response (successful response)
    {
        "regions": [
            {
                "parent_region_id": null,
                "description": "",
                "links": {
                    "self": "None/v3/regions/1500365963661574434"
                },
                "type": "private",
                "id": "1500365963661574434",
                "locales": {
                    "pt-br": "POTRGA",
                    "en-us": "ENGLISH",
                    "es-es": "ESPANIAR",
                    "zh-cn": "region_name"
                }
            },
            {
                "parent_region_id": null,
                "description": "",
                "links": {
                    "self": "None/v3/regions/500017826026667755"
                },
                "type": "private",
                "id": "500017826026667755",
                "locales": {
                    "pt-br": "POTRGA",
                    "en-us": "ENGLISH",
                    "es-es": "ESPANIAR",
                    "zh-cn": "region_name1"
                }
            },
            {
                "parent_region_id": null,
                "description": "",
                "links": {
                    "self": "None/v3/regions/region_name"
                },
                "type": "public",
                "id": "Dec-test2",
                "locales": {
                    "zh-cn": "region_name2",
                    "en-us": "region_name2"
                }
            },
            {
                "parent_region_id": null,
                "links": {
                    "self": "None/v3/regions/Dec-test1112244"
                },
                "id": "Dec-test1112244",
                "locales": {
    "zh-cn": "Test region 1_test01",
                    "en-us": "testregion1",
                    "es-es": "testregion1",
                    "pt-br": "testregion1"
                },
                "description": ""
            }
        ],
        "links": {
            "self": "None/v3/regions",
            "previous": null,
            "next": null
        }
    }

Status Codes

Status Code

Description

200

The request is successful.

400

The server failed to process the request.

401

You must enter a username and password to access the requested page.

403

You are forbidden to access the requested page.

404

The server could not find the requested page.

405

You are not allowed to use the method specified in the request.

413

The request entity is too large.

500

Failed to complete the request because of an internal service error.

503

Failed to complete the request because the service is unavailable.