• Domain Name Service

dns
  1. Help Center
  2. Domain Name Service
  3. API Reference
  4. API Description
  5. PTR Record Management
  6. Querying All PTR Records

Querying All PTR Records

Function

Query PTR records of EIPs.

URI

GET /v2/reverse/floatingips?limit={limit}&marker={marker}&offset={offset}&tags={tags}

For details, see Table 1.
Table 1 Parameters in the URI

Parameter

Mandatory

Type

Description

marker

No

string

Start resource ID of pagination query

If the parameter is left blank, only resources on the first page are queried.

limit

No

string

  • Number of resources returned on each page
  • Value range: 0–500

    Commonly used values are 10, 20, and 50.

offset

No

int

  • Start page of the list, which ranges from 0 to 2147483647.
  • When the value of marker is not blank, it determines the start of a page.

tags

No

string

Resource tag

The format is as follows: key1,value1|key2,value2.

Multiple tags are separated by vertical bar (|). The key and value of each tag are separated by comma (,).

All tags listed will be queried.

For details, see section Adding Resource Tags.

Request

None

Response

  • Parameter description
    Table 2 Parameters in the response

    Parameter

    Type

    Description

    links

    string

    Link of the current resource or other related resources

    When a response is broken into pages, a next link is provided to retrieve all results.

    metadata

    string

    Number of resources that meet the filter condition

    floatingips

    List object

    PTR record object list

    Table 3 describes parameters in the floatingips field, and Table 4 describes the parameter under the metadata field.
    Table 3 Description of the floatingips field

    Parameter

    Type

    Description

    id

    string

    PTR record ID, which is in {region}:{floatingip_id} format

    ptrdname

    string

    Domain name of the PTR record

    description

    string

    PTR record description

    ttl

    int

    Caching period of a PTR record (in seconds)

    The default value is 300s.

    The value range is 300–2147483647.

    address

    string

    EIP

    status

    enum

    Resource status

    The value can be PENDING_CREATE, ACTIVE, PENDING_DELETE, PENDING_UPDATE, or ERROR.

    action

    enum

    Requested operation on the resource

    The value can be CREATE, UPDATE, or DELETE.

    links

    object

    Link of the current resource or other related resources

    When a response is broken into pages, a next link is provided to retrieve all results.

    Table 4 Description of the metadata field

    Parameter

    Type

    Description

    total_count

    int

    Total number of resources

  • Example response
    {
        "links": {
            "self": "https://Endpoint/v2/reverse/floatingips"
        },
        "metadata": {
            "total_count": 1
        },
        "floatingips": [
            {
                "id": "region_id:c5504932-bf23-4171-b655-b87a6bc59334",
                "ptrdname": "www.example.com.",
                "description": "Description for this PTR record",
                "address": "10.154.52.138",
                "action": "NONE",
                "ttl": 300,
                "status": "ACTIVE",
                "links": {
                    "self": "https://Endpoint/v2/reverse/floatingips/region_id:c5504932-bf23-4171-b655-b87a6bc59334"
                }
            }
        ]
    }

Returned Value

See General Request Return Code.