Gitea API.

[ Version: 1.1.1 | Base URL: /api/v1 ]

This documentation describes the Gitea API.

admin

post /admin/users Create a user
delete /admin/users/{username} Delete a user
patch /admin/users/{username} Edit an existing user
post /admin/users/{username}/keys Add a public key on behalf of a user
post /admin/users/{username}/orgs Create an organization
post /admin/users/{username}/repos Create a repository on behalf a user

issue

get /repos/{owner}/{repo}/issues List a repository's issues
post /repos/{owner}/{repo}/issues Create an issue
get /repos/{owner}/{repo}/labels Get all of a repository's labels
post /repos/{owner}/{repo}/labels Create a label
get /repos/{owner}/{repo}/milestones Get all of a repository's milestones
post /repos/{owner}/{repo}/milestones Create a milestone
get /repos/{owner}/{repo}/issues/{id} Get an issue by id
patch /repos/{owner}/{repo}/issues/{id} Edit an issue
delete /repos/{owner}/{repo}/labels/{id} Delete a label
get /repos/{owner}/{repo}/labels/{id} Get a single label
patch /repos/{owner}/{repo}/labels/{id} Update a label
delete /repos/{owner}/{repo}/comments/{id} Delete a comment
patch /repos/{owner}/{repo}/comments/{id} Edit a comment
get /repos/{owner}/{repo}/issues/comments List all comments in a repository
delete /repos/{owner}/{repo}/milestones/{id} Delete a milestone
get /repos/{owner}/{repo}/milestones/{id} Get a milestone
patch /repos/{owner}/{repo}/milestones/{id} Update a milestone
delete /repos/{owner}/{repo}/issue/{index}/labels Remove all labels from an issue
post /repos/{owner}/{repo}/issue/{index}/labels Add a label to an issue
put /repos/{owner}/{repo}/issue/{index}/labels Replace an issue's labels
get /repos/{owner}/{repo}/issues/{index}/times List an issue's tracked times
post /repos/{owner}/{repo}/issues/{index}/times Add a tracked time to a issue
get /repos/{owner}/{repo}/issues/{index}/labels Get an issue's labels
get /repos/{owner}/{repo}/issue/{index}/comments List all comments on an issue
post /repos/{owner}/{repo}/issues/{index}/comments Add a comment to an issue
delete /repos/{owner}/{repo}/issue/{index}/labels/{id} Remove a label from an issue

miscellaneous

post /markdown/raw Render raw markdown as HTML
post /markdown Render a markdown document as HTML
get /version Returns the version of the Gitea application

organization

get /orgs/{org} Get an organization
patch /orgs/{org} Edit an organization
post /org/{org}/repos Create a repository in an organization
get /orgs/{org}/hooks List an organization's webhooks
get /orgs/{org}/repos List an organization's repos
get /orgs/{org}/teams List an organization's teams
post /orgs/{org}/teams Create a team
post /orgs/{org}/hooks/ Create a hook
get /orgs/{org}/members List an organization's members
delete /orgs/{org}/hooks/{id} Delete a hook
get /orgs/{org}/hooks/{id} Get a hook
patch /orgs/{org}/hooks/{id} Update a hook
get /orgs/{org}/public_members List an organization's public members
delete /orgs/{org}/members/{username} Remove a member from an organization
get /orgs/{org}/members/{username} Check if a user is a member of an organization
delete /orgs/{org}/public_members/{username} Conceal a user's membership
get /orgs/{org}/public_members/{username} Check if a user is a public member of an organization
put /orgs/{org}/public_members/{username} Publicize a user's membership
delete /teams/{id} Delete a team
get /teams/{id} Get a team
patch /teams/{id} Edit a team
get /teams/{id}/repos List a team's repos
get /teams/{id}/members List a team's members
delete /teams/{id}/members/{username} Remove a team member
put /teams/{id}/members/{username} Add a team member
delete /teams/{id}/repos/{org}/{repo} Remove a repository from a team
put /teams/{id}/repos/{org}/{repo} Add a repository to a team
get /user/orgs List the current user's organizations
get /user/{username}/orgs List a user's organizations

repository

get /repos/search Search for repositories
post /repos/migrate Migrate a remote git repository
get /repositories/{id} Get a repository by id
delete /repos/{owner}/{repo} Delete a repository
get /repos/{owner}/{repo} Get a repository
get /repos/{owner}/{repo}/keys List a repository's keys
post /repos/{owner}/{repo}/keys Add a key to a repository
get /repos/{owner}/{repo}/forks List a repository's forks
post /repos/{owner}/{repo}/forks Fork a repository
get /repos/{owner}/{repo}/hooks List the hooks in a repository
post /repos/{owner}/{repo}/hooks Create a hook
get /repos/{owner}/{repo}/pulls List a repo's pull requests
post /repos/{owner}/{repo}/pulls Create a pull request
get /repos/{owner}/{repo}/times List a repo's tracked times
get /repos/{owner}/{repo}/branches List a repository's branches
get /repos/{owner}/{repo}/releases Create a release
delete /repos/{owner}/{repo}/keys/{id} Delete a key from a repository
get /repos/{owner}/{repo}/keys/{id} Get a repository's key by id
delete /repos/{user}/{repo}/hooks/{id} Delete a hook in a repository
get /repos/{owner}/{repo}/hooks/{id} Get a hook
patch /repos/{owner}/{repo}/hooks/{id} Edit a hook in a repository
get /repos/{owner}/{repo}/stargazers List a repo's stargazers
post /repos/{owner}/{repo}/mirror-sync Sync a mirrored repository
get /repos/{owner}/{repo}/subscribers List a repo's watchers
delete /repos/{owner}/{repo}/subscription Unwatch a repo
get /repos/{owner}/{repo}/subscription Check if the current user is watching a repo
put /repos/{owner}/{repo}/subscription Watch a repo
get /repos/{owner}/{repo}/collaborators List a repository's collaborators
get /repos/{owner}/{repo}/pulls/{index} Get a pull request
patch /repos/{owner}/{repo}/pulls/{index} Update a pull request
delete /repos/{owner}/{repo}/releases/{id} Delete a release
patch /repos/{owner}/{repo}/releases/{id} Update a release
get /repos/{owner}/{repo}/raw/{filepath} Get a file from a repository
get /repos/{owner}/{repo}/statuses/{sha} Get a commit's statuses
post /repos/{owner}/{repo}/statuses/{sha} Create a commit status
get /repos/{owner}/{repo}/branches/{branch} List a repository's branches
get /repos/{owner}/{repo}/archive/{filepath} Get an archive of a repository
get /repos/{owner}/{repo}/pulls/{index}/merge Check if a pull request has been merged
post /repos/{owner}/{repo}/pulls/{index}/merge Merge a pull request
get /repos/{owner}/{repo}/commits/{ref}/statuses Get a commit's combined status, by branch/tag/commit reference
get /repos/{owner}/{repo}/editorconfig/{filepath} Get the EditorConfig definitions of a file in a repository
delete /repos/{owner}/{repo}/collaborators/{collaborator} Delete a collaborator from a repository
get /repos/{owner}/{repo}/collaborators/{collaborator} Check if a user is a collaborator of a repository
put /repos/{owner}/{repo}/collaborators/{collaborator} Add a collaborator to a repository
post /user/repos Create a repository

user

get /repos/{owner}/{repo}/times/{tracker} List a user's tracked times in a repo
get /user/keys List the authenticated user's public keys
post /user/keys Create a public key
post /user/repos Create a repository
get /user/times List the current user's tracked times
delete /user/emails Delete email addresses
get /user/emails List the authenticated user's email addresses
post /user/emails Add email addresses
get /users/search Search for users
get /user/gpg_keys List the authenticated user's GPG keys
post /user/gpg_keys Create a GPG key
get /user/followers List the authenticated user's followers
delete /user/keys/{id} Delete a public key
get /user/keys/{id} Get a public key
get /users/{username} Get a user
delete /user/gpg_keys/{id} Remove a GPG key
get /user/gpg_keys/{id} Get a GPG key
get /users/{username}/keys List the given user's public keys
get /users/{username}/repos List the repos owned by the given user
get /users/{username}/tokens List the authenticated user's access tokens
post /users/{username}/tokens Create an access token
get /users/{username}/starred The repos that the given user has starred
get /user/following/{followee} Check whether a user is followed by the authenticated user
delete /user/following/{username} Unfollow a user
put /user/following/{username} Follow a user
get /users/{username}/gpg_keys List the given user's GPG keys
get /users/{username}/followers List the given user's followers
get /users/{username}/following List the users that the given user is following
delete /user/starred/{owner}/{repo} Unstar the given repo
get /user/starred/{owner}/{repo} Whether the authenticated is starring the repo
put /user/starred/{owner}/{repo} Star the given repo
get /users/{username}/subscriptions List the repositories watched by a user
get /users/{follower}/following/{followee} Check if one user is following another user
get /user Get the authenticated user

Models

AddTimeOption Options for adding time to an issue
Branch Represents a repository branch
Comment Represents a comment on a commit or issue
CreateEmailOption Options when creating email addresses
CreateForkOption Options for creating a fork
CreateGPGKeyOption Options create user gpg key
CreateHookOption Options when create a hook
CreateIssueOption Options to create one issue
CreateKeyOption Options when creating a key
CreateLabelOption Options for creating a label
CreateMilestoneOption Options for creating a milestone
CreateOrgOption Options for creating an organization
CreatePullRequestOption Options when creating a pull request
CreateReleaseOption Options when creating a release
CreateRepoOption Options when creating repository
CreateStatusOption Holds the information needed to create a new status for a commit
CreateTeamOption Options for creating a team
CreateUserOption Create user options
DeleteEmailOption Options when deleting email addresses
DeployKey A deploy key
EditHookOption Options when modify one hook
EditIssueOption Options for editing an issue
EditLabelOption Options for editing a label
EditMilestoneOption Options for editing a milestone
EditOrgOption Options for editing an organization
EditPullRequestOption Options when modify pull request
EditReleaseOption Options when editing a release
EditTeamOption Options for editing a team
EditUserOption Edit user options
Email An email address belonging to a user
GPGKey A user gpg key to sign commit and tag in repository
GPGKeyEmail An email attached to a gpgkey
Issue Represents an issue in a repository
IssueLabelsOption A collection of labels
Label A label to an issue or a pr
MarkdownOption Markdown options
MigrateRepoForm Form for migrating repository
Milestone Milestone is a collection of issues on one repository
Organization Represents an organization
PRBranchInfo Information about a branch
PayloadCommit Represents a commit
PayloadCommitVerification Represents the gpg verification of a commit
PayloadUser Represents the author or committer of a commit
Permission Represents a set of permissions
PublicKey Publickey is a user key to push code to repository
PullRequest Represents a pull request
PullRequestMeta Pr info if an issue is a pr
Release Represents a repository release
Repository Represents a repository
SearchResults Results of a successful search
ServerVersion Wraps the version of the server
Status Holds a single status of a single commit
Team Represents a team in an organization
TrackedTime Worked time for an issue / pr
User Represents a user
WatchInfo Represents an api watch status of one repository