• Identity and Access Management

iam
  1. Help Center
  2. Identity and Access Management
  3. API Reference
  4. Region Management
  5. Querying a Region List

Querying a Region List

Function Description

This interface is used to query a region list.

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 private region information, 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

    Resource links of a region.

    regions

    Yes

    List

    Region list.

  • Description for the regions 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

    No

    String

    Region type.

    links

    Yes

    Dict

    Resource 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": {
                   
                    "en-us": "region_name2"
                }
            },
            {
                "parent_region_id": null,
                "description": "",
                "links": {
                    "self": "None/v3/regions/500017826026667755"
                },
                "type": "private",
                "id": "500017826026667755",
                "locales": {
                 
                    "en-us": "region_name2"
                }
            },
            {
                "parent_region_id": null,
                "description": "",
                "links": {
                    "self": "None/v3/regions/region_name"
                },
                "type": "public",
                "id": "test2",
                "locales": {
                    
                    "en-us": "region_name2"
                }
            },
            {
                "parent_region_id": null,
                "links": {
                    "self": "None/v3/regions/test1112244"
                },
                "id": "test1112244",
                "locales": {
                    
                    "en-us": "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.