Updated on 2024-12-05 GMT+08:00

list domains

Function

list domains

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/domain-set/domains/{domain_set_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

domain_set_id

Yes

String

domain set id

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project id, the id generated by the enterprise project after the user supports the enterprise project.

fw_instance_id

Yes

String

Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. For details, see the API Explorer and Help Center FAQ.By default, if fw_instance_Id is not specified, information about the first firewall under the account is returned. If fw_instance_Id is specified, information about the firewall with this fw_instance_Id is returned.If object_Id is specified, information about the firewall with this object_Id is returned by default. If both fw_instance_Id and object_Id are specified, the specified object_Id must belong to the specified firewall.

limit

Yes

Integer

Number of records displayed on each page, in the range 1-1024

offset

Yes

Integer

Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is 0.

domain_name

No

String

domain name

object_Id

No

String

Internet border Protected object ID, You can obtain the ID by calling the API used for querying a firewall instance. Note that the value 0 indicates the ID of a protected object on the Internet border, and the value 1 indicates the ID of a protected object on the VPC border.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

ListDomainResponseData object

list domain response data

Table 5 ListDomainResponseData

Parameter

Type

Description

limit

Integer

Number of records displayed on each page, in the range 1-1024

offset

Integer

Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is 0.

project_id

String

Project ID

records

Array of DomainInfo objects

domain info list

set_id

String

domain set id

total

Integer

total

Table 6 DomainInfo

Parameter

Type

Description

domain_address_id

String

domain address id

domain_name

String

domain name

description

String

description

dns_ips

Array of strings

dns ips

Example Requests

Query the list of domain names under project id 14181c1245cf4fd786824efe1e2b9388, domain set id 78719348-6d79-477e-acec-676a29842ab2, and the firewall instance id 546af3f8-88e9-47f2-a205-2346d7090925.

https://{Endpoint}/v1/14181c1245cf4fd786824efe1e2b9388/domain-set/domains/78719348-6d79-477e-acec-676a29842ab2?fw_instance_id=546af3f8-88e9-47f2-a205-2346d7090925&enterprise_project_id=default&limit=200&offset=0

Example Responses

Status code: 200

list domain response

{
  "data" : {
    "limit" : 200,
    "offset" : 0,
    "project_id" : "14181c1245cf4fd786824efe1e2b9388",
    "records" : [ {
      "description" : "",
      "domain_address_id" : "6718279e-9761-4623-a48d-b16957b19e1b",
      "domain_name" : "www.test.com"
    } ],
    "set_id" : "78719348-6d79-477e-acec-676a29842ab2",
    "total" : 1
  }
}

Status Codes

Status Code

Description

200

list domain response

Error Codes

See Error Codes.