← 返回首页
python-gitlab/docs/gl_objects/topics.rst at feat/graphql · python-gitlab/python-gitlab · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
52 lines (31 loc) · 969 Bytes
 feat/graphql
Top

File metadata and controls

  • Preview
  • Code
  • Blame
52 lines (31 loc) · 969 Bytes

Topics

Topics can be used to categorize projects and find similar new projects.

Reference

This endpoint requires admin access for creating, updating and deleting objects.

Examples

List project topics on the GitLab instance:

topics = gl.topics.list()

Get a specific topic by its ID:

topic = gl.topics.get(topic_id)

Create a new topic:

topic = gl.topics.create({"name": "my-topic", "title": "my title"})

Update a topic:

topic.description = "My new topic" topic.save() # or gl.topics.update(topic_id, {"description": "My new topic"})

Delete a topic:

topic.delete() # or gl.topics.delete(topic_id)

Merge a source topic into a target topic:

gl.topics.merge(topic_id, target_topic_id)

Footer

© 2026 GitHub, Inc.