跳到主要内容

Gitea API (1.22-dev)

Download OpenAPI specification:Download

License: MIT

This documentation describes the Gitea API.

activitypub

Returns the Person actor for a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
user-id
required
integer

user ID of the user

Responses

Response samples

Content type
{
  • "@context": "string"
}

Send to the inbox

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
user-id
required
integer

user ID of the user

Responses

admin

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
[
  • {
    }
]

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
[
  • {
    }
]

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
[
  • {
    }
]

List system's webhooks

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
[
  • {
    }
]

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
required
active
boolean
Default: false
authorization_header
string
branch_filter
string
required
object (CreateHookOptionConfig)

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

events
Array of strings
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": [
    ],
  • "type": "dingtalk"
}

Response samples

Content type
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "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
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "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
authorization_header
string
branch_filter
string
object
events
Array of strings

Responses

Request samples

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

Response samples

Content type
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "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
[
  • {
    }
]

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
[
  • "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

user's login name to search for

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

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
login_name
string
must_change_password
boolean
password
required
string
restricted
boolean
send_notify
boolean
source_id
integer <int64>
username
required
string
visibility
string

Responses

Request samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "email": "user@example.com",
  • "full_name": "string",
  • "login_name": "string",
  • "must_change_password": true,
  • "password": "string",
  • "restricted": true,
  • "send_notify": true,
  • "source_id": 0,
  • "username": "string",
  • "visibility": "string"
}

Response samples

Content type
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "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,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Delete a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of 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 user to edit

Request Body schema: application/json
active
boolean
admin
boolean
allow_create_organization
boolean
allow_git_hook
boolean
allow_import_local
boolean
description
string
email
string <email>
full_name
string
location
string
login_name
required
string
max_repo_creation
integer <int64>
must_change_password
boolean
password
string
prohibit_login
boolean
restricted
boolean
source_id
required
integer <int64>
visibility
string
website
string

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": "user@example.com",
  • "full_name": "string",
  • "location": "string",
  • "login_name": "string",
  • "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
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "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,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Add a public key on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user

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
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "fingerprint": "string",
  • "id": 0,
  • "key": "string",
  • "key_type": "string",
  • "read_only": true,
  • "title": "string",
  • "url": "string",
  • "user": {
    }
}

Delete a user's public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

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 that will own the created organization

Request Body schema: application/json
required
description
string
email
string
full_name
string
location
string
repo_admin_change_team_access
boolean
username
required
string
visibility
string
Enum: "public" "limited" "private"

possible values are public (default), limited or private

website
string

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
{
  • "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

existing username of user

Request Body schema:
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
{
  • "new_username": "string"
}

Create a repository on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user. This user 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

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",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "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
[
  • "string"
]

Returns information about a gitignore template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

Content type
{
  • "name": "string",
  • "source": "string"
}

Returns a list of all label templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • "string"
]

Returns all labels in a template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

Content type
[
  • {
    }
]

Returns a list of all license templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • {
    }
]

Returns information about a license template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the license

Responses

Response samples

Content type
{
  • "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

Context to render

in: body

Mode
string

Mode to render (comment, gfm, markdown)

in: body

Text
string

Text markdown to render

in: body

Wiki
boolean

Is it a wiki page ?

in: body

Responses

Request samples

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

Response samples

Content type
"string"

Render raw markdown as HTML

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: text/plain
required

Request body to render

string

Responses

Response samples

Content type
"string"

Render a markup document as HTML

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

Context to render

in: body

FilePath
string

File path for detecting extension in file mode

in: body

Mode
string

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

in: body

Text
string

Text markup to render

in: body

Wiki
boolean

Is it a wiki page ?

in: body

Responses

Request samples

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

Response samples

Content type
"string"

Returns the nodeinfo of the Gitea application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "metadata": { },
  • "openRegistrations": true,
  • "protocols": [
    ],
  • "services": {
    },
  • "software": {
    },
  • "usage": {
    },
  • "version": "string"
}

Get default signing-key.gpg

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Returns the version of the Gitea application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "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
[
  • {
    }
]

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
[
  • {
    }
]

Check if unread notifications exist

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "new": 0
}

Get notification thread by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

Responses

Response samples

Content type
{
  • "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
{
  • "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
[
  • {
    }
]

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
[
  • {
    }
]

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

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",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "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
[
  • {
    }
]

Create an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
required
description
string
email
string
full_name
string
location
string
repo_admin_change_team_access
boolean
username
required
string
visibility
string
Enum: "public" "limited" "private"

possible values are public (default), limited or private

website
string

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
{
  • "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
{
  • "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
email
string
full_name
string
location
string
repo_admin_change_team_access
boolean
visibility
string
Enum: "public" "limited" "private"

possible values are public, limited or private

website
string

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
{
  • "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"
}

List an organization's actions secrets

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create or Update a secret value in an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of organization

secretname
required
string

name of the secret

Request Body schema: application/json
data
required
string

Data of the secret to update

Responses

Request samples

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

Delete a secret in an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of organization

secretname
required
string

name of the secret

Responses

List an organization's activity feeds

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the org

query Parameters
date
string <date>

the date of the activities to be found

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Update Avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema:
image
string

image must be base64 encoded

Responses

Request samples

Content type
{
  • "image": "string"
}

Delete Avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Responses

List an organization's webhooks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
required
active
boolean
Default: false
authorization_header
string
branch_filter
string
required
object (CreateHookOptionConfig)

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

events
Array of strings
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": [
    ],
  • "type": "dingtalk"
}

Response samples

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

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to get

Responses

Response samples

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

Delete a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to delete

Responses

Update a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to update

Request Body schema: application/json
active
boolean
authorization_header
string
branch_filter
string
object
events
Array of strings

Responses

Request samples

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

Response samples

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

List an organization's labels

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a label for an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
color
required
string
description
string
exclusive
boolean
is_archived
boolean
name
required
string

Responses

Request samples

Content type
application/json
{
  • "color": "#00aabb",
  • "description": "string",
  • "exclusive": false,
  • "is_archived": false,
  • "name": "string"
}

Response samples

Content type
{
  • "color": "00aabb",
  • "description": "string",
  • "exclusive": false,
  • "id": 0,
  • "is_archived": false,
  • "name": "string",
  • "url": "string"
}

Get a single label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the label to get

Responses

Response samples

Content type
{
  • "color": "00aabb",
  • "description": "string",
  • "exclusive": false,
  • "id": 0,
  • "is_archived": false,
  • "name": "string",
  • "url": "string"
}

Delete a label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the label to delete

Responses

Update a label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the label to edit

Request Body schema: application/json
color
string
description
string
exclusive
boolean
is_archived
boolean
name
string

Responses

Request samples

Content type
application/json
{
  • "color": "#00aabb",
  • "description": "string",
  • "exclusive": false,
  • "is_archived": false,
  • "name": "string"
}

Response samples

Content type
{
  • "color": "00aabb",
  • "description": "string",
  • "exclusive": false,
  • "id": 0,
  • "is_archived": false,
  • "name": "string",
  • "url": "string"
}

List an organization's members

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if a user is a member of an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user

Responses

Remove a member from an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user

Responses

List an organization's public members

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if a user is a public member of an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user

Responses

Publicize a user's membership

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user

Responses

Conceal a user's membership

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user

Responses

List an organization's repos

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a repository in an organization

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

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",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

List an organization's teams

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
can_create_org_repo
boolean
description
string
includes_all_repositories
boolean
name
required
string
permission
string
Enum: "read" "write" "admin"
units
Array of strings
object

Responses

Request samples

Content type
application/json
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "includes_all_repositories": true,
  • "name": "string",
  • "permission": "read",
  • "units": [
    ],
  • "units_map": "{\"repo.actions\",\"repo.packages\",\"repo.code\":\"read\",\"repo.issues\":\"write\",\"repo.ext_issues\":\"none\",\"repo.wiki\":\"admin\",\"repo.pulls\":\"owner\",\"repo.releases\":\"none\",\"repo.projects\":\"none\",\"repo.ext_wiki\":\"none\"}"
}

Response samples

Content type
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "id": 0,
  • "includes_all_repositories": true,
  • "name": "string",
  • "organization": {
    },
  • "permission": "none",
  • "units": [
    ],
  • "units_map": {
    }
}

Search for teams within an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
q
string

keywords to search

include_desc
boolean

include search within team description (defaults to true)

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "ok": true
}

Get a team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team to get

Responses

Response samples

Content type
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "id": 0,
  • "includes_all_repositories": true,
  • "name": "string",
  • "organization": {
    },
  • "permission": "none",
  • "units": [
    ],
  • "units_map": {
    }
}

Delete a team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team to delete

Responses

Edit a team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer

id of the team to edit

Request Body schema: application/json
can_create_org_repo
boolean
description
string
includes_all_repositories
boolean
name
required
string
permission
string
Enum: "read" "write" "admin"
units
Array of strings
object

Responses

Request samples

Content type
application/json
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "includes_all_repositories": true,
  • "name": "string",
  • "permission": "read",
  • "units": [
    ],
  • "units_map": {
    }
}

Response samples

Content type
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "id": 0,
  • "includes_all_repositories": true,
  • "name": "string",
  • "organization": {
    },
  • "permission": "none",
  • "units": [
    ],
  • "units_map": {
    }
}

List a team's activity feeds

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

query Parameters
date
string <date>

the date of the activities to be found

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List a team's members

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List a particular member of team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

username
required
string

username of the member to list

Responses

Response samples

Content type
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "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,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Add a team member

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

username
required
string

username of the user to add

Responses

Remove a team member

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

username
required
string

username of the user to remove

Responses

List a team's repos

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List a particular repo of team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

org
required
string

organization that owns the repo to list

repo
required
string

name of the repo to list

Responses

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Add a repository to a team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

org
required
string

organization that owns the repo to add

repo
required
string

name of the repo to add

Responses

Remove a repository from a team

This does not delete the repository, it only removes the repository from the team.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

org
required
string

organization that owns the repo to remove

repo
required
string

name of the repo to remove

Responses

List the current user's 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
[
  • {
    }
]

List a user's organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Get user permissions in organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

org
required
string

name of the organization

Responses

Response samples

Content type
{
  • "can_create_repository": true,
  • "can_read": true,
  • "can_write": true,
  • "is_admin": true,
  • "is_owner": true
}

package

Gets all packages of an owner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the packages

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

type
string
Enum: "alpine" "cargo" "chef" "composer" "conan" "conda" "container" "cran" "debian" "generic" "go" "helm" "maven" "npm" "nuget" "pub" "pypi" "rpm" "rubygems" "swift" "vagrant"

package type filter

q
string

name filter

Responses

Response samples

Content type
[
  • {
    }
]

Gets a package

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the package

type
required
string

type of the package

name
required
string

name of the package

version
required
string

version of the package

Responses

Response samples

Content type
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "owner": {
    },
  • "repository": {
    },
  • "type": "string",
  • "version": "string"
}

Delete a package

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the package

type
required
string

type of the package

name
required
string

name of the package

version
required
string

version of the package

Responses

Gets all files of a package

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the package

type
required
string

type of the package

name
required
string

name of the package

version
required
string

version of the package

Responses

Response samples

Content type
[
  • {
    }
]

issue

Search for issues across the repositories that the user has access to

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
state
string

whether issue is open or closed

labels
string

comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded

milestones
string

comma separated list of milestone names. Fetch only issues that have any of this milestones. Non existent are discarded

q
string

search string

priority_repo_id
integer <int64>

repository to prioritize in the results

type
string

filter by type (issues / pulls) if set

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

assigned
boolean

filter (issues / pulls) assigned to you, default is false

created
boolean

filter (issues / pulls) created by you, default is false

mentioned
boolean

filter (issues / pulls) mentioning you, default is false

review_requested
boolean

filter pulls requesting your review, default is false

reviewed
boolean

filter pulls reviewed by you, default is false

owner
string

filter by owner

team
string

filter by team (requires organization owner parameter to be provided)

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List a repository's issues

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
state
string
Enum: "closed" "open" "all"

whether issue is open or closed

labels
string

comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded

q
string

search string

type
string
Enum: "issues" "pulls"

filter by type (issues / pulls) if set

milestones
string

comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded

since
string <date-time>

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

before
string <date-time>

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

created_by
string

Only show items which were created by the the given user

assigned_by
string

Only show items for which the given user is assigned

mentioned_by
string

Only show items in which the given user was mentioned

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create an issue. If using deadline only the date will be taken into account, and time of day ignored.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
assignee
string

deprecated

assignees
Array of strings
body
string
closed
boolean
due_date
string <date-time>
labels
Array of integers <int64> [ items <int64 > ]

list of label ids

milestone
integer <int64>

milestone id

ref
string
title
required
string

Responses

Request samples

Content type
application/json
{
  • "assignee": "string",
  • "assignees": [
    ],
  • "body": "string",
  • "closed": true,
  • "due_date": "2019-08-24T14:15:22Z",
  • "labels": [
    ],
  • "milestone": 0,
  • "ref": "string",
  • "title": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

List all comments in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
since
string <date-time>

if provided, only comments updated since the provided time are returned.

before
string <date-time>

if provided, only comments updated before the provided time are returned.

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Get a comment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment

Responses

Response samples

Content type
{
  • "assets": [
    ],
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "issue_url": "string",
  • "original_author": "string",
  • "original_author_id": 0,
  • "pull_request_url": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Delete a comment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of comment to delete

Responses

Edit a comment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment to edit

Request Body schema: application/json
body
required
string

Responses

Request samples

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

Response samples

Content type
{
  • "assets": [
    ],
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "issue_url": "string",
  • "original_author": "string",
  • "original_author_id": 0,
  • "pull_request_url": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

List comment's attachments

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment

Responses

Response samples

Content type
[
  • {
    }
]

Create a comment attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment

query Parameters
name
string

name of the attachment

Request Body schema: multipart/form-data
required
attachment
required
string <binary>

attachment to upload

Responses

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Get a comment attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment

attachment_id
required
integer <int64>

id of the attachment to get

Responses

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Delete a comment attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment

attachment_id
required
integer <int64>

id of the attachment to delete

Responses

Edit a comment attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment

attachment_id
required
integer <int64>

id of the attachment to edit

Request Body schema: application/json
name
string

Responses

Request samples

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

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Get a list of reactions from a comment of an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment to edit

Responses

Response samples

Content type
[
  • {
    }
]

Add a reaction to a comment of an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment to edit

Request Body schema: application/json
content
string

Responses

Request samples

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

Response samples

Content type
{
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Remove a reaction from a comment of an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the comment to edit

Request Body schema: application/json
content
string

Responses

Request samples

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

Get an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to get

Responses

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Delete an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of issue to delete

Responses

Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to edit

Request Body schema: application/json
assignee
string

deprecated

assignees
Array of strings
body
string
due_date
string <date-time>
milestone
integer <int64>
ref
string
state
string
title
string
unset_due_date
boolean

Responses

Request samples

Content type
application/json
{
  • "assignee": "string",
  • "assignees": [
    ],
  • "body": "string",
  • "due_date": "2019-08-24T14:15:22Z",
  • "milestone": 0,
  • "ref": "string",
  • "state": "string",
  • "title": "string",
  • "unset_due_date": true
}

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

List issue's attachments

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Responses

Response samples

Content type
[
  • {
    }
]

Create an issue attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

query Parameters
name
string

name of the attachment

Request Body schema: multipart/form-data
required
attachment
required
string <binary>

attachment to upload

Responses

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Get an issue attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

attachment_id
required
integer <int64>

id of the attachment to get

Responses

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Delete an issue attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

attachment_id
required
integer <int64>

id of the attachment to delete

Responses

Edit an issue attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

attachment_id
required
integer <int64>

id of the attachment to edit

Request Body schema: application/json
name
string

Responses

Request samples

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

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

List issues that are blocked by this issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
string

index of the issue

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Block the issue given in the body by the issue in path

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
string

index of the issue

Request Body schema:
index
integer <int64>
owner
string
repo
string

Responses

Request samples

Content type
{
  • "index": 0,
  • "owner": "string",
  • "repo": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Unblock the issue given in the body by the issue in path

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
string

index of the issue

Request Body schema:
index
integer <int64>
owner
string
repo
string

Responses

Request samples

Content type
{
  • "index": 0,
  • "owner": "string",
  • "repo": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

List all comments on an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

query Parameters
since
string <date-time>

if provided, only comments updated since the specified time are returned.

before
string <date-time>

if provided, only comments updated before the provided time are returned.

Responses

Response samples

Content type
[
  • {
    }
]

Add a comment to an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Request Body schema: application/json
body
required
string

Responses

Request samples

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

Response samples

Content type
{
  • "assets": [
    ],
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "issue_url": "string",
  • "original_author": "string",
  • "original_author_id": 0,
  • "pull_request_url": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Delete a comment Deprecated

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer

this parameter is ignored

id
required
integer <int64>

id of comment to delete

Responses

Edit a comment Deprecated

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer

this parameter is ignored

id
required
integer <int64>

id of the comment to edit

Request Body schema: application/json
body
required
string

Responses

Request samples

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

Response samples

Content type
{
  • "assets": [
    ],
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "issue_url": "string",
  • "original_author": "string",
  • "original_author_id": 0,
  • "pull_request_url": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to create or update a deadline on

Request Body schema: application/json
due_date
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "due_date": "2019-08-24T14:15:22Z"
}

Response samples

Content type
{
  • "due_date": "2019-08-24T14:15:22Z"
}

List an issue's dependencies, i.e all issues that block this issue.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
string

index of the issue

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Make the issue in the url depend on the issue in the form.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
string

index of the issue

Request Body schema:
index
integer <int64>
owner
string
repo
string

Responses

Request samples

Content type
{
  • "index": 0,
  • "owner": "string",
  • "repo": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Remove an issue dependency

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
string

index of the issue

Request Body schema:
index
integer <int64>
owner
string
repo
string

Responses

Request samples

Content type
{
  • "index": 0,
  • "owner": "string",
  • "repo": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "due_date": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "milestone": {
    },
  • "number": 0,
  • "original_author": "string",
  • "original_author_id": 0,
  • "pin_order": 0,
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Get an issue's labels

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Responses

Response samples

Content type
[
  • {
    }
]

Replace an issue's labels

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Request Body schema: application/json
labels
Array of integers <int64> [ items <int64 > ]

list of label IDs

Responses

Request samples

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

Response samples

Content type
[
  • {
    }
]

Add a label to an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Request Body schema: application/json
labels
Array of integers <int64> [ items <int64 > ]

list of label IDs

Responses

Request samples

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

Response samples

Content type
[
  • {
    }
]

Remove all labels from an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Responses

Remove a label from an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

id
required
integer <int64>

id of the label to remove

Responses

Pin an Issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of issue to pin

Responses

Unpin an Issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of issue to unpin

Responses

Moves the Pin to the given Position

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of issue

position
required
integer <int64>

the new position

Responses

Get a list reactions of an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Add a reaction to an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Request Body schema: application/json
content
string

Responses

Request samples

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

Response samples

Content type
{
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Remove a reaction from an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Request Body schema: application/json
content
string

Responses

Request samples

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

Delete an issue's existing stopwatch.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to stop the stopwatch on

Responses

Start stopwatch on an issue.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to create the stopwatch on

Responses

Stop an issue's existing stopwatch.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to stop the stopwatch on

Responses

Get users who subscribed on an issue.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if user is subscribed to an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Responses

Response samples

Content type
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "ignored": true,
  • "reason": null,
  • "repository_url": "string",
  • "subscribed": true,
  • "url": "string"
}

Subscribe user to issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

user
required
string

user to subscribe

Responses

Unsubscribe user from issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

user
required
string

user witch unsubscribe

Responses

List all comments and events on an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

query Parameters
since
string <date-time>

if provided, only comments updated since the specified time are returned.

page
integer

page number of results to return (1-based)

limit
integer

page size of results

before
string <date-time>

if provided, only comments updated before the provided time are returned.

Responses

Response samples

Content type
[
  • {
    }
]

List an issue's tracked times

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

query Parameters
user
string

optional filter by user (available for issue managers)

since
string <date-time>

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

before
string <date-time>

Only show times 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
[
  • {
    }
]

Add tracked time to a issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

Request Body schema: application/json
created
string <date-time>
time
required
integer <int64>

time in seconds

user_name
string

User who spent the time (optional)

Responses

Request samples

Content type
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "time": 0,
  • "user_name": "string"
}

Response samples

Content type
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "issue": {
    },
  • "issue_id": 0,
  • "time": 0,
  • "user_id": 0,
  • "user_name": "string"
}

Reset a tracked time of an issue

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue to add tracked time to

Responses

Delete specific tracked time

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the issue

id
required
integer <int64>

id of time to delete

Responses

Get all of a repository's labels

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
color
required
string
description
string
exclusive
boolean
is_archived
boolean
name
required
string

Responses

Request samples

Content type
application/json
{
  • "color": "#00aabb",
  • "description": "string",
  • "exclusive": false,
  • "is_archived": false,
  • "name": "string"
}

Response samples

Content type
{
  • "color": "00aabb",
  • "description": "string",
  • "exclusive": false,
  • "id": 0,
  • "is_archived": false,
  • "name": "string",
  • "url": "string"
}

Get a single label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the label to get

Responses

Response samples

Content type
{
  • "color": "00aabb",
  • "description": "string",
  • "exclusive": false,
  • "id": 0,
  • "is_archived": false,
  • "name": "string",
  • "url": "string"
}

Delete a label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the label to delete

Responses

Update a label

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the label to edit

Request Body schema: application/json
color
string
description
string
exclusive
boolean
is_archived
boolean
name
string

Responses

Request samples

Content type
application/json
{
  • "color": "#00aabb",
  • "description": "string",
  • "exclusive": false,
  • "is_archived": false,
  • "name": "string"
}

Response samples

Content type
{
  • "color": "00aabb",
  • "description": "string",
  • "exclusive": false,
  • "id": 0,
  • "is_archived": false,
  • "name": "string",
  • "url": "string"
}

Get all of a repository's opened milestones

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
state
string

Milestone state, Recognized values are open, closed and all. Defaults to "open"

name
string

filter by milestone name

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a milestone

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
description
string
due_on
string <date-time>
state
string
Enum: "open" "closed"
title
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "due_on": "2019-08-24T14:15:22Z",
  • "state": "open",
  • "title": "string"
}

Response samples

Content type
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "closed_issues": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "due_on": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "open_issues": 0,
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a milestone

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
string

the milestone to get, identified by ID and if not available by name

Responses

Response samples

Content type
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "closed_issues": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "due_on": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "open_issues": 0,
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a milestone

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
string

the milestone to delete, identified by ID and if not available by name

Responses

Update a milestone

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
string

the milestone to edit, identified by ID and if not available by name

Request Body schema: application/json
description
string
due_on
string <date-time>
state
string
title
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "due_on": "2019-08-24T14:15:22Z",
  • "state": "string",
  • "title": "string"
}

Response samples

Content type
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "closed_issues": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "due_on": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "open_issues": 0,
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

repository

Migrate a remote git repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
auth_password
string
auth_token
string
auth_username
string
clone_addr
required
string
description
string
issues
boolean
labels
boolean
lfs
boolean
lfs_endpoint
string
milestones
boolean
mirror
boolean
mirror_interval
string
private
boolean
pull_requests
boolean
releases
boolean
repo_name
required
string
repo_owner
string

Name of User or Organisation who will own Repo after migration

service
string
Enum: "git" "github" "gitea" "gitlab" "gogs" "onedev" "gitbucket" "codebase"
uid
integer <int64>

deprecated (only for backwards compatibility)

wiki
boolean

Responses

Request samples

Content type
application/json
{
  • "auth_password": "string",
  • "auth_token": "string",
  • "auth_username": "string",
  • "clone_addr": "string",
  • "description": "string",
  • "issues": true,
  • "labels": true,
  • "lfs": true,
  • "lfs_endpoint": "string",
  • "milestones": true,
  • "mirror": true,
  • "mirror_interval": "string",
  • "private": true,
  • "pull_requests": true,
  • "releases": true,
  • "repo_name": "string",
  • "repo_owner": "string",
  • "service": "git",
  • "uid": 0,
  • "wiki": true
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Search for repositories

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
q
string

keyword

topic
boolean

Limit search to repositories with keyword as topic

includeDesc
boolean

include search of keyword within repository description

uid
integer <int64>

search only for repos that the user with the given id owns or contributes to

priority_owner_id
integer <int64>

repo owner to prioritize in the results

team_id
integer <int64>

search only for repos that belong to the given team id

starredBy
integer <int64>

search only for repos that the user with the given id has starred

private
boolean

include private repositories this user has access to (defaults to true)

is_private
boolean

show only pubic, private or all repositories (defaults to all)

template
boolean

include template repositories this user has access to (defaults to true)

archived
boolean

show only archived, non-archived or all repositories (defaults to all)

mode
string

type of repository to search for. Supported values are "fork", "source", "mirror" and "collaborative"

exclusive
boolean

if uid is given, search only for repos that the user owns

sort
string

sort repos by attribute. Supported values are "alpha", "created", "updated", "size", and "id". Default is "alpha"

order
string

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "ok": true
}

Get a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Delete a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to delete

repo
required
string

name of the repo to delete

Responses

Edit a repository's properties. Only fields that are set will be changed.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to edit

repo
required
string

name of the repo to edit

Request Body schema:

Properties of a repo that you can edit

allow_manual_merge
boolean

either true to allow mark pr as merged manually, or false to prevent it.

allow_merge_commits
boolean

either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.

allow_rebase
boolean

either true to allow rebase-merging pull requests, or false to prevent rebase-merging.

allow_rebase_explicit
boolean

either true to allow rebase with explicit merge commits (--no-ff), or false to prevent rebase with explicit merge commits.

allow_rebase_update
boolean

either true to allow updating pull request branch by rebase, or false to prevent it.

allow_squash_merge
boolean

either true to allow squash-merging pull requests, or false to prevent squash-merging.

archived
boolean

set to true to archive this repository.

autodetect_manual_merge
boolean

either true to enable AutodetectManualMerge, or false to prevent it. Note: In some special cases, misjudgments can occur.

default_allow_maintainer_edit
boolean

set to true to allow edits from maintainers by default

default_branch
string

sets the default branch for this repository.

default_delete_branch_after_merge
boolean

set to true to delete pr branch after merge by default

default_merge_style
string

set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", or "squash".

description
string

a short description of the repository.

enable_prune
boolean

enable prune - remove obsolete remote-tracking references

object (ExternalTracker)

ExternalTracker represents settings for external tracker

object (ExternalWiki)

ExternalWiki represents setting for external wiki

has_actions
boolean

either true to enable actions unit, or false to disable them.

has_issues
boolean

either true to enable issues for this repository or false to disable them.

has_packages
boolean

either true to enable packages unit, or false to disable them.

has_projects
boolean

either true to enable project unit, or false to disable them.

has_pull_requests
boolean

either true to allow pull requests, or false to prevent pull request.

has_releases
boolean

either true to enable releases unit, or false to disable them.

has_wiki
boolean

either true to enable the wiki for this repository or false to disable it.

ignore_whitespace_conflicts
boolean

either true to ignore whitespace for conflicts, or false to not ignore whitespace.

object (InternalTracker)

InternalTracker represents settings for internal tracker

mirror_interval
string

set to a string like 8h30m0s to set the mirror interval time

name
string unique

name of the repository

private
boolean

either true to make the repository private or false to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.

template
boolean

either true to make this repository a template or false to make it a normal repository

website
string

a URL with more information about the repository.

Responses

Request samples

Content type
{
  • "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,
  • "autodetect_manual_merge": true,
  • "default_allow_maintainer_edit": true,
  • "default_branch": "string",
  • "default_delete_branch_after_merge": true,
  • "default_merge_style": "string",
  • "description": "string",
  • "enable_prune": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "has_actions": true,
  • "has_issues": true,
  • "has_packages": true,
  • "has_projects": true,
  • "has_pull_requests": true,
  • "has_releases": true,
  • "has_wiki": true,
  • "ignore_whitespace_conflicts": true,
  • "internal_tracker": {
    },
  • "mirror_interval": "string",
  • "name": "string",
  • "private": true,
  • "template": true,
  • "website": "string"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Create or Update a secret value in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repository

repo
required
string

name of the repository

secretname
required
string

name of the secret

Request Body schema: application/json
data
required
string

Data of the secret to update

Responses

Request samples

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

Delete a secret in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repository

repo
required
string

name of the repository

secretname
required
string

name of the secret

Responses

List a repository's activity feeds

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
date
string <date>

the date of the activities to be found

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Get an archive of a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

archive
required
string

the git reference for download with attached archive format (e.g. master.zip)

Responses

Return all users that have write access and can be assigned to issues

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Update avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema:
image
string

image must be base64 encoded

Responses

Request samples

Content type
{
  • "image": "string"
}

Delete avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

List branch protections for a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Create a branch protections for a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
approvals_whitelist_teams
Array of strings
approvals_whitelist_username
Array of strings
block_on_official_review_requests
boolean
block_on_outdated_branch
boolean
block_on_rejected_reviews
boolean
branch_name
string

Deprecated: true

dismiss_stale_approvals
boolean
enable_approvals_whitelist
boolean
enable_merge_whitelist
boolean
enable_push
boolean
enable_push_whitelist
boolean
enable_status_check
boolean
merge_whitelist_teams
Array of strings
merge_whitelist_usernames
Array of strings
protected_file_patterns
string
push_whitelist_deploy_keys
boolean
push_whitelist_teams
Array of strings
push_whitelist_usernames
Array of strings
require_signed_commits
boolean
required_approvals
integer <int64>
rule_name
string
status_check_contexts
Array of strings
unprotected_file_patterns
string

Responses

Request samples

Content type
application/json
{
  • "approvals_whitelist_teams": [
    ],
  • "approvals_whitelist_username": [
    ],
  • "block_on_official_review_requests": true,
  • "block_on_outdated_branch": true,
  • "block_on_rejected_reviews": true,
  • "branch_name": "string",
  • "dismiss_stale_approvals": true,
  • "enable_approvals_whitelist": true,
  • "enable_merge_whitelist": true,
  • "enable_push": true,
  • "enable_push_whitelist": true,
  • "enable_status_check": true,
  • "merge_whitelist_teams": [
    ],
  • "merge_whitelist_usernames": [
    ],
  • "protected_file_patterns": "string",
  • "push_whitelist_deploy_keys": true,
  • "push_whitelist_teams": [
    ],
  • "push_whitelist_usernames": [
    ],
  • "require_signed_commits": true,
  • "required_approvals": 0,
  • "rule_name": "string",
  • "status_check_contexts": [
    ],
  • "unprotected_file_patterns": "string"
}

Response samples

Content type
{
  • "approvals_whitelist_teams": [
    ],
  • "approvals_whitelist_username": [
    ],
  • "block_on_official_review_requests": true,
  • "block_on_outdated_branch": true,
  • "block_on_rejected_reviews": true,
  • "branch_name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "dismiss_stale_approvals": true,
  • "enable_approvals_whitelist": true,
  • "enable_merge_whitelist": true,
  • "enable_push": true,
  • "enable_push_whitelist": true,
  • "enable_status_check": true,
  • "merge_whitelist_teams": [
    ],
  • "merge_whitelist_usernames": [
    ],
  • "protected_file_patterns": "string",
  • "push_whitelist_deploy_keys": true,
  • "push_whitelist_teams": [
    ],
  • "push_whitelist_usernames": [
    ],
  • "require_signed_commits": true,
  • "required_approvals": 0,
  • "rule_name": "string",
  • "status_check_contexts": [
    ],
  • "unprotected_file_patterns": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a specific branch protection for the repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

name
required
string

name of protected branch

Responses

Response samples

Content type
{
  • "approvals_whitelist_teams": [
    ],
  • "approvals_whitelist_username": [
    ],
  • "block_on_official_review_requests": true,
  • "block_on_outdated_branch": true,
  • "block_on_rejected_reviews": true,
  • "branch_name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "dismiss_stale_approvals": true,
  • "enable_approvals_whitelist": true,
  • "enable_merge_whitelist": true,
  • "enable_push": true,
  • "enable_push_whitelist": true,
  • "enable_status_check": true,
  • "merge_whitelist_teams": [
    ],
  • "merge_whitelist_usernames": [
    ],
  • "protected_file_patterns": "string",
  • "push_whitelist_deploy_keys": true,
  • "push_whitelist_teams": [
    ],
  • "push_whitelist_usernames": [
    ],
  • "require_signed_commits": true,
  • "required_approvals": 0,
  • "rule_name": "string",
  • "status_check_contexts": [
    ],
  • "unprotected_file_patterns": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a specific branch protection for the repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

name
required
string

name of protected branch

Responses

Edit a branch protections for a repository. Only fields that are set will be changed

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

name
required
string

name of protected branch

Request Body schema: application/json
approvals_whitelist_teams
Array of strings
approvals_whitelist_username
Array of strings
block_on_official_review_requests
boolean
block_on_outdated_branch
boolean
block_on_rejected_reviews
boolean
dismiss_stale_approvals
boolean
enable_approvals_whitelist
boolean
enable_merge_whitelist
boolean
enable_push
boolean
enable_push_whitelist
boolean
enable_status_check
boolean
merge_whitelist_teams
Array of strings
merge_whitelist_usernames
Array of strings
protected_file_patterns
string
push_whitelist_deploy_keys
boolean
push_whitelist_teams
Array of strings
push_whitelist_usernames
Array of strings
require_signed_commits
boolean
required_approvals
integer <int64>
status_check_contexts
Array of strings
unprotected_file_patterns
string

Responses

Request samples

Content type
application/json
{
  • "approvals_whitelist_teams": [
    ],
  • "approvals_whitelist_username": [
    ],
  • "block_on_official_review_requests": true,
  • "block_on_outdated_branch": true,
  • "block_on_rejected_reviews": true,
  • "dismiss_stale_approvals": true,
  • "enable_approvals_whitelist": true,
  • "enable_merge_whitelist": true,
  • "enable_push": true,
  • "enable_push_whitelist": true,
  • "enable_status_check": true,
  • "merge_whitelist_teams": [
    ],
  • "merge_whitelist_usernames": [
    ],
  • "protected_file_patterns": "string",
  • "push_whitelist_deploy_keys": true,
  • "push_whitelist_teams": [
    ],
  • "push_whitelist_usernames": [
    ],
  • "require_signed_commits": true,
  • "required_approvals": 0,
  • "status_check_contexts": [
    ],
  • "unprotected_file_patterns": "string"
}

Response samples

Content type
{
  • "approvals_whitelist_teams": [
    ],
  • "approvals_whitelist_username": [
    ],
  • "block_on_official_review_requests": true,
  • "block_on_outdated_branch": true,
  • "block_on_rejected_reviews": true,
  • "branch_name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "dismiss_stale_approvals": true,
  • "enable_approvals_whitelist": true,
  • "enable_merge_whitelist": true,
  • "enable_push": true,
  • "enable_push_whitelist": true,
  • "enable_status_check": true,
  • "merge_whitelist_teams": [
    ],
  • "merge_whitelist_usernames": [
    ],
  • "protected_file_patterns": "string",
  • "push_whitelist_deploy_keys": true,
  • "push_whitelist_teams": [
    ],
  • "push_whitelist_usernames": [
    ],
  • "require_signed_commits": true,
  • "required_approvals": 0,
  • "rule_name": "string",
  • "status_check_contexts": [
    ],
  • "unprotected_file_patterns": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List a repository's branches

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a branch

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
new_branch_name
required
string unique

Name of the branch to create

old_branch_name
string unique

Deprecated: true Name of the old branch to create from

old_ref_name
string unique

Name of the old branch/tag/commit to create from

Responses

Request samples

Content type
application/json
{
  • "new_branch_name": "string",
  • "old_branch_name": "string",
  • "old_ref_name": "string"
}

Response samples

Content type
{
  • "commit": {
    },
  • "effective_branch_protection_name": "string",
  • "enable_status_check": true,
  • "name": "string",
  • "protected": true,
  • "required_approvals": 0,
  • "status_check_contexts": [
    ],
  • "user_can_merge": true,
  • "user_can_push": true
}

Retrieve a specific branch from a repository, including its effective branch protection

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

branch
required
string

branch to get

Responses

Response samples

Content type
{
  • "commit": {
    },
  • "effective_branch_protection_name": "string",
  • "enable_status_check": true,
  • "name": "string",
  • "protected": true,
  • "required_approvals": 0,
  • "status_check_contexts": [
    ],
  • "user_can_merge": true,
  • "user_can_push": true
}

Delete a specific branch from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

branch
required
string

branch to delete

Responses

List a repository's collaborators

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if a user is a collaborator of a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

collaborator
required
string

username of the collaborator

Responses

Add a collaborator to a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

collaborator
required
string

username of the collaborator to add

Request Body schema:
permission
string

Responses

Request samples

Content type
{
  • "permission": "string"
}

Delete a collaborator from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

collaborator
required
string

username of the collaborator to delete

Responses

Get repository permissions for a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

collaborator
required
string

username of the collaborator

Responses

Response samples

Content type
{
  • "permission": "string",
  • "role_name": "string",
  • "user": {
    }
}

Get a list of all commits from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
sha
string

SHA or branch to start listing commits from (usually 'master')

path
string

filepath of a file/dir

stat
boolean

include diff stats for every commit (disable for speedup, default 'true')

verification
boolean

include verification for every commit (disable for speedup, default 'true')

files
boolean

include a list of affected files for every commit (disable for speedup, default 'true')

page
integer

page number of results to return (1-based)

limit
integer

page size of results (ignored if used with 'path')

not
string

commits that match the given specifier will not be listed.

Responses

Response samples

Content type
[
  • {
    }
]

Get a commit's combined status, by branch/tag/commit reference

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

ref
required
string

name of branch/tag/commit

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
{
  • "commit_url": "string",
  • "repository": {
    },
  • "sha": "string",
  • "state": "string",
  • "statuses": [
    ],
  • "total_count": 0,
  • "url": "string"
}

Get a commit's statuses, by branch/tag/commit reference

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

ref
required
string

name of branch/tag/commit

query Parameters
sort
string
Enum: "oldest" "recentupdate" "leastupdate" "leastindex" "highestindex"

type of sort

state
string
Enum: "pending" "success" "error" "failure" "warning"

type of state

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Gets the metadata of all the entries of the root dir

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
ref
string

The name of the commit/branch/tag. Default the repository’s default branch (usually master)

Responses

Response samples

Content type
[
  • {
    }
]

Modify multiple files in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
required
object (Identity)

Identity for a person's identity like an author or committer

branch
string

branch (optional) to base this file from. if not given, the default branch is used

object (Identity)

Identity for a person's identity like an author or committer

object (CommitDateOptions)

CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE

required
Array of objects (ChangeFileOperation)

list of file operations

message
string

message (optional) for the commit of this file. if not supplied, a default message will be used

new_branch
string

new_branch (optional) will make a new branch from branch before creating the file

signoff
boolean

Add a Signed-off-by trailer by the committer at the end of the commit log message.

Responses

Request samples

Content type
application/json
{
  • "author": {
    },
  • "branch": "string",
  • "committer": {
    },
  • "dates": {
    },
  • "files": [
    ],
  • "message": "string",
  • "new_branch": "string",
  • "signoff": true
}

Response samples

Content type
{
  • "commit": {
    },
  • "files": [
    ],
  • "verification": {
    }
}

Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

path of the dir, file, symlink or submodule in the repo

query Parameters
ref
string

The name of the commit/branch/tag. Default the repository’s default branch (usually master)

Responses

Response samples

Content type
{
  • "_links": {
    },
  • "content": "string",
  • "download_url": "string",
  • "encoding": "string",
  • "git_url": "string",
  • "html_url": "string",
  • "last_commit_sha": "string",
  • "name": "string",
  • "path": "string",
  • "sha": "string",
  • "size": 0,
  • "submodule_git_url": "string",
  • "target": "string",
  • "type": "string",
  • "url": "string"
}

Update a file in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

path of the file to update

Request Body schema: application/json
required
object (Identity)

Identity for a person's identity like an author or committer

branch
string

branch (optional) to base this file from. if not given, the default branch is used

object (Identity)

Identity for a person's identity like an author or committer

content
required
string

content must be base64 encoded

object (CommitDateOptions)

CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE

from_path
string

from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL

message
string

message (optional) for the commit of this file. if not supplied, a default message will be used

new_branch
string

new_branch (optional) will make a new branch from branch before creating the file

sha
required
string

sha is the SHA for the file that already exists

signoff
boolean

Add a Signed-off-by trailer by the committer at the end of the commit log message.

Responses

Request samples

Content type
application/json
{
  • "author": {
    },
  • "branch": "string",
  • "committer": {
    },
  • "content": "string",
  • "dates": {
    },
  • "from_path": "string",
  • "message": "string",
  • "new_branch": "string",
  • "sha": "string",
  • "signoff": true
}

Response samples

Content type
{
  • "commit": {
    },
  • "content": {
    },
  • "verification": {
    }
}

Create a file in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

path of the file to create

Request Body schema: application/json
required
object (Identity)

Identity for a person's identity like an author or committer

branch
string

branch (optional) to base this file from. if not given, the default branch is used

object (Identity)

Identity for a person's identity like an author or committer

content
required
string

content must be base64 encoded

object (CommitDateOptions)

CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE

message
string

message (optional) for the commit of this file. if not supplied, a default message will be used

new_branch
string

new_branch (optional) will make a new branch from branch before creating the file

signoff
boolean

Add a Signed-off-by trailer by the committer at the end of the commit log message.

Responses

Request samples

Content type
application/json
{
  • "author": {
    },
  • "branch": "string",
  • "committer": {
    },
  • "content": "string",
  • "dates": {
    },
  • "message": "string",
  • "new_branch": "string",
  • "signoff": true
}

Response samples

Content type
{
  • "commit": {
    },
  • "content": {
    },
  • "verification": {
    }
}

Delete a file in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

path of the file to delete

Request Body schema: application/json
required
object (Identity)

Identity for a person's identity like an author or committer

branch
string

branch (optional) to base this file from. if not given, the default branch is used

object (Identity)

Identity for a person's identity like an author or committer

object (CommitDateOptions)

CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE

message
string

message (optional) for the commit of this file. if not supplied, a default message will be used

new_branch
string

new_branch (optional) will make a new branch from branch before creating the file

sha
required
string

sha is the SHA for the file that already exists

signoff
boolean

Add a Signed-off-by trailer by the committer at the end of the commit log message.

Responses

Request samples

Content type
application/json
{
  • "author": {
    },
  • "branch": "string",
  • "committer": {
    },
  • "dates": {
    },
  • "message": "string",
  • "new_branch": "string",
  • "sha": "string",
  • "signoff": true
}

Response samples

Content type
{
  • "commit": {
    },
  • "content": null,
  • "verification": {
    }
}

Apply diff patch to repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
required
object (Identity)

Identity for a person's identity like an author or committer

branch
string

branch (optional) to base this file from. if not given, the default branch is used

object (Identity)

Identity for a person's identity like an author or committer

content
required
string

content must be base64 encoded

object (CommitDateOptions)

CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE

from_path
string

from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL

message
string

message (optional) for the commit of this file. if not supplied, a default message will be used

new_branch
string

new_branch (optional) will make a new branch from branch before creating the file

sha
required
string

sha is the SHA for the file that already exists

signoff
boolean

Add a Signed-off-by trailer by the committer at the end of the commit log message.

Responses

Request samples

Content type
application/json
{
  • "author": {
    },
  • "branch": "string",
  • "committer": {
    },
  • "content": "string",
  • "dates": {
    },
  • "from_path": "string",
  • "message": "string",
  • "new_branch": "string",
  • "sha": "string",
  • "signoff": true
}

Response samples

Content type
{
  • "commit": {
    },
  • "content": {
    },
  • "verification": {
    }
}

Get the EditorConfig definitions of a file in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

filepath of file to get

query Parameters
ref
string

The name of the commit/branch/tag. Default the repository’s default branch (usually master)

Responses

List a repository's forks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Fork a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to fork

repo
required
string

name of the repo to fork

Request Body schema:
name
string

name of the forked repository

organization
string

organization name, if forking into an organization

Responses

Request samples

Content type
{
  • "name": "string",
  • "organization": "string"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Gets the blob of a repository.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

sha of the commit

Responses

Response samples

Content type
{
  • "content": "string",
  • "encoding": "string",
  • "sha": "string",
  • "size": 0,
  • "url": "string"
}

Get a single commit from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

a git ref or commit sha

query Parameters
stat
boolean

include diff stats for every commit (disable for speedup, default 'true')

verification
boolean

include verification for every commit (disable for speedup, default 'true')

files
boolean

include a list of affected files for every commit (disable for speedup, default 'true')

Responses

Response samples

Content type
{
  • "author": {
    },
  • "commit": {
    },
  • "committer": {
    },
  • "created": "2019-08-24T14:15:22Z",
  • "files": [
    ],
  • "html_url": "string",
  • "parents": [
    ],
  • "sha": "string",
  • "stats": {
    },
  • "url": "string"
}

Get a commit's diff or patch

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

SHA of the commit to get

diffType
required
string
Enum: "diff" "patch"

whether the output is diff or patch

Responses

Response samples

Content type
"string"

Get a note corresponding to a single commit from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

a git ref or commit sha

query Parameters
verification
boolean

include verification for every commit (disable for speedup, default 'true')

files
boolean

include a list of affected files for every commit (disable for speedup, default 'true')

Responses

Response samples

Content type
{
  • "commit": {
    },
  • "message": "string"
}

Get specified ref or filtered repository's refs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Get specified ref or filtered repository's refs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

ref
required
string

part or full name of the ref

Responses

Response samples

Content type
[
  • {
    }
]

Gets the tag object of an annotated tag (not lightweight tags)

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.

Responses

Response samples

Content type
{
  • "message": "string",
  • "object": {
    },
  • "sha": "string",
  • "tag": "string",
  • "tagger": {
    },
  • "url": "string",
  • "verification": {
    }
}

Gets the tree of a repository.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

sha of the commit

query Parameters
recursive
boolean

show all directories and files

page
integer

page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page

per_page
integer

number of items per page

Responses

Response samples

Content type
{
  • "page": 0,
  • "sha": "string",
  • "total_count": 0,
  • "tree": [
    ],
  • "truncated": true,
  • "url": "string"
}

List the hooks in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
active
boolean
Default: false
authorization_header
string
branch_filter
string
required
object (CreateHookOptionConfig)

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

events
Array of strings
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": [
    ],
  • "type": "dingtalk"
}

Response samples

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

List the Git hooks in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Get a Git hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
string

id of the hook to get

Responses

Response samples

Content type
{
  • "content": "string",
  • "is_active": true,
  • "name": "string"
}

Delete a Git hook in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
string

id of the hook to get

Responses

Edit a Git hook in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
string

id of the hook to get

Request Body schema:
content
string

Responses

Request samples

Content type
{
  • "content": "string"
}

Response samples

Content type
{
  • "content": "string",
  • "is_active": true,
  • "name": "string"
}

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the hook to get

Responses

Response samples

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

Delete a hook in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the hook to delete

Responses

Edit a hook in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

index of the hook

Request Body schema:
active
boolean
authorization_header
string
branch_filter
string
object
events
Array of strings

Responses

Request samples

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

Response samples

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

Test a push webhook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the hook to test

query Parameters
ref
string

The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.

Responses

Returns the issue config for a repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "blank_issues_enabled": true,
  • "contact_links": [
    ]
}

Returns the validation information for a issue config

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "message": "string",
  • "valid": true
}

Get available issue templates for a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

List a repo's pinned issues

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

List a repository's keys

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
key_id
integer

the key_id to search for

fingerprint
string

fingerprint of the key

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Add a key to a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

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
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "fingerprint": "string",
  • "id": 0,
  • "key": "string",
  • "key_id": 0,
  • "read_only": true,
  • "repository": {
    },
  • "title": "string",
  • "url": "string"
}

Get a repository's key by id

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the key to get

Responses

Response samples

Content type
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "fingerprint": "string",
  • "id": 0,
  • "key": "string",
  • "key_id": 0,
  • "read_only": true,
  • "repository": {
    },
  • "title": "string",
  • "url": "string"
}

Delete a key from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the key to delete

Responses

Get languages and number of bytes of code written

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "property1": 0,
  • "property2": 0
}

Get a file or it's LFS object from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

filepath of the file to get

query Parameters
ref
string

The name of the commit/branch/tag. Default the repository’s default branch (usually master)

Responses

Sync a mirrored repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to sync

repo
required
string

name of the repo to sync

Responses

Returns if new Issue Pins are allowed

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "issues": true,
  • "pull_requests": true
}

List a repo's pull requests

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
state
string
Enum: "closed" "open" "all"

State of pull request: open or closed (optional)

sort
string
Enum: "oldest" "recentupdate" "leastupdate" "mostcomment" "leastcomment" "priority"

Type of sort

milestone
integer <int64>

ID of the milestone

labels
Array of integers <int64> [ items <int64 > ]

Label IDs

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
assignee
string
assignees
Array of strings
base
string
body
string
due_date
string <date-time>
head
string
labels
Array of integers <int64> [ items <int64 > ]
milestone
integer <int64>
title
string

Responses

Request samples

Content type
application/json
{
  • "assignee": "string",
  • "assignees": [
    ],
  • "base": "string",
  • "body": "string",
  • "due_date": "2019-08-24T14:15:22Z",
  • "head": "string",
  • "labels": [
    ],
  • "milestone": 0,
  • "title": "string"
}

Response samples

Content type
{
  • "allow_maintainer_edit": true,
  • "assignee": {
    },
  • "assignees": [
    ],
  • "base": {
    },
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "diff_url": "string",
  • "due_date": "2019-08-24T14:15:22Z",
  • "head": {
    },
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "merge_base": "string",
  • "merge_commit_sha": "string",
  • "mergeable": true,
  • "merged": true,
  • "merged_at": "2019-08-24T14:15:22Z",
  • "merged_by": {
    },
  • "milestone": {
    },
  • "number": 0,
  • "patch_url": "string",
  • "pin_order": 0,
  • "requested_reviewers": [
    ],
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

List a repo's pinned pull requests

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Get a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to get

Responses

Response samples

Content type
{
  • "allow_maintainer_edit": true,
  • "assignee": {
    },
  • "assignees": [
    ],
  • "base": {
    },
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "diff_url": "string",
  • "due_date": "2019-08-24T14:15:22Z",
  • "head": {
    },
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "merge_base": "string",
  • "merge_commit_sha": "string",
  • "mergeable": true,
  • "merged": true,
  • "merged_at": "2019-08-24T14:15:22Z",
  • "merged_by": {
    },
  • "milestone": {
    },
  • "number": 0,
  • "patch_url": "string",
  • "pin_order": 0,
  • "requested_reviewers": [
    ],
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to edit

Request Body schema: application/json
allow_maintainer_edit
boolean
assignee
string
assignees
Array of strings
base
string
body
string
due_date
string <date-time>
labels
Array of integers <int64> [ items <int64 > ]
milestone
integer <int64>
state
string
title
string
unset_due_date
boolean

Responses

Request samples

Content type
application/json
{
  • "allow_maintainer_edit": true,
  • "assignee": "string",
  • "assignees": [
    ],
  • "base": "string",
  • "body": "string",
  • "due_date": "2019-08-24T14:15:22Z",
  • "labels": [
    ],
  • "milestone": 0,
  • "state": "string",
  • "title": "string",
  • "unset_due_date": true
}

Response samples

Content type
{
  • "allow_maintainer_edit": true,
  • "assignee": {
    },
  • "assignees": [
    ],
  • "base": {
    },
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "diff_url": "string",
  • "due_date": "2019-08-24T14:15:22Z",
  • "head": {
    },
  • "html_url": "string",
  • "id": 0,
  • "is_locked": true,
  • "labels": [
    ],
  • "merge_base": "string",
  • "merge_commit_sha": "string",
  • "mergeable": true,
  • "merged": true,
  • "merged_at": "2019-08-24T14:15:22Z",
  • "merged_by": {
    },
  • "milestone": {
    },
  • "number": 0,
  • "patch_url": "string",
  • "pin_order": 0,
  • "requested_reviewers": [
    ],
  • "state": "string",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Get a pull request diff or patch

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to get

diffType
required
string
Enum: "diff" "patch"

whether the output is diff or patch

query Parameters
binary
boolean

whether to include binary file changes. if true, the diff is applicable with git apply

Responses

Response samples

Content type
"string"

Get commits for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to get

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

verification
boolean

include verification for every commit (disable for speedup, default 'true')

files
boolean

include a list of affected files for every commit (disable for speedup, default 'true')

Responses

Response samples

Content type
[
  • {
    }
]

Get changed files for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to get

query Parameters
skip-to
string

skip to given file

whitespace
string
Enum: "ignore-all" "ignore-change" "ignore-eol" "show-all"

whitespace behavior

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if a pull request has been merged

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

Responses

Merge a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to merge

Request Body schema:
Do
required
string
Enum: "merge" "rebase" "rebase-merge" "squash" "manually-merged"
MergeCommitID
string
MergeMessageField
string
MergeTitleField
string
delete_branch_after_merge
boolean
force_merge
boolean
head_commit_id
string
merge_when_checks_succeed
boolean

Responses

Request samples

Content type
{
  • "Do": "merge",
  • "MergeCommitID": "string",
  • "MergeMessageField": "string",
  • "MergeTitleField": "string",
  • "delete_branch_after_merge": true,
  • "force_merge": true,
  • "head_commit_id": "string",
  • "merge_when_checks_succeed": true
}

Cancel the scheduled auto merge for the given pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to merge

Responses

create review requests for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

Request Body schema:
required
reviewers
Array of strings
team_reviewers
Array of strings

Responses

Request samples

Content type
{
  • "reviewers": [
    ],
  • "team_reviewers": [
    ]
}

Response samples

Content type
[
  • {
    }
]

cancel review requests for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

Request Body schema:
required
reviewers
Array of strings
team_reviewers
Array of strings

Responses

Request samples

Content type
{
  • "reviewers": [
    ],
  • "team_reviewers": [
    ]
}

List all reviews for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a review to an pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

Request Body schema:
required
body
string
Array of objects (CreatePullReviewComment)
commit_id
string
event
string (ReviewStateType)

ReviewStateType review state type

Responses

Request samples

Content type
{
  • "body": "string",
  • "comments": [
    ],
  • "commit_id": "string",
  • "event": "string"
}

Response samples

Content type
{
  • "body": "string",
  • "comments_count": 0,
  • "commit_id": "string",
  • "dismissed": true,
  • "html_url": "string",
  • "id": 0,
  • "official": true,
  • "pull_request_url": "string",
  • "stale": true,
  • "state": "string",
  • "submitted_at": "2019-08-24T14:15:22Z",
  • "team": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Get a specific review for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

id
required
integer <int64>

id of the review

Responses

Response samples

Content type
{
  • "body": "string",
  • "comments_count": 0,
  • "commit_id": "string",
  • "dismissed": true,
  • "html_url": "string",
  • "id": 0,
  • "official": true,
  • "pull_request_url": "string",
  • "stale": true,
  • "state": "string",
  • "submitted_at": "2019-08-24T14:15:22Z",
  • "team": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Submit a pending review to an pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

id
required
integer <int64>

id of the review

Request Body schema:
required
body
string
event
string (ReviewStateType)

ReviewStateType review state type

Responses

Request samples

Content type
{
  • "body": "string",
  • "event": "string"
}

Response samples

Content type
{
  • "body": "string",
  • "comments_count": 0,
  • "commit_id": "string",
  • "dismissed": true,
  • "html_url": "string",
  • "id": 0,
  • "official": true,
  • "pull_request_url": "string",
  • "stale": true,
  • "state": "string",
  • "submitted_at": "2019-08-24T14:15:22Z",
  • "team": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Delete a specific review from a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

id
required
integer <int64>

id of the review

Responses

Get a specific review for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

id
required
integer <int64>

id of the review

Responses

Response samples

Content type
[
  • {
    }
]

Dismiss a review for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

id
required
integer <int64>

id of the review

Request Body schema:
required
message
string
priors
boolean

Responses

Request samples

Content type
{
  • "message": "string",
  • "priors": true
}

Response samples

Content type
{
  • "body": "string",
  • "comments_count": 0,
  • "commit_id": "string",
  • "dismissed": true,
  • "html_url": "string",
  • "id": 0,
  • "official": true,
  • "pull_request_url": "string",
  • "stale": true,
  • "state": "string",
  • "submitted_at": "2019-08-24T14:15:22Z",
  • "team": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Cancel to dismiss a review for a pull request

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request

id
required
integer <int64>

id of the review

Responses

Response samples

Content type
{
  • "body": "string",
  • "comments_count": 0,
  • "commit_id": "string",
  • "dismissed": true,
  • "html_url": "string",
  • "id": 0,
  • "official": true,
  • "pull_request_url": "string",
  • "stale": true,
  • "state": "string",
  • "submitted_at": "2019-08-24T14:15:22Z",
  • "team": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

Merge PR's baseBranch into headBranch

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

index
required
integer <int64>

index of the pull request to get

query Parameters
style
string
Enum: "merge" "rebase"

how to update pull request

Responses

Get all push mirrors of the repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

add a push mirror to the repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
interval
string
remote_address
string
remote_password
string
remote_username
string
sync_on_commit
boolean

Responses

Request samples

Content type
application/json
{
  • "interval": "string",
  • "remote_address": "string",
  • "remote_password": "string",
  • "remote_username": "string",
  • "sync_on_commit": true
}

Response samples

Content type
{
  • "created": "2019-08-24T14:15:22Z",
  • "interval": "string",
  • "last_error": "string",
  • "last_update": "2019-08-24T14:15:22Z",
  • "remote_address": "string",
  • "remote_name": "string",
  • "repo_name": "string",
  • "sync_on_commit": true
}

Sync all push mirrored repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to sync

repo
required
string

name of the repo to sync

Responses

Get push mirror of the repository by remoteName

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

name
required
string

remote name of push mirror

Responses

Response samples

Content type
{
  • "created": "2019-08-24T14:15:22Z",
  • "interval": "string",
  • "last_error": "string",
  • "last_update": "2019-08-24T14:15:22Z",
  • "remote_address": "string",
  • "remote_name": "string",
  • "repo_name": "string",
  • "sync_on_commit": true
}

deletes a push mirror from a repository by remoteName

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

name
required
string

remote name of the pushMirror

Responses

Get a file from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

filepath
required
string

filepath of the file to get

query Parameters
ref
string

The name of the commit/branch/tag. Default the repository’s default branch (usually master)

Responses

List a repo's releases

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
draft
boolean

filter (exclude / include) drafts, if you dont have repo write access none will show

pre-release
boolean

filter (exclude / include) pre-releases

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a release

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
body
string
draft
boolean
name
string
prerelease
boolean
tag_name
required
string
target_commitish
string

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "draft": true,
  • "name": "string",
  • "prerelease": true,
  • "tag_name": "string",
  • "target_commitish": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "author": {
    },
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "draft": true,
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "prerelease": true,
  • "published_at": "2019-08-24T14:15:22Z",
  • "tag_name": "string",
  • "tarball_url": "string",
  • "target_commitish": "string",
  • "upload_url": "string",
  • "url": "string",
  • "zipball_url": "string"
}

Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "assets": [
    ],
  • "author": {
    },
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "draft": true,
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "prerelease": true,
  • "published_at": "2019-08-24T14:15:22Z",
  • "tag_name": "string",
  • "tarball_url": "string",
  • "target_commitish": "string",
  • "upload_url": "string",
  • "url": "string",
  • "zipball_url": "string"
}

Get a release by tag name

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

tag
required
string

tag name of the release to get

Responses

Response samples

Content type
{
  • "assets": [
    ],
  • "author": {
    },
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "draft": true,
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "prerelease": true,
  • "published_at": "2019-08-24T14:15:22Z",
  • "tag_name": "string",
  • "tarball_url": "string",
  • "target_commitish": "string",
  • "upload_url": "string",
  • "url": "string",
  • "zipball_url": "string"
}

Delete a release by tag name

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

tag
required
string

tag name of the release to delete

Responses

Get a release

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release to get

Responses

Response samples

Content type
{
  • "assets": [
    ],
  • "author": {
    },
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "draft": true,
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "prerelease": true,
  • "published_at": "2019-08-24T14:15:22Z",
  • "tag_name": "string",
  • "tarball_url": "string",
  • "target_commitish": "string",
  • "upload_url": "string",
  • "url": "string",
  • "zipball_url": "string"
}

Delete a release

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release to delete

Responses

Update a release

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release to edit

Request Body schema: application/json
body
string
draft
boolean
name
string
prerelease
boolean
tag_name
string
target_commitish
string

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "draft": true,
  • "name": "string",
  • "prerelease": true,
  • "tag_name": "string",
  • "target_commitish": "string"
}

Response samples

Content type
{
  • "assets": [
    ],
  • "author": {
    },
  • "body": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "draft": true,
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "prerelease": true,
  • "published_at": "2019-08-24T14:15:22Z",
  • "tag_name": "string",
  • "tarball_url": "string",
  • "target_commitish": "string",
  • "upload_url": "string",
  • "url": "string",
  • "zipball_url": "string"
}

List release's attachments

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release

Responses

Response samples

Content type
[
  • {
    }
]

Create a release attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release

query Parameters
name
string

name of the attachment

Request Body schema: multipart/form-data
required
attachment
required
string <binary>

attachment to upload

Responses

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Get a release attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release

attachment_id
required
integer <int64>

id of the attachment to get

Responses

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Delete a release attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release

attachment_id
required
integer <int64>

id of the attachment to delete

Responses

Edit a release attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

id
required
integer <int64>

id of the release

attachment_id
required
integer <int64>

id of the attachment to edit

Request Body schema: application/json
name
string

Responses

Request samples

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

Response samples

Content type
{
  • "browser_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "download_count": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uuid": "string"
}

Return all users that can be requested to review in this repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Get signing-key.gpg for given repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

List a repo's stargazers

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Get a commit's statuses

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

sha of the commit

query Parameters
sort
string
Enum: "oldest" "recentupdate" "leastupdate" "leastindex" "highestindex"

type of sort

state
string
Enum: "pending" "success" "error" "failure" "warning"

type of state

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a commit status

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

sha
required
string

sha of the commit

Request Body schema:
context
string
description
string
state
string (CommitStatusState)

CommitStatusState holds the state of a CommitStatus It can be "pending", "success", "error" and "failure"

target_url
string

Responses

Request samples

Content type
{
  • "context": "string",
  • "description": "string",
  • "state": "string",
  • "target_url": "string"
}

Response samples

Content type
{
  • "context": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "description": "string",
  • "id": 0,
  • "status": "string",
  • "target_url": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

List a repo's watchers

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if the current user is watching a repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "ignored": true,
  • "reason": null,
  • "repository_url": "string",
  • "subscribed": true,
  • "url": "string"
}

Watch a repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "ignored": true,
  • "reason": null,
  • "repository_url": "string",
  • "subscribed": true,
  • "url": "string"
}

Unwatch a repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

List a repository's tags

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results, default maximum page size is 50

Responses

Response samples

Content type
[
  • {
    }
]

Create a new git tag in a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema:
message
string
tag_name
required
string
target
string

Responses

Request samples

Content type
{
  • "message": "string",
  • "tag_name": "string",
  • "target": "string"
}

Response samples

Content type
{
  • "commit": {
    },
  • "id": "string",
  • "message": "string",
  • "name": "string",
  • "tarball_url": "string",
  • "zipball_url": "string"
}

Get the tag of a repository by tag name

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

tag
required
string

name of tag

Responses

Response samples

Content type
{
  • "commit": {
    },
  • "id": "string",
  • "message": "string",
  • "name": "string",
  • "tarball_url": "string",
  • "zipball_url": "string"
}

Delete a repository's tag by name

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

tag
required
string

name of tag to delete

Responses

List a repository's teams

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

Content type
[
  • {
    }
]

Check if a team is assigned to a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

team
required
string

team name

Responses

Response samples

Content type
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "id": 0,
  • "includes_all_repositories": true,
  • "name": "string",
  • "organization": {
    },
  • "permission": "none",
  • "units": [
    ],
  • "units_map": {
    }
}

Add a team to a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

team
required
string

team name

Responses

Delete a team from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

team
required
string

team name

Responses

List a repo's tracked times

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
user
string

optional filter by user (available for issue managers)

since
string <date-time>

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

before
string <date-time>

Only show times 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
[
  • {
    }
]

List a user's tracked times in a repo Deprecated

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

user
required
string

username of user

Responses

Response samples

Content type
[
  • {
    }
]

Get list of topics that a repository has

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
{
  • "topics": [
    ]
}

Replace list of topics for a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema:
topics
Array of strings

list of topic names

Responses

Request samples

Content type
{
  • "topics": [
    ]
}

Add a topic to a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

topic
required
string

name of the topic to add

Responses

Delete a topic from a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

topic
required
string

name of the topic to delete

Responses

Transfer a repo ownership

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to transfer

repo
required
string

name of the repo to transfer

Request Body schema:
required

Transfer Options

new_owner
required
string
team_ids
Array of integers <int64> [ items <int64 > ]

ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.

Responses

Request samples

Content type
{
  • "new_owner": "string",
  • "team_ids": [
    ]
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Accept a repo transfer

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to transfer

repo
required
string

name of the repo to transfer

Responses

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Reject a repo transfer

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to transfer

repo
required
string

name of the repo to transfer

Responses

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Create a wiki page

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Request Body schema: application/json
content_base64
string

content must be base64 encoded

message
string

optional commit message summarizing the change

title
string

page title. leave empty to keep unchanged

Responses

Request samples

Content type
application/json
{
  • "content_base64": "string",
  • "message": "string",
  • "title": "string"
}

Response samples

Content type
{
  • "commit_count": 0,
  • "content_base64": "string",
  • "footer": "string",
  • "html_url": "string",
  • "last_commit": {
    },
  • "sidebar": "string",
  • "sub_url": "string",
  • "title": "string"
}

Get a wiki page

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

pageName
required
string

name of the page

Responses

Response samples

Content type
{
  • "commit_count": 0,
  • "content_base64": "string",
  • "footer": "string",
  • "html_url": "string",
  • "last_commit": {
    },
  • "sidebar": "string",
  • "sub_url": "string",
  • "title": "string"
}

Delete a wiki page

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

pageName
required
string

name of the page

Responses

Edit a wiki page

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

pageName
required
string

name of the page

Request Body schema: application/json
content_base64
string

content must be base64 encoded

message
string

optional commit message summarizing the change

title
string

page title. leave empty to keep unchanged

Responses

Request samples

Content type
application/json
{
  • "content_base64": "string",
  • "message": "string",
  • "title": "string"
}

Response samples

Content type
{
  • "commit_count": 0,
  • "content_base64": "string",
  • "footer": "string",
  • "html_url": "string",
  • "last_commit": {
    },
  • "sidebar": "string",
  • "sub_url": "string",
  • "title": "string"
}

Get all wiki pages

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Get revisions of a wiki page

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

pageName
required
string

name of the page

query Parameters
page
integer

page number of results to return (1-based)

Responses

Response samples

Content type
{
  • "commits": [
    ],
  • "count": 0
}

Create a repository using a template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
template_owner
required
string

name of the template repository owner

template_repo
required
string

name of the template repository

Request Body schema: application/json
avatar
boolean

include avatar of the template repo

default_branch
string

Default branch of the new repository

description
string

Description of the repository to create

git_content
boolean

include git content of default branch in template repo

git_hooks
boolean

include git hooks in template repo

labels
boolean

include labels in template repo

name
required
string unique

Name of the repository to create

owner
required
string

The organization or person who will own the new repository

private
boolean

Whether the repository is private

protected_branch
boolean

include protected branches in template repo

topics
boolean

include topics in template repo

webhooks
boolean

include webhooks in template repo

Responses

Request samples

Content type
application/json
{
  • "avatar": true,
  • "default_branch": "string",
  • "description": "string",
  • "git_content": true,
  • "git_hooks": true,
  • "labels": true,
  • "name": "string",
  • "owner": "string",
  • "private": true,
  • "protected_branch": true,
  • "topics": true,
  • "webhooks": true
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Get a repository by id

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the repo to get

Responses

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

search topics via keyword

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
q
required
string

keywords to search

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
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

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",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

settings

Get instance's global settings for api

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "default_git_trees_per_page": 0,
  • "default_max_blob_size": 0,
  • "default_paging_num": 0,
  • "max_response_items": 0
}

Get instance's global settings for Attachment

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "allowed_types": "string",
  • "enabled": true,
  • "max_files": 0,
  • "max_size": 0
}

Get instance's global settings for repositories

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "http_git_disabled": true,
  • "lfs_disabled": true,
  • "migrations_disabled": true,
  • "mirrors_disabled": true,
  • "stars_disabled": true,
  • "time_tracking_disabled": true
}

Get instance's global settings for ui

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "allowed_reactions": [
    ],
  • "custom_emojis": [
    ],
  • "default_theme": "string"
}

user

Get the authenticated user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "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,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Create or Update a secret value in a user scope

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
secretname
required
string

name of the secret

Request Body schema: application/json
data
required
string

Data of the secret to update

Responses

Request samples

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

Delete a secret in a user scope

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
secretname
required
string

name of the secret

Responses

List the authenticated user's oauth2 applications

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
[
  • {
    }
]

creates a new OAuth2 application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema:
required
confidential_client
boolean
name
string
redirect_uris
Array of strings

Responses

Request samples

Content type
{
  • "confidential_client": true,
  • "name": "string",
  • "redirect_uris": [
    ]
}

Response samples

Content type
{
  • "client_id": "string",
  • "client_secret": "string",
  • "confidential_client": true,
  • "created": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "name": "string",
  • "redirect_uris": [
    ]
}

get an OAuth2 Application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

Application ID to be found

Responses

Response samples

Content type
{
  • "client_id": "string",
  • "client_secret": "string",
  • "confidential_client": true,
  • "created": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "name": "string",
  • "redirect_uris": [
    ]
}

delete an OAuth2 Application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

token to be deleted

Responses

update an OAuth2 Application, this includes regenerating the client secret

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

application to be updated

Request Body schema:
required
confidential_client
boolean
name
string
redirect_uris
Array of strings

Responses

Request samples

Content type
{
  • "confidential_client": true,
  • "name": "string",
  • "redirect_uris": [
    ]
}

Response samples

Content type
{
  • "client_id": "string",
  • "client_secret": "string",
  • "confidential_client": true,
  • "created": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "name": "string",
  • "redirect_uris": [
    ]
}

Update Avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema:
image
string

image must be base64 encoded

Responses

Request samples

Content type
{
  • "image": "string"
}

Delete Avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

List the authenticated user's email addresses

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • {
    }
]

Add email addresses

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema:
emails
Array of strings

email addresses to add

Responses

Request samples

Content type
{
  • "emails": [
    ]
}

Response samples

Content type
[
  • {
    }
]

Delete email addresses

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema:
emails
Array of strings

email addresses to delete

Responses

Request samples

Content type
{
  • "emails": [
    ]
}

List the authenticated user's followers

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
[
  • {
    }
]

List the users that the authenticated user is following

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
[
  • {
    }
]

Check whether a user is followed by the authenticated user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of followed user

Responses

Follow a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user to follow

Responses

Unfollow a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user to unfollow

Responses

Get a Token to verify

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
"string"

Verify a GPG key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "can_certify": true,
  • "can_encrypt_comms": true,
  • "can_encrypt_storage": true,
  • "can_sign": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "emails": [
    ],
  • "expires_at": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "key_id": "string",
  • "primary_key_id": "string",
  • "public_key": "string",
  • "subkeys": [
    ],
  • "verified": true
}

List the authenticated user's GPG keys

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
[
  • {
    }
]

Create a GPG key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
armored_public_key
required
string unique

An armored GPG key to add

armored_signature
string

Responses

Request samples

Content type
application/json
{
  • "armored_public_key": "string",
  • "armored_signature": "string"
}

Response samples

Content type
{
  • "can_certify": true,
  • "can_encrypt_comms": true,
  • "can_encrypt_storage": true,
  • "can_sign": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "emails": [
    ],
  • "expires_at": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "key_id": "string",
  • "primary_key_id": "string",
  • "public_key": "string",
  • "subkeys": [
    ],
  • "verified": true
}

Get a GPG key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of key to get

Responses

Response samples

Content type
{
  • "can_certify": true,
  • "can_encrypt_comms": true,
  • "can_encrypt_storage": true,
  • "can_sign": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "emails": [
    ],
  • "expires_at": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "key_id": "string",
  • "primary_key_id": "string",
  • "public_key": "string",
  • "subkeys": [
    ],
  • "verified": true
}

Remove a GPG key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of key to delete

Responses

List the authenticated user's webhooks

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
[
  • {
    }
]

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
required
active
boolean
Default: false
authorization_header
string
branch_filter
string
required
object (CreateHookOptionConfig)

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

events
Array of strings
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": [
    ],
  • "type": "dingtalk"
}

Response samples

Content type
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "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
{
  • "active": true,
  • "authorization_header": "string",
  • "branch_filter": "string",
  • "config": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "id": 0,
  • "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
authorization_header
string
branch_filter
string
object
events
Array of strings

Responses

Request samples

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

Response samples

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

List the authenticated user's public keys

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
fingerprint
string

fingerprint of the key

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
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
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "fingerprint": "string",
  • "id": 0,
  • "key": "string",
  • "key_type": "string",
  • "read_only": true,
  • "title": "string",
  • "url": "string",
  • "user": {
    }
}

Get a public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of key to get

Responses

Response samples

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

Delete a public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of key to delete

Responses

List the repos that the authenticated user owns

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
[
  • {
    }
]

Create a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
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

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",
  • "private": true,
  • "readme": "string",
  • "template": true,
  • "trust_model": "default"
}

Response samples

Content type
{
  • "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",
  • "avatar_url": "string",
  • "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",
  • "description": "string",
  • "empty": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "fork": true,
  • "forks_count": 0,
  • "full_name": "string",
  • "has_actions": 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",
  • "link": "string",
  • "mirror": true,
  • "mirror_interval": "string",
  • "mirror_updated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "open_issues_count": 0,
  • "open_pr_counter": 0,
  • "original_url": "string",
  • "owner": {
    },
  • "parent": { },
  • "permissions": {
    },
  • "private": true,
  • "release_counter": 0,
  • "repo_transfer": {
    },
  • "size": 0,
  • "ssh_url": "string",
  • "stars_count": 0,
  • "template": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "watchers_count": 0,
  • "website": "string"
}

Get user settings

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • {
    }
]

Update user settings

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema:
description
string
diff_view_style
string
full_name
string
hide_activity
boolean
hide_email
boolean

Privacy

language
string
location
string
theme
string
website
string

Responses

Request samples

Content type
{
  • "description": "string",
  • "diff_view_style": "string",
  • "full_name": "string",
  • "hide_activity": true,
  • "hide_email": true,
  • "language": "string",
  • "location": "string",
  • "theme": "string",
  • "website": "string"
}

Response samples

Content type
[
  • {
    }
]

The repos that the authenticated user has starred

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
[
  • {
    }
]

Whether the authenticated is starring the repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Star the given repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to star

repo
required
string

name of the repo to star

Responses

Unstar the given repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo to unstar

repo
required
string

name of the repo to unstar

Responses

Get list of all existing stopwatches

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
[
  • {
    }
]

List repositories watched by the authenticated user

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
[
  • {
    }
]

List all the teams a user belongs to

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
[
  • {
    }
]

List the current user's tracked times

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

since
string <date-time>

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

before
string <date-time>

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

Responses

Response samples

Content type
[
  • {
    }
]

Search for users

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
q
string

keyword

uid
integer <int64>

ID of the user to search for

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "ok": true
}

Get a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user to get

Responses

Response samples

Content type
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "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,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

List a user's activity feeds

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
only-performed-by
boolean

if true, only show actions performed by the requested user

date
string <date>

the date of the activities to be found

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List the given user's followers

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List the users that the given user is following

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Check if one user is following another user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of following user

target
required
string

username of followed user

Responses

List the given user's GPG keys

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Get a user's heatmap

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user to get

Responses

Response samples

Content type
[
  • {
    }
]

List the given user's public keys

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
fingerprint
string

fingerprint of the key

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List the repos owned by the given user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

The repos that the given user has starred

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List the repositories watched by a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List the authenticated user's access tokens

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create an access token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

Request Body schema: application/json
name
required
string
scopes
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
{
  • "id": 0,
  • "name": "string",
  • "scopes": [
    ],
  • "sha1": "string",
  • "token_last_eight": "string"
}

delete an access token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

token
required
string

token to be deleted, identified by ID and if not available by name

Responses

An icon showing wave propagation

Join our community

Gitea is open source. Star our GitHub repo, and join our community on Discord!

An icon showing a paper plane

Subscribe to our newsletter

Stay up to date with all things Gitea