跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 25.6.2, which is no longer the latest release. See the latest release.

Replace list of topics for a repository

PUT
/repos/{owner}/{repo}/topics
curl --request PUT \
--url https://gitea.example.com/api/v1/repos/example/example/topics \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "topics": [ "example" ] }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

RepoTopicOptions a collection of repo topic names

object
topics

List of topic names

Array<string>
Examplegenerated
{
"topics": [
"example"
]
}

APIEmpty is an empty response

Media typeapplication/json

APINotFound is a not found empty response

Media typeapplication/json

APIInvalidTopicsError is error format response to invalid topics

Media typeapplication/json
invalidTopics
Array<string>
message
string