ListTags - Query a list of tags
Queries a paginated list of tags for a code repository.
|
Applicable editions |
Central edition, Region edition |
Endpoints and authorization information
-
Obtain an endpoint to replace the {domain} parameter in the request syntax.
-
Obtain the organizationId: Required only for the central edition. You can obtain the organization ID from the Basic Information page in the Tenant Management console.
|
Product |
Resource |
Required Permissions |
|
Code Management |
Tag |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/tags
Region edition
GET https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/tags
Request headers
|
Parameter |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
string |
Yes |
The personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example |
|
organizationId |
string |
path |
|
The organization ID. |
60d54f3daccf2bbd6659f3ad |
|
repositoryId |
string |
path |
Yes |
The repository ID or the URL-encoded full path of the repository. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
page |
integer |
query |
No |
The page number. Default value: 1. Maximum value: 150. |
1 |
|
perPage |
integer |
query |
No |
The number of entries per page. Default value: 20. Valid values: 1 to 100. |
20 |
|
search |
string |
query |
No |
The search keyword. |
Test Tag |
|
sort |
string |
query |
No |
The sort order. Valid values: desc (descending) and asc (ascending). Default value: desc. |
desc |
|
orderBy |
string |
query |
No |
The sort field. Valid values: name (sort by name) and create (sort by creation time). Default value: create. |
create |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/tags?page=1&perPage=20&search=Test Tag&sort=desc&orderBy=create' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/tags?page=1&perPage=20&search=Test Tag&sort=desc&orderBy=create' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
array |
||
| - |
object |
||
| commit |
object |
The commit information. |
|
|
authorEmail |
string |
The email address of the author. |
username@example.com |
|
authorName |
string |
The name of the author. |
codeup-name |
|
authoredDate |
string |
The author date of the commit. |
2024-10-05T15:30:45Z |
|
committedDate |
string |
The committer date of the commit. |
2024-10-05T15:30:45Z |
|
committerEmail |
string |
The email address of the committer. |
username@example.com |
|
committerName |
string |
The name of the committer. |
codeup-name |
|
id |
string |
The commit ID. |
de02b625ba8488f92eb204bcb3773a40c1b4ddac |
|
message |
string |
The commit message. |
Commit Message |
|
parentIds |
array[string] |
The parent commit IDs. |
["3fdaf119cf76539c1a47de0074ac02927ef4c8e1"] |
|
shortId |
string |
The abbreviated commit ID. |
de02b625 |
| stats |
object |
Line change statistics. |
|
|
additions |
integer |
The number of lines added. |
1 |
|
deletions |
integer |
The number of lines deleted. |
1 |
|
total |
integer |
The total number of lines changed. |
2 |
|
title |
string |
The title, which is the first line of the commit message. |
Commit Title |
|
webUrl |
string |
The web URL of the commit. |
http://exmaple.com/example_repo/commit/commit_sha |
|
id |
string |
The primary key ID. |
de02b625ba8488f92eb204bcb3773a40c1b4ddac |
|
message |
string |
The description of the tag. |
Description content |
|
name |
string |
The tag name. |
v1.0 |
| release |
object |
The release information. |
|
|
description |
string |
The description. |
Description content |
|
tagName |
string |
The tag name. |
v1.0 |
Response example
[
{
"commit": {
"authorEmail": "username@example.com",
"authorName": "codeup-name",
"authoredDate": "2024-10-05T15:30:45Z",
"committedDate": "2024-10-05T15:30:45Z",
"committerEmail": "username@example.com",
"committerName": "codeup-name",
"id": "de02b625ba8488f92eb204bcb3773a40c1b4ddac",
"message": "Commit Message",
"parentIds": ["3fdaf119cf76539c1a47de0074ac02927ef4c8e1"],
"shortId": "de02b625",
"stats": {
"additions": 1,
"deletions": 1,
"total": 2
},
"title": "Commit Title",
"webUrl": "http://exmaple.com/example_repo/commit/commit_sha"
},
"id": "de02b625ba8488f92eb204bcb3773a40c1b4ddac",
"message": "Description content",
"name": "v1.0",
"release": {
"description": "Description content",
"tagName": "v1.0"
}
}
]
Response headers
|
Parameter |
Description |
Example |
|
x-next-page |
The next page number. |
3 |
|
x-page |
The current page number. |
2 |
|
x-per-page |
The number of entries per page. |
20 |
|
x-prev-page |
The previous page number. |
1 |
|
x-request-id |
The request ID. |
37294673-00CA-5B8B-914F-A8B35511E90A |
|
x-total |
The total number of entries. |
50 |
|
x-total-pages |
The total number of pages. |
3 |
Error codes
For more information, see Error Code Center.