Files
doc-exports/docs/cfw/api-ref/ListDomainSets.html
qiaoli 2ced5c725f CFW API 20250123 version
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>
2025-02-18 12:17:50 +00:00

345 lines
19 KiB
HTML

<a name="ListDomainSets"></a><a name="ListDomainSets"></a>
<h1 class="topictitle1">Querying the Domain Name Group List</h1>
<div id="body1708331107508"><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to query the domain name group list.</p>
</div>
<div class="section" id="ListDomainSets__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>GET /v1/{project_id}/domain-sets</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p>Project ID, which can be obtained by calling an API or from the console. For details, see <a href="cfw_02_0015.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to <a href="cfw_02_0027.html">Obtaining an Enterprise Project ID</a>. If the enterprise project function is not enabled, the value is <strong>0</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>fw_instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Firewall ID, which can be obtained by referring to <a href="cfw_02_0028.html">Obtaining a Firewall ID</a>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Number of records displayed on each page. The value ranges from 1 to 1024.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>offset</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>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 <strong>0</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>object_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>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 <a href="ListFirewallDetail.html">API for querying firewall instances</a>. In the return value, find the ID in <strong>data.records.protect_objects.object_id</strong> (The period [.] is used to separate different levels of objects). If the value of <strong>type</strong> is <strong>0</strong>, the protected object ID belongs to the Internet border. If the value of <strong>type</strong> is <strong>1</strong>, the protected object ID belongs to the VPC border. You can obtain the value of <strong>type</strong> from <strong>data.records.protect_objects.type</strong> (The period [.] is used to separate different levels of objects).</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>key_word</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Keyword, which can be the domain name group name or description.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>domain_set_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Domain name group typ: <strong>0</strong> (application domain name group), <strong>1</strong> (network domain name group).</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>config_status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Configuration status: <strong>-1</strong> (unconfigured), <strong>0</strong> (configuration failed), <strong>1</strong> (configuration succeeded), <strong>2</strong> (configuring), <strong>3</strong> (normal), or <strong>4</strong> (abnormal).</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDomainSets__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>User token. You can obtain the token by referring to <a href="cfw_02_0029.html">Obtaining a User Token</a>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>Content type. It can only be set to application/json.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p><strong>Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDomainSets__response_ListDomainSetsResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p>data</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p><a href="#ListDomainSets__response_ListDomainsetsResponseData">ListDomainsetsResponseData</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p>Returned data for querying the domain name group list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ListDomainSets__response_ListDomainsetsResponseData"></a><a name="response_ListDomainsetsResponseData"></a><table cellpadding="4" cellspacing="0" summary="" id="ListDomainSets__response_ListDomainsetsResponseData" frame="border" border="1" rules="all"><caption><b>Table 5 </b>ListDomainsetsResponseData</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p>limit</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p>Number of records displayed on each page. The value ranges from 1 to 1024.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p>offset</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p>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 <strong>0</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p>total</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p>Total number of domain name groups.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p>records</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p>Array of <a href="#ListDomainSets__response_DomainSetVo">DomainSetVo</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p>Domain name group list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ListDomainSets__response_DomainSetVo"></a><a name="response_DomainSetVo"></a><table cellpadding="4" cellspacing="0" summary="" id="ListDomainSets__response_DomainSetVo" frame="border" border="1" rules="all"><caption><b>Table 6 </b>DomainSetVo</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>set_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Domain name group ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Domain name group name.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>description</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Domain name group description.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>ref_count</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Number of times a domain name group is referenced by rules.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>domain_set_type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Domain name group typ: <strong>0</strong> (application domain name group), <strong>1</strong> (network domain name group).</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>config_status</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Configuration status: <strong>-1</strong> (unconfigured), <strong>0</strong> (configuration failed), <strong>1</strong> (configuration succeeded), <strong>2</strong> (configuring), <strong>3</strong> (normal), or <strong>4</strong> (abnormal).</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p>rules</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p>Array of <a href="#ListDomainSets__response_UseRuleVO">UseRuleVO</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p>Used rule ID list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ListDomainSets__response_UseRuleVO"></a><a name="response_UseRuleVO"></a><table cellpadding="4" cellspacing="0" summary="" id="ListDomainSets__response_UseRuleVO" frame="border" border="1" rules="all"><caption><b>Table 7 </b>UseRuleVO</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.6.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p>Rule ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p>name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p>Rule name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>Query the domain name group list of firewall 546af3f8-88e9-47f2-a205-2346d7090925 in project 9d80d070b6d44942af73c9c3d38e0429. The protected object ID is ae42418e-f077-41a0-9d3b-5b2f5ad9102b.</p>
<pre class="screen">https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/domain-sets?fw_instance_id=546af3f8-88e9-47f2-a205-2346d7090925&amp;enterprise_project_id=default&amp;limit=50&amp;offset=0&amp;object_id=ae42418e-f077-41a0-9d3b-5b2f5ad9102b</pre>
</div>
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p><strong>Status code: 200</strong></p>
<p>Return value for querying the domain name group list.</p>
<pre class="screen">{
"data" : {
"limit" : 50,
"offset" : 0,
"records" : [ {
"config_status" : 3,
"description" : "",
"domain_set_type" : 0,
"name" : "ccdd",
"ref_count" : 0,
"rules" : [ ],
"set_id" : "e43db369-a863-45ed-8850-58d6b571b1ab"
} ],
"total" : 1
}
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDomainSets__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p>Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Return value for querying the domain name group list.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Error Codes</h4><p>See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000006.html">Domain Name Resolution and Domain Name Group Management</a></div>
</div>
</div>