Adding a Tag
Function
Adding a Tag
URI
POST /v2/repositories/{repository_id}/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_id |
Yes |
Integer |
Warehouse Primary Key ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tag_name |
Yes |
String |
Tag Name |
ref |
Yes |
String |
Branch Name |
message |
No |
String |
Remarks |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
AddTagsResponse object |
Result |
status |
String |
Status code in a response |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Tag Name |
message |
String |
Remarks |
commit |
CommitRepoV2 object |
Details |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Submit the corresponding SHA ID. |
short_id |
String |
Submit the corresponding short SHA ID. |
created_at |
String |
Created |
title |
String |
Submit Title |
parent_ids |
Array of strings |
Parent Submission ID |
message |
String |
Details |
author_name |
String |
Author |
committer_name |
String |
Requester |
committed_date |
String |
Submitted |
Example Requests
POST https://{endpoint}/v2/repositories/{repository_id}/tags { "tag_name" : "test20220920", "ref" : "master", "message" : "test20220920" }
Example Responses
Status code: 200
OK
{ "result" : { "name" : "test_tag_name", "message" : "test message", "commit" : { "id" : "3b68902cf0eb7de3d5c8757e4a990bc3fe0af349", "short_id" : "3b68902c", "created_at" : "2022-03-08T03:14:39.000Z", "title" : "Creating a File", "parent_ids" : [ "08618c900a4048aae7e4cd88913d3d521eae02eb" ], "message" : "Creating a File", "author_name" : "repo", "committer_name" : "repo", "committed_date" : "2022-03-08T03:14:39.000Z" } }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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