Querying Tags
Function
This API is used to query the tag list.
Calling Method
For details, see Calling APIs.
URI
GET /v1/code/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
scm_type |
Yes |
String |
Definition Code source type. Constraints N/A. Range codehub, repo, or github. Default Value N/A. |
repo_id |
No |
String |
Definition Code repository ID. It is mandatory when CodeArts Repo (codehub) is used as the code source. Constraints N/A. Range N/A. Default Value N/A. |
search |
No |
String |
Definition Filter criteria. Constraints N/A. Range N/A. Default Value N/A. |
page_no |
No |
Integer |
Definition The index of the page to start the query from. Constraints The value is a positive integer. Range The value of page_no is at least 1. |
page_size |
No |
Integer |
Definition Number of items displayed on each page. Constraints The value is a positive integer. Range The value of page_size is no more than 100. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition User token. (The value of the X-Subject-Token response header is the user token.) It is obtained by calling the IAM API. For details, see Obtaining an IAM User Token. Constraints Global tenant tokens are not supported. Use a region-level token whose scope is project. Range N/A. Default Value N/A. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
Object |
Definition Data returned after the API is successfully called. Range N/A. |
status |
String |
Definition Returned status information. Range ● success: The API call is successful. ● fail: The API call failed. |
Parameter |
Type |
Description |
---|---|---|
total |
String |
Definition Total number of tags found. Range N/A. |
tag_list |
Array of tag_list objects |
Definition A collection of tags. Range N/A. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
GET https://{endpoint}/v1/code/tags?repo_id=2111668884&search=&scm_type=codehub&page_no=1
Example Responses
Status code: 200
OK
{ "result" : { "total" : 2, "tag_list" : [ { "name" : 1 } ] }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
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