Querying Tag Information
Function
This API is used to query tag information.
URI
GET /v2/{project_id}/cfw-cfw/tags
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which can be obtained by calling an API or from the console. You can obtain it by referring to Obtaining a Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| 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. |
| 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. |
Request 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
| Parameter | Type | Description |
|---|---|---|
| tags | Array of TagValue objects | Tag List |
Example Requests
Query the tag information of the firewall whose ID is e743cfaf-8164-4807-aa13-d893d83313cf.
https://{Endpoint}/v2/408972e72dcd4c1a9b033e955802a36b/cfw-cfw/tags?fw_instance_id=e743cfaf-8164-4807-aa13-d893d83313cf&enterprise_project_id=fb55459c-41b3-47fc-885d-540946fddda4 Example Responses
Status code: 200
OK
{
"tags" : [ {
"key" : "test",
"value" : [ "1" ]
}, {
"key" : "tag_zjw-1",
"value" : [ "1" ]
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 401 | Unauthorized: Request error. |
| 403 | Forbidden: Access forbidden. |
| 404 | Not Found: Web page not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot