Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
19 KiB
Querying Project Tags (a V3 API)
Function
This API is used to query project tags.
Constraints
None
URI
GET /v3/{project_id}/instances/tags
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain the token by calling the IAM API used to obtain a user token. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
offset |
No |
Integer |
Index offset. The query starts from the next piece of data indexed by this parameter. The value is 0 by default. The value must be a number but cannot be a negative number. |
limit |
No |
Integer |
Maximum records to be queried. Value range: 1 to 128 If the parameter value is not specified, 10 records are queried by default. |
Example Request
Querying project tags
GET https://ddm.eu-de.otc.t-systems.com/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/tags?limit=10&offset=0
Response
- Normal response
Parameter |
Type |
Description |
|---|---|---|
tags |
Array of ProjectTag objects |
Tag list |
offset |
Integer |
Which page the server starts returning items |
limit |
Integer |
Number of records displayed on each page |
total_count |
Integer |
Total number of records |
- Normal response example
{
"tags": [
{
"key": "11",
"values": [
"11"
]
},
{
"key": "12",
"values": [
"12"
]
}
],
"offset": 0,
"limit": 10,
"total_count": 2
}
- Abnormal response
For details, see Abnormal Request Results.
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.