Querying Environment Tags(V2)
Function
This API is used to query environment tags.
URI
POST /v2/cmdb/tag/get-env-tag-list
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
|
x-business-id |
Yes |
Long |
Application ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
business_id |
Yes |
Long |
Application ID. |
|
keyword |
No |
String |
Keyword. |
|
page_enable |
No |
Boolean |
Whether pagination is supported. |
|
page_number |
No |
Integer |
Number of records on each page. |
|
page_size |
No |
Integer |
Current page number. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
env_tags |
Array of CmdbTagEntity objects |
Environment tag list. |
|
total_count |
Integer |
Total number. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Environment tag name. |
|
business_id |
Long |
Application ID. |
|
uuid |
String |
Unique ID of an environment. |
|
descp |
String |
Description. |
|
creatorId |
Long |
Creator ID. |
|
envIdList |
Array of longs |
Environment ID list. |
|
id |
Long |
Environment tag ID. |
|
gmt_create |
String |
Creation time. |
|
gmt_modify |
String |
Update time. |
Example Requests
Query the tag list by page based on the application ID.
/v2/cmdb/tag/get-env-tag-list
{
"business_id" : "108903",
"page_enable" : true,
"page_number" : 1,
"page_size" : 10
}
Example Responses
Status code: 200
{
"env_tags" : [ {
"name" : "wulan3-performance",
"businessId" : 108903,
"uuid" : "874fc0f29d6349f89ea8a3ba94885fd4",
"id" : 220585,
"gmt_create" : "2025-01-24T12:39:42.000+00:00",
"gmt_modify" : "2025-01-24T12:39:42.000+00:00"
},{
"name" : "wulan3",
"businessId" : 108903,
"uuid" : "79fa2dc349a041e1b4ac58c89e40c31e",
"id" : 187912,
"gmt_create" : "2024-08-29T10:09:00.000+00:00",
"gmt_modify" : "2024-08-29T10:09:00.000+00:00"
} ],
"total_count" : 2
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK: The request is successful. |
|
400 |
Bad Request: Semantic or parameter error. |
|
401 |
Unauthorized: No permissions. |
|
403 |
Forbidden: Access forbidden. |
|
404 |
Not Found: The requested resource is 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