跳到主要内容

Gitea API (1.26.2)

Download OpenAPI specification:Download

License: MIT

This documentation describes the Gitea API.

admin

Lists all jobs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
status
string

workflow status (pending, queued, in_progress, failure, success, skipped)

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
{
  • "jobs": [
    ],
  • "total_count": 0
}

Get all runners

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
disabled
boolean

filter by disabled status (true or false)

Responses

Response samples

Content type
application/json
{
  • "runners": [
    ],
  • "total_count": 0
}

Get a global actions runner registration token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Get a global runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
runner_id
required
string

id of the runner

Responses

Response samples

Content type
application/json
{
  • "busy": true,
  • "disabled": true,
  • "ephemeral": true,
  • "id": 0,
  • "labels": [
    ],
  • "name": "string",
  • "status": "string"
}

Delete a global runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
runner_id
required
string

id of the runner

Responses

Update a global runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
runner_id
required
string

id of the runner

Request Body schema: application/json
disabled
required
boolean

Responses

Request samples

Content type
application/json
{
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "busy": true,
  • "disabled": true,
  • "ephemeral": true,
  • "id": 0,
  • "labels": [
    ],
  • "name": "string",
  • "status": "string"
}

Lists all runs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
event
string

workflow event name

branch
string

workflow branch

status
string

workflow status (pending, queued, in_progress, failure, success, skipped)

actor
string

triggered by user

head_sha
string

triggering sha of the workflow run

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
{
  • "total_count": 0,
  • "workflow_runs": [
    ]
}

List cron tasks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Run cron task

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
task
required
string

task to run

Responses

List all emails

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search all emails

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
q
string

keyword

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List system's webhooks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

type
string
Default: "system"
Enum: "system" "default" "all"

system, default or both kinds of webhooks

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
required
active
boolean
Default: false
authorization_header
string

Authorization header to include in webhook requests

branch_filter
string

Branch filter pattern to determine which branches trigger the webhook

required
object (CreateHookOptionConfig)

CreateHookOptionConfig has all config options in it required are "content_type" and "url" Required

events
Array of strings

List of events that will trigger this webhook

name
string

Optional human-readable name for the webhook

type
required
string
Enum: "dingtalk" "discord" "gitea" "gogs" "msteams" "slack" "telegram" "feishu" "wechatwork" "packagist"

Responses

Request samples

Content type
application/json
{
  • "active": false,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "events": [
    ],
  • "name": "string",
  • "type": "dingtalk"
}

Response samples

Content type
application/json
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "name": "string",
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to get

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "name": "string",
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to delete

Responses

Update a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to update

Request Body schema: application/json
active
boolean

Whether the webhook is active and will be triggered

authorization_header
string

Authorization header to include in webhook requests

branch_filter
string

Branch filter pattern to determine which branches trigger the webhook

object

Configuration settings for the webhook

events
Array of strings

List of events that trigger this webhook

name
string

Optional human-readable name

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "events": [
    ],
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "name": "string",
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List all organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List unadopted repositories

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

pattern
string

pattern of repositories to search for

Responses

Response samples

Content type
application/json
[
  • "string"
]

Adopt unadopted files as a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Delete unadopted files

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Search users according filter conditions

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
source_id
integer <int64>

ID of the user's login source to search for

login_name
string

identifier of the user, provided by the external authenticator

page
integer

page number of results to return (1-based)

limit
integer

page size of results

sort
string

sort users by attribute. Supported values are "name", "created", "updated" and "id". Default is "name"

order
string

sort order, either "asc" (ascending) or "desc" (descending). Default is "asc", ignored if "sort" is not specified.

q
string

search term (username, full name, email)

visibility
string

visibility filter. Supported values are "public", "limited" and "private".

is_active
boolean

filter active users

is_admin
boolean

filter admin users

is_restricted
boolean

filter restricted users

is_2fa_enabled
boolean

filter 2FA enabled users

is_prohibit_login
boolean

filter login prohibited users

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
created_at
string <date-time>

For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to "now".

email
required
string <email>
full_name
string

The full display name of the user

login_name
string
Default: "empty"

identifier of the user, provided by the external authenticator (if configured)

must_change_password
boolean

Whether the user must change password on first login

password
string

The plain text password for the user

restricted
boolean

Whether the user has restricted access privileges

send_notify
boolean

Whether to send welcome notification email to the user

source_id
integer <int64>

The authentication source ID to associate with the user

username
required
string

username of the user

visibility
string

User visibility level: public, limited, or private

Responses

Request samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "email": "[email protected]",
  • "full_name": "string",
  • "login_name": "empty",
  • "must_change_password": true,
  • "password": "string",
  • "restricted": true,
  • "send_notify": true,
  • "source_id": 0,
  • "username": "string",
  • "visibility": "string"
}

Response samples

Content type
application/json
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "[email protected]",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "string",
  • "html_url": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Delete a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user to delete

query Parameters
purge
boolean

purge the user from the system completely

Responses

Edit an existing user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose data is to be edited

Request Body schema: application/json
active
boolean

Whether the user account is active

admin
boolean

Whether the user has administrator privileges

allow_create_organization
boolean

Whether the user can create organizations

allow_git_hook
boolean

Whether the user can use Git hooks

allow_import_local
boolean

Whether the user can import local repositories

description
string

The user's personal description or bio

email
string <email>
full_name
string

The full display name of the user

location
string

The user's location or address

login_name
required
string
Default: "empty"

identifier of the user, provided by the external authenticator (if configured)

max_repo_creation
integer <int64>

Maximum number of repositories the user can create

must_change_password
boolean

Whether the user must change password on next login

password
string

The plain text password for the user

prohibit_login
boolean

Whether the user is prohibited from logging in

restricted
boolean

Whether the user has restricted access privileges

source_id
required
integer <int64>
visibility
string

User visibility level: public, limited, or private

website
string

The user's personal website URL

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "admin": true,
  • "allow_create_organization": true,
  • "allow_git_hook": true,
  • "allow_import_local": true,
  • "description": "string",
  • "email": "[email protected]",
  • "full_name": "string",
  • "location": "string",
  • "login_name": "empty",
  • "max_repo_creation": 0,
  • "must_change_password": true,
  • "password": "string",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "visibility": "string",
  • "website": "string"
}

Response samples

Content type
application/json
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "[email protected]",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "string",
  • "html_url": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

List a user's badges

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose badges are to be listed

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a badge to a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user to whom a badge is to be added

Request Body schema: application/json
badge_slugs
Array of strings

Responses

Request samples

Content type
application/json
{
  • "badge_slugs": [
    ]
}

Remove a badge from a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose badge is to be deleted

Request Body schema: application/json
badge_slugs
Array of strings

Responses

Request samples

Content type
application/json
{
  • "badge_slugs": [
    ]
}

Add a public key on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user who is to receive a public key

Request Body schema: application/json
key
required
string unique

An armored SSH key to add

read_only
boolean

Describe if the key has only read access or read/write

title
required
string unique

Title of the key to add

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "read_only": true,
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "fingerprint": "string",
  • "id": 0,
  • "key": "string",
  • "key_type": "string",
  • "last_used_at": "2019-08-24T14:15:22Z",
  • "read_only": true,
  • "title": "string",
  • "url": "string",
  • "user": {
    }
}

Delete a user's public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose public key is to be deleted

id
required
integer <int64>

id of the key to delete

Responses

Create an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user who will own the created organization

Request Body schema: application/json
required
description
string

The description of the organization

email
string

The email address of the organization

full_name
string

The full display name of the organization

location
string

The location of the organization

repo_admin_change_team_access
boolean

Whether repository administrators can change team access

username
required
string

username of the organization

visibility
string
Enum: "public" "limited" "private"

possible values are public (default), limited or private

website
string

The website URL of the organization

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "location": "string",
  • "repo_admin_change_team_access": true,
  • "username": "string",
  • "visibility": "public",
  • "website": "string"
}

Response samples

Content type
application/json
{
  • "avatar_url": "string",
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "id": 0,
  • "location": "string",
  • "name": "string",
  • "repo_admin_change_team_access": true,
  • "username": "string",
  • "visibility": "string",
  • "website": "string"
}

Rename a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

current username of the user

Request Body schema: application/json
required
new_username
required
string unique

New username for this user. This name cannot be in use yet by any other user.

Responses

Request samples

Content type
application/json
{
  • "new_username": "string"
}

Create a repository on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user who will own the created repository

Request Body schema: application/json
required
auto_init
boolean

Whether the repository should be auto-initialized?

default_branch
string

DefaultBranch of the repository (used when initializes and in template)

description
string

Description of the repository to create

gitignores
string

Gitignores to use

issue_labels
string

Label-Set to use

license
string

License to use

name
required
string unique

Name of the repository to create

object_format_name
string
Enum: "sha1" "sha256"

ObjectFormatName of the underlying git repository, empty string for default (sha1)

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

trust_model
string
Enum: "default" "collaborator" "committer" "collaboratorcommitter"

TrustModel of the repository

Responses

Request samples

Content type
application/json
{
  • "auto_init": true,
  • "default_branch": "string",
  • "description": "string",
  • "gitignores": "string",
  • "issue_labels": "string",
  • "license": "string",
  • "name": "string",
  • "object_format_name": "sha1",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
application/json
{
  • "allow_fast_forward_only_merge": true,
  • "allow_manual_merge": true,
  • "allow_merge_commits": true,
  • "allow_rebase": true,
  • "allow_rebase_explicit": true,
  • "allow_rebase_update": true,
  • "allow_squash_merge": true,
  • "archived": true,
  • "archived_at": "2019-08-24T14:15:22Z",
  • "autodetect_manual_merge": true,
  • "avatar_url": "string",
  • "branch_count": 0,
  • "clone_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "default_allow_maintainer_edit": true,
  • "default_branch": "string",
  • "default_delete_branch_after_merge": true,
  • "default_merge_style": "string",
  • "default_target_branch": "string",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": true,
  • "has_code": true,
  • "has_issues": true,
  • "has_packages": true,
  • "has_projects": true,
  • "has_pull_requests": true,
  • "has_releases": true,
  • "has_wiki": true,
  • "html_url": "string",
  • "id": 0,
  • "ignore_whitespace_conflicts": true,
  • "internal": true,
  • "internal_tracker": {
    },
  • "language": "string",
  • "languages_url": "string",
  • "licenses": [
    ],
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "object_format_name": "sha1",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "projects_mode": "string",
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "topics": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

miscellaneous

Returns a list of all gitignore templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
[
  • "string"
]

Returns information about a gitignore template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "source": "string"
}

Returns a list of all label templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
[
  • "string"
]

Returns all labels in a template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a list of all license templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns information about a license template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the license

Responses

Response samples

Content type
application/json
{
  • "body": "string",
  • "implementation": "string",
  • "key": "string",
  • "name": "string",
  • "url": "string"
}

Render a markdown document as HTML

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
Context
string

URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}

in: body

Mode
string

Mode to render (markdown, comment, wiki, file)

in: body

Text
string

Text markdown to render

in: body

Wiki
boolean

Is it a wiki page? (use mode=wiki instead)

Deprecated: true in: body

Responses

Request samples

Content type
application/json
{
  • "Context": "string",
  • "Mode": "string",
  • "Text": "string",
  • "Wiki": true
}

Response samples

Content type
application/json
"string"

Render raw markdown as HTML

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: text/plain
required

Request body to render

string

Responses

Response samples

Content type
application/json
"string"

Render a markup document as HTML

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
Context
string

URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}

in: body

FilePath
string

File path for detecting extension in file mode

in: body

Mode
string

Mode to render (markdown, comment, wiki, file)

in: body

Text
string

Text markup to render

in: body

Wiki
boolean

Is it a wiki page? (use mode=wiki instead)

Deprecated: true in: body

Responses

Request samples

Content type
application/json
{
  • "Context": "string",
  • "FilePath": "string",
  • "Mode": "string",
  • "Text": "string",
  • "Wiki": true
}

Response samples

Content type
application/json
"string"

Get default signing-key.gpg

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Get default signing-key.pub

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Returns the version of the Gitea application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
{
  • "version": "string"
}

notification

List users's notification threads

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
all
boolean

If true, show notifications marked as read. Default value is false

status-types
Array of strings

Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned.

subject-type
Array of strings
Items Enum: "issue" "pull" "commit" "repository"

filter notifications by subject type

since
string <date-time>

Only show notifications updated after the given time. This is a timestamp in RFC 3339 format

before
string <date-time>

Only show notifications updated before the given time. This is a timestamp in RFC 3339 format

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mark notification threads as read, pinned or unread

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
last_read_at
string <date-time>

Describes the last point that notifications were checked. Anything updated since this time will not be updated.

all
string

If true, mark all notifications on this repo. Default value is false

status-types
Array of strings

Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.

to-status
string

Status to mark notifications as, Defaults to read.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Check if unread notifications exist

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
{
  • "new": 0
}

Get notification thread by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "pinned": true,
  • "repository": {
    },
  • "subject": {
    },
  • "unread": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Mark notification thread as read by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

query Parameters
to-status
string
Default: "read"

Status to mark notifications as

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "pinned": true,
  • "repository": {
    },
  • "subject": {
    },
  • "unread": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

List users's notification threads on a specific repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
all
boolean

If true, show notifications marked as read. Default value is false

status-types
Array of strings

Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned

subject-type
Array of strings
Items Enum: "issue" "pull" "commit" "repository"

filter notifications by subject type

since
string <date-time>

Only show notifications updated after the given time. This is a timestamp in RFC 3339 format

before
string <date-time>

Only show notifications updated before the given time. This is a timestamp in RFC 3339 format

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mark notification threads as read, pinned or unread on a specific repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
all
string

If true, mark all notifications on this repo. Default value is false

status-types
Array of strings

Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.

to-status
string

Status to mark notifications as. Defaults to read.

last_read_at
string <date-time>

Describes the last point that notifications were checked. Anything updated since this time will not be updated.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

organization

Create a repository in an organization Deprecated

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of organization

Request Body schema: application/json
auto_init
boolean

Whether the repository should be auto-initialized?

default_branch
string

DefaultBranch of the repository (used when initializes and in template)

description
string

Description of the repository to create

gitignores
string

Gitignores to use

issue_labels
string

Label-Set to use

license
string

License to use

name
required
string unique

Name of the repository to create

object_format_name
string
Enum: "sha1" "sha256"

ObjectFormatName of the underlying git repository, empty string for default (sha1)

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

trust_model
string
Enum: "default" "collaborator" "committer" "collaboratorcommitter"

TrustModel of the repository

Responses

Request samples

Content type
application/json
{
  • "auto_init": true,
  • "default_branch": "string",
  • "description": "string",
  • "gitignores": "string",
  • "issue_labels": "string",
  • "license": "string",
  • "name": "string",
  • "object_format_name": "sha1",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
application/json
{
  • "allow_fast_forward_only_merge": true,
  • "allow_manual_merge": true,
  • "allow_merge_commits": true,
  • "allow_rebase": true,
  • "allow_rebase_explicit": true,
  • "allow_rebase_update": true,
  • "allow_squash_merge": true,
  • "archived": true,
  • "archived_at": "2019-08-24T14:15:22Z",
  • "autodetect_manual_merge": true,
  • "avatar_url": "string",
  • "branch_count": 0,
  • "clone_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "default_allow_maintainer_edit": true,
  • "default_branch": "string",
  • "default_delete_branch_after_merge": true,
  • "default_merge_style": "string",
  • "default_target_branch": "string",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": true,
  • "has_code": true,
  • "has_issues": true,
  • "has_packages": true,
  • "has_projects": true,
  • "has_pull_requests": true,
  • "has_releases": true,
  • "has_wiki": true,
  • "html_url": "string",
  • "id": 0,
  • "ignore_whitespace_conflicts": true,
  • "internal": true,
  • "internal_tracker": {
    },
  • "language": "string",
  • "languages_url": "string",
  • "licenses": [
    ],
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "object_format_name": "sha1",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "projects_mode": "string",
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "topics": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Get list of organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
required
description
string

The description of the organization

email
string

The email address of the organization

full_name
string

The full display name of the organization

location
string

The location of the organization

repo_admin_change_team_access
boolean

Whether repository administrators can change team access

username
required
string

username of the organization

visibility
string
Enum: "public" "limited" "private"

possible values are public (default), limited or private

website
string

The website URL of the organization

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "location": "string",
  • "repo_admin_change_team_access": true,
  • "username": "string",
  • "visibility": "public",
  • "website": "string"
}

Response samples

Content type
application/json
{
  • "avatar_url": "string",
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "id": 0,
  • "location": "string",
  • "name": "string",
  • "repo_admin_change_team_access": true,
  • "username": "string",
  • "visibility": "string",
  • "website": "string"
}

Get an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization to get

Responses

Response samples

Content type
application/json
{
  • "avatar_url": "string",
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "id": 0,
  • "location": "string",
  • "name": "string",
  • "repo_admin_change_team_access": true,
  • "username": "string",
  • "visibility": "string",
  • "website": "string"
}

Delete an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

organization that is to be deleted

Responses

Edit an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization to edit

Request Body schema: application/json
required
description
string

The description of the organization

email
string

The email address of the organization; use empty string to clear

full_name
string

The full display name of the organization

location
string

The location of the organization

repo_admin_change_team_access
boolean

Whether repository administrators can change team access

visibility
string
Enum: "public" "limited" "private"

possible values are public, limited or private

website
string

The website URL of the organization

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "location": "string",
  • "repo_admin_change_team_access": true,
  • "visibility": "public",
  • "website": "string"
}

Response samples

Content type
application/json
{
  • "avatar_url": "string",
  • "description": "string",
  • "email": "string",
  • "full_name": "string",
  • "id": 0,
  • "location": "string",
  • "name": "string",
  • "repo_admin_change_team_access": true,
  • "username": "string",
  • "visibility": "string",
  • "website": "string"
}

Get org-level workflow jobs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
status
string

workflow status (pending, queued, in_progress, failure, success, skipped)

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
{
  • "jobs": [
    ],
  • "total_count": 0
}

Get org-level runners

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
disabled
boolean

filter by disabled status (true or false)

Responses

Response samples

Content type
application/json
{
  • "runners": [
    ],
  • "total_count": 0
}

Get an organization's actions runner registration token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Responses

Get an org-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

runner_id
required
string

id of the runner

Responses

Response samples

Content type
application/json
{
  • "busy": true,
  • "disabled": true,
  • "ephemeral": true,
  • "id": 0,
  • "labels": [
    ],
  • "name": "string",
  • "status": "string"
}

Delete an org-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

runner_id
required
string

id of the runner

Responses

Update an org-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

runner_id
required
string

id of the runner

Request Body schema: application/json
disabled
required
boolean

Responses

Request samples

Content type
application/json
{
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "busy": true,
  • "disabled": true,
  • "ephemeral": true,
  • "id": 0,
  • "labels": [
    ],
  • "name": "string",
  • "status": "string"
}

Get org-level workflow runs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
event