• Domain Name Service

dns
  1. Help Center
  2. Domain Name Service
  3. API Reference
  4. API Description
  5. Record Set Management
  6. Querying a Record Set

Querying a Record Set

Function

Query a record set.

URI

GET /v2/zones/{zone_id}/recordsets/{recordset_id}

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

Parameter

Mandatory

Description

zone_id

Yes

Zone ID

recordset_id

Yes

Record set ID

Request

None

Response

  • Parameter description
    Table 2 Parameters in the response

    Parameter

    Type

    Description

    id

    string

    Record set ID

    name

    string

    Record set name

    description

    string

    Record set description

    zone_id

    string

    Zone ID of the record set

    zone_name

    string

    Zone name of the record set

    type

    string

    Record set type

    The value can be AAAAAMXCNAMETXTNS (only in public zones), SOASRVPTR (only in private zones), and CAA (only in public zones).

    ttl

    int

    Caching period of a domain name (in seconds)

    A longer caching period makes a change on the authoritative DNS server take longer time to be synchronized to other DNS servers.

    records

    List<string>

    Domain name resolution result

    create_at

    string

    Time when the record set was created

    update_at

    string

    Time when the record set was updated

    status

    enum

    Resource status

    The value can be PENDING_CREATEACTIVEPENDING_UPDATEPENDING_DELETE, or ERROR.

    default

    boolean

    Whether the record set is created by default

    A default record set cannot be deleted or modified.

    project_id

    string

    Project ID of the record set

    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.

  • Example response
    {
        "id": "2c9eb155587228570158722b6ac30007",
        "name": "www.example.com.",
        "description": "This is an example record set.",
        "type": "A",
        "ttl": 300,
        "records": [
            "192.168.10.2",
            "192.168.10.1"
        ],
        "status": "PENDING_CREATE",
        "links": {
            "self": "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007"
        },
        "zone_id": "2c9eb155587194ec01587224c9f90149",
        "zone_name": "example.com.",
        "create_at": "2016-11-17T12:03:17.827",
        "update_at": "2016-11-17T12:03:18.827",
        "default": false,
        "project_id": "e55c6f3dc4e34c9f86353b664ae0e70c"
    }
    

Returned Value

See General Request Return Code.