Create a Tag for a Repository
POST/api/v5/repos/:owner/:repo/tags
Request
Path Parameters
owner stringrequired
Repository space address (organization or individual's address path)
repo stringrequired
Repository path (path)
Query Parameters
access_token stringrequired
User authorization code
- application/json
Body
refsstringrequired
Start point name, default is main
tag_namestringrequired
The name of the newly created label
tag_messagestring
Tag Description, defaults to empty
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- 1
Schema
namestring
messagestring
commit object
shastring
datestring
taggernull
{
"name": "string",
"message": "string",
"commit": {
"sha": "string",
"date": "string"
}
}
Successful Example
{
"name": "tag2",
"message": "",
"commit": {
"sha": "5d165dae3b073d3e92ca91c3edcb21994361462c",
"date": "2024-04-08T13:13:33+00:00"
},
"tagger": null
}