Updated on 2026-01-06 GMT+08:00

Querying Policies

Function

Querying the policy list

Calling Method

For details, see Calling APIs.

URI

GET /v1/cnad/policies

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Query offset. The default value is 0.

limit

No

Integer

Number of items displayed on each page. The default value is 2000.

policy_name

No

String

Policy name.

Request Parameters

Table 2 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 the user token.

Content-Type

Yes

String

Content-Type

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total

Integer

Total

items

Array of PolicyResponse objects

Policy list.

Table 4 PolicyResponse

Parameter

Type

Description

id

String

id

package_id

String

Instance ID.

package_name

String

Instance name

name

String

Policy name.

description

String

Description

region

String

Region ID

clean_threshold

Integer

Cleaning threshold.

num_protected_ip

Integer

Number of protected IP addresses

Example Requests

None

Example Responses

Status code: 200

OK

{
  "items" : [ {
    "clean_threshold" : 120,
    "id" : "798d8975-f7cf-490f-b990-747ebaf41248",
    "name" : "sadf",
    "num_protected_ip" : 0,
    "package_id" : "09b5ae8e-ae05-49ff-80fc-8bdf68c16499",
    "package_name" : "Test",
    "region" : "cn-north-4"
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.