Help Center/ Virtual Private Cloud/ API Reference/ API V3/ Network ACL Tag Management/ Querying Tags of Network ACLs in a Project
Updated on 2024-08-01 GMT+08:00

Querying Tags of Network ACLs in a Project

Function

This API is used to query all tags of network ACLs in a specific project.

URI

GET /v3/{project_id}/firewalls/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records to be queried

Minimum: 1

Maximum: 1000

Default: 1000

offset

No

Integer

The index position. The query starts from the next piece of data indexed by this parameter.

The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.

Default: 0

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

tags

Array of ListTag objects

Tags

request_id

String

Request ID

total_count

Integer

Resource quantity

Table 4 ListTag

Parameter

Type

Description

key

String

Tag key

The key cannot be left blank.

Maximum length: 128

Minimum: 1

Maximum: 128

values

Array of strings

Tag values. If values is left blank, it indicates any_value (querying any value). The values are in the OR relationship.

Maximum length: 255

Maximum: 255

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

Example Requests

Query tags of network ACLs by project ID.

GET https://{Endpoint}/v3/{project_id}/firewalls/tags

Example Responses

Status code: 200

Normal response to the operation

{
  "request_id" : "65ae533b-f32c-49df-9b5d-e55eda8f2c25",
  "tags" : [ {
    "key" : "key1",
    "values" : [ "value1", "value2" ]
  }, {
    "key" : "key2",
    "values" : [ "value2" ]
  }, {
    "key" : "key3",
    "values" : [ "value3" ]
  }, {
    "key" : "key4",
    "values" : [ "value4" ]
  }, {
    "key" : "key5",
    "values" : [ "value5" ]
  }, {
    "key" : "keyyyy",
    "values" : [ "value2" ]
  } ]
}

Status Codes

Status Code

Description

200

Normal response to the operation

400

Invalid parameter

401

Authentication failure

403

Insufficient permissions

404

Not found

500

System exception

Error Codes

See Error Codes.