Updated on 2025-11-21 GMT+08:00

Querying Address Group Details

Function

This API is used to query address group details.

URI

GET /v1/{project_id}/address-sets/{set_id}

Table 1 Path Parameters

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.

set_id

Yes

String

Address group ID, which can be obtained by calling the API for querying the address group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects).

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID, which is the ID of a project planned based on organizations. If the enterprise project function is not enabled, the value is 0.

fw_instance_id

No

String

Firewall ID, which can be obtained by referring to Obtaining a Firewall ID.

query_address_set_type

No

Integer

Type of the address group to be queried: 0 (user-defined address group), 1 (predefined address group).

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 (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

data object

Query address group details.

Table 5 data

Parameter

Type

Description

id

String

Address group ID.

name

String

IP address group name.

description

String

Address group description.

address_set_type

Integer

Address group type: 0 (user-defined address group), 1 (WAF proxy IP address group), 2 (DDoS back-to-source IP address group), or 3 (NAT64 address group).

address_type

Integer

Address type: 0 (IPv4), 1 (IPv6).

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Range

N/A

error_msg

String

Definition

Error description.

Range

N/A

Example Requests

Query details about the address group cf18f0b1-0ce7-4eb8-83b6-4b33c8448e16 in project 9d80d070b6d44942af73c9c3d38e0429.

https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/address-sets/cf18f0b1-0ce7-4eb8-83b6-4b33c8448e16

Example Responses

Status code: 200

OK

{
  "data" : {
    "address_set_type" : 0,
    "address_type" : 0,
    "description" : "",
    "id" : "cf18f0b1-0ce7-4eb8-83b6-4b33c8448e16",
    "name" : "ABC"
  }
}

Status code: 400

Bad Request

{
  "error_code" : "CFW.00200005",
  "error_msg" : "Object not found."
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized: Request error.

403

Forbidden: Access forbidden.

404

Not Found: Web page not found.

500

Internal Server Error

Error Codes

See Error Codes.