Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qiaoli <qiaoli@huawei.com> Co-committed-by: qiaoli <qiaoli@huawei.com>
16 KiB
Obtaining the Domain Name List in a Domain Name Group
Function
This API is used to obtain the list of domain names in a domain name group.
URI
GET /v1/{project_id}/domain-set/domains/{domain_set_id}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
domain_set_id |
Yes |
String |
Domain name group ID, which can be obtained by calling the API for querying the domain name group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects). |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to Obtaining an Enterprise Project ID. If the enterprise project function is not enabled, the value is 0. |
fw_instance_id |
Yes |
String |
Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
limit |
Yes |
Integer |
Number of records displayed on each page. The value ranges from 1 to 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, for example, www.test.com. |
object_Id |
No |
String |
Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the API for querying firewall instances. In the return value, find the ID in data.records.protect_objects.object_id (The period [.] is used to separate different levels of objects). If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border. You can obtain the value of type from data.records.protect_objects.type (The period [.] is used to separate different levels of objects). |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type |
Yes |
String |
Content type. It can only be set to application/json. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
data |
ListDomainResponseData object |
Returned data for querying the domain name list. |
Parameter |
Type |
Description |
|---|---|---|
limit |
Integer |
Number of records displayed on each page. The value ranges from 1 to 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 name information list. |
set_id |
String |
Domain name group ID. |
total |
Integer |
Total number of domain names. |
Example Requests
Query the domain name list of project 14181c1245cf4fd786824efe1e2b9388. The domain name group ID is 78719348-6d79-477e-acec-676a29842ab2, and the firewall ID is 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
Return value for querying the domain name list.
{
"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 |
Return value for querying the domain name list. |
Error Codes
See Error Codes.