跳至主要内容

Gitea API (dev)

Download OpenAPI specification:Download

License: MIT

This documentation describes the Gitea API.

admin

Site administration

Lists all jobs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
status
string

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

sort
string

sort jobs by attribute. Supported values are "id". Default is "id"

order
string

sort order, either "asc" (ascending) or "desc" (descending). Default is "asc"

Responses

Response samples

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

Get all runners

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
disabled
boolean

filter by disabled status (true or false)

Responses

Response samples

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

Get a global actions runner registration token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Get a global runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
runner_id
required
string

id of the runner

Responses

Response samples

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

Delete a global runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
runner_id
required
string

id of the runner

Responses

Update a global runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
runner_id
required
string

id of the runner

Request Body schema: application/json
disabled
required
boolean

Responses

Request samples

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

Response samples

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

Lists all runs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
event
string

workflow event name

branch
string

workflow branch

status
string

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

actor
string

triggered by user

head_sha
string

triggering sha of the workflow run

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

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

List cron tasks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Run cron task

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
task
required
string

task to run

Responses

List all emails

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search all emails

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
q
string

keyword

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List system's webhooks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

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

system, default or both kinds of webhooks

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a hook

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

Whether the webhook should be active upon creation

authorization_header
string

Authorization header to include in webhook requests

branch_filter
string

Branch filter pattern to determine which branches trigger the webhook

required
object (CreateHookOptionConfig)

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

events
Array of strings

List of events that will trigger this webhook

name
string

Optional human-readable name for the webhook

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

The type of the webhook to create

Responses

Request samples

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

Response samples

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

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to get

Responses

Response samples

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

Delete a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to delete

Responses

Update a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to update

Request Body schema: application/json
active
boolean

Whether the webhook is active and will be triggered

authorization_header
string

Authorization header to include in webhook requests

branch_filter
string

Branch filter pattern to determine which branches trigger the webhook

object

Configuration settings for the webhook

events
Array of strings

List of events that trigger this webhook

name
string

Optional human-readable name

Responses

Request samples

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

Response samples

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

List all organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List unadopted repositories

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

pattern
string

pattern of repositories to search for

Responses

Response samples

Content type
application/json
[
  • "string"
]

Adopt unadopted files as a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Delete unadopted files

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Search users according filter conditions

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
source_id
integer <int64>

ID of the user's login source to search for

login_name
string

identifier of the user, provided by the external authenticator

page
integer

page number of results to return (1-based)

limit
integer

page size of results

sort
string

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

order
string

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

q
string

search term (username, full name, email)

visibility
string

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

is_active
boolean

filter active users

is_admin
boolean

filter admin users

is_restricted
boolean

filter restricted users

is_2fa_enabled
boolean

filter 2FA enabled users

is_prohibit_login
boolean

filter login prohibited users

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a user

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

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

email
required
string
full_name
string

The full display name of the user

login_name
string
Default: "empty"

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

must_change_password
boolean

Whether the user must change password on first login

password
string

The plain text password for the user

restricted
boolean

Whether the user has restricted access privileges

send_notify
boolean

Whether to send welcome notification email to the user

source_id
integer <int64>

The authentication source ID to associate with the user

username
required
string

username of the user

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

User visibility level: public, limited, or private

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "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",
  • "html_url": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "starred_repos_count": 0,
  • "visibility": "public",
  • "website": "string"
}

Delete a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user to delete

query Parameters
purge
boolean

purge the user from the system completely

Responses

Edit an existing user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose data is to be edited

Request Body schema: application/json
active
boolean

Whether the user account is active

admin
boolean

Whether the user has administrator privileges

allow_create_organization
boolean

Whether the user can create organizations

allow_git_hook
boolean

Whether the user can use Git hooks

allow_import_local
boolean

Whether the user can import local repositories

description
string

The user's personal description or bio

email
string <email>

The email address of the user

full_name
string

The full display name of the user

location
string

The user's location or address

login_name
required
string
Default: "empty"

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

max_repo_creation
integer <int64>

Maximum number of repositories the user can create

must_change_password
boolean

Whether the user must change password on next login

password
string

The plain text password for the user

prohibit_login
boolean

Whether the user is prohibited from logging in

restricted
boolean

Whether the user has restricted access privileges

source_id
required
integer <int64>

The authentication source ID to associate with the user

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

User visibility level: public, limited, or private

website
string

The user's personal website URL

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "admin": true,
  • "allow_create_organization": true,
  • "allow_git_hook": true,
  • "allow_import_local": true,
  • "description": "string",
  • "email": "user@example.com",
  • "full_name": "string",
  • "location": "string",
  • "login_name": "empty",
  • "max_repo_creation": 0,
  • "must_change_password": true,
  • "password": "string",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "visibility": "public",
  • "website": "string"
}

Response samples

Content type
application/json
{
  • "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",
  • "html_url": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "starred_repos_count": 0,
  • "visibility": "public",
  • "website": "string"
}

List a user's badges

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose badges are to be listed

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a badge to a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

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

Request Body schema: application/json
badge_slugs
Array of strings

Responses

Request samples

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

Remove a badge from a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose badge is to be deleted

Request Body schema: application/json
badge_slugs
Array of strings

Responses

Request samples

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

Add a public key on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user who is to receive a public key

Request Body schema: application/json
key
required
string unique

An armored SSH key to add

read_only
boolean

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

title
required
string unique

Title of the key to add

Responses

Request samples

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

Response samples

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

Delete a user's public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose public key is to be deleted

id
required
integer <int64>

id of the key to delete

Responses

Create an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user who will own the created organization

Request Body schema: application/json
required
description
string

The description of the organization

email
string

The email address of the organization

full_name
string

The full display name of the organization

location
string

The location of the organization

repo_admin_change_team_access
boolean

Whether repository administrators can change team access

username
required
string

username of the organization

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

possible values are public (default), limited or private

website
string

The website URL of the organization

Responses

Request samples

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

Response samples

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

Rename a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

current username of the user

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

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

Responses

Request samples

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

Create a repository on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user who will own the created repository

Request Body schema: application/json
required
auto_init
boolean

Whether the repository should be auto-initialized?

default_branch
string

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

description
string

Description of the repository to create

gitignores
string

Gitignores to use

issue_labels
string

Label-Set to use

license
string

License to use

name
required
string unique

Name of the repository to create

object_format_name
string
Enum: "sha1" "sha256"

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

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

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

TrustModel of the repository

Responses

Request samples

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

Response samples

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

issue

Issues, pull requests, comments, labels and milestones

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

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
state
string
Default: "open"
Enum: "open" "closed" "all"

State of the issue

labels
string

Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded.

milestones
string

Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded.

q
string

Search string

type
string
Enum: "issues" "pulls"

Filter by issue type

since
string <date-time>

Only show issues updated after the given time (RFC 3339 format)

before
string <date-time>

Only show issues updated before the given time (RFC 3339 format)

assigned
boolean
Default: false

Filter issues or pulls assigned to the authenticated user

created
boolean
Default: false

Filter issues or pulls created by the authenticated user

mentioned
boolean
Default: false

Filter issues or pulls mentioning the authenticated user

review_requested
boolean
Default: false

Filter pull requests where the authenticated user's review was requested

reviewed
boolean
Default: false

Filter pull requests reviewed by the authenticated user

owner
string

Filter by repository owner

created_by
string

Only show items which were created by the given user

team
string

Filter by team (requires organization owner parameter)

page
integer >= 1
Default: 1

Page number of results to return (1-based)

limit
integer >= 0

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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 label names. Fetch only issues that have any of this label names. 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 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
application/json
[
  • {
    }
]

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

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

list of project ids

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,
  • "projects": [
    ],
  • "ref": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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
application/json
[
  • {
    }
]

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
application/json
{
  • "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

Body is the updated comment text content

Responses

Request samples

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

Response samples

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

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
application/json
{
  • "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
application/json
{
  • "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

Name is the new filename for the attachment

Responses

Request samples

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

Response samples

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

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

The reaction content (e.g., emoji or reaction type)

Responses

Request samples

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

Response samples

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

The reaction content (e.g., emoji or reaction type)

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
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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.

Pass content_version to enable optimistic locking on body edits. If the version doesn't match the current value, the request fails with 409 Conflict.

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
content_version
integer <int64>

The current version of the issue content to detect conflicts during editing

due_date
string <date-time>
milestone
integer <int64>
projects
Array of integers <int64> [ items <int64 > ]

list of project ids to set (replaces existing projects)

ref
string
state
string
title
string
unset_due_date
boolean

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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
application/json
[
  • {
    }
]

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
application/json
{
  • "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
application/json
{
  • "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

Name is the new filename for the attachment

Responses

Request samples

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

Response samples

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

Add assignees 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
required
assignees
Array of strings

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Remove assignees 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
required
assignees
Array of strings

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "user": {
    }
}

Check if a user can be assigned 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

assignee
required
string

username of the user to check for being an assignee

Responses

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

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: application/json
index
integer <int64>
owner
string

owner of the issue's repo

repo
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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: application/json
index
integer <int64>
owner
string

owner of the issue's repo

repo
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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
application/json
[
  • {
    }
]

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

Body is the comment text content

Responses

Request samples

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

Response samples

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

Body is the updated comment text content

Responses

Request samples

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

Response samples

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

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: application/json
index
integer <int64>
owner
string

owner of the issue's repo

repo
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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: application/json
index
integer <int64>
owner
string

owner of the issue's repo

repo
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "assets": [
    ],
  • "assignee": {
    },
  • "assignees": [
    ],
  • "body": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "comments": 0,
  • "content_version": 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,
  • "projects": [
    ],
  • "pull_request": {
    },
  • "ref": "string",
  • "repository": {
    },
  • "state": "open",
  • "time_estimate": 0,
  • "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
application/json
[
  • {
    }
]

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 any

Labels can be a list of integers representing label IDs or a list of strings representing label names

Responses

Request samples

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

Response samples

Content type
application/json
[
  • {
    }
]

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 any

Labels can be a list of integers representing label IDs or a list of strings representing label names

Responses

Request samples

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

Response samples

Content type
application/json
[
  • {
    }
]

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

Lock 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
lock_reason
string

Responses

Request samples

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

Unlock 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

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

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

The reaction content (e.g., emoji or reaction type)

Responses

Request samples

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

Response samples

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

The reaction content (e.g., emoji or reaction type)

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

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
application/json
{
  • "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

username of the user to subscribe the issue to

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

username of the user to unsubscribe from an issue

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

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

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

username of the user who spent the time working on the issue (optional)

Responses

Request samples

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

Response samples

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

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

Description provides additional context about the label's purpose

exclusive
boolean
is_archived
boolean
name
required
string

Name is the display name for the new label

Responses

Request samples

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

Response samples

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

Description provides additional context about the label's purpose

exclusive
boolean
is_archived
boolean
name
string

Name is the new display name for the label

Responses

Request samples

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

Response samples

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

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

Description provides details about the milestone

due_on
string <date-time>

Deadline is the due date for the milestone

state
string
Enum: "open" "closed"

State indicates the initial state of the milestone

title
string

Title is the title of the new milestone

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "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": "open",
  • "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
application/json
{
  • "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": "open",
  • "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

Description provides updated details about the milestone

due_on
string <date-time>

Deadline is the updated due date for the milestone

state
string
Enum: "open" "closed"

State indicates the updated state of the milestone

title
string

Title is the updated title of the milestone

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "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": "open",
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

miscellaneous

Miscellaneous endpoints

Returns a list of all gitignore templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
[
  • "string"
]

Returns information about a gitignore template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

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

Returns a list of all label templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
[
  • "string"
]

Returns all labels in a template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns a list of all license templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Returns information about a license template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the license

Responses

Response samples

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

Render a markdown document as HTML

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

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

Mode
string

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

Text
string

Text markdown to render

Wiki
boolean

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

Responses

Request samples

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

Response samples

Content type
application/json
"string"

Render raw markdown as HTML

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: text/plain
required

Request body to render

string

Responses

Response samples

Content type
application/json
"string"

Render a markup document as HTML

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

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

FilePath
string

File path for detecting extension in file mode

Mode
string

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

Text
string

Text markup to render

Wiki
boolean

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

Responses

Request samples

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

Response samples

Content type
application/json
"string"

Get default signing-key.gpg

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Get default signing-key.pub

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Get the currently authenticated token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "last_used_at": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "scopes": [
    ],
  • "user": {
    }
}

Delete the currently authenticated token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Returns the version of the Gitea application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

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

notification

User notifications

List users's notification threads

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
all
boolean

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

status-types
Array of strings

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

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

filter notifications by subject type

since
string <date-time>

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

before
string <date-time>

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mark notification threads as read, pinned or unread

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

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

all
string

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

status-types
Array of strings

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

to-status
string

Status to mark notifications as, Defaults to read.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Check if unread notifications exist

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

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

Get notification thread by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

Responses

Response samples

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

Mark notification thread as read by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

query Parameters
to-status
string
Default: "read"

Status to mark notifications as

Responses

Response samples

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

List users's notification threads on a specific repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
all
boolean

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

status-types
Array of strings

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

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

filter notifications by subject type

since
string <date-time>

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

before
string <date-time>

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
all
string

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

status-types
Array of strings

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

to-status
string

Status to mark notifications as. Defaults to read.

last_read_at
string <date-time>

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

organization

Organizations and teams

Create a repository in an organization Deprecated

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of organization

Request Body schema: application/json
auto_init
boolean

Whether the repository should be auto-initialized?

default_branch
string

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

description
string

Description of the repository to create

gitignores
string

Gitignores to use

issue_labels
string

Label-Set to use

license
string

License to use

name
required
string unique

Name of the repository to create

object_format_name
string
Enum: "sha1" "sha256"

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

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

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

TrustModel of the repository

Responses

Request samples

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

Response samples

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

Get list of organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an organization

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

The description of the organization

email
string

The email address of the organization

full_name
string

The full display name of the organization

location
string

The location of the organization

repo_admin_change_team_access
boolean

Whether repository administrators can change team access

username
required
string

username of the organization

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

possible values are public (default), limited or private

website
string

The website URL of the organization

Responses

Request samples

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

Response samples

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

Get an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization to get

Responses

Response samples

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

Delete an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

organization that is to be deleted

Responses

Edit an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization to edit

Request Body schema: application/json
required
description
string

The description of the organization

email
string

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

full_name
string

The full display name of the organization

location
string

The location of the organization

repo_admin_change_team_access
boolean

Whether repository administrators can change team access

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

possible values are public, limited or private

website
string

The website URL of the organization

Responses

Request samples

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

Response samples

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

Get org-level workflow jobs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
status
string

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

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

Get org-level runners

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
disabled
boolean

filter by disabled status (true or false)

Responses

Response samples

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

Get an organization's actions runner registration token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Responses

Get an org-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

runner_id
required
string

id of the runner

Responses

Response samples

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

Delete an org-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

runner_id
required
string

id of the runner

Responses

Update an org-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

runner_id
required
string

id of the runner

Request Body schema: application/json
disabled
required
boolean

Responses

Request samples

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

Response samples

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

Get org-level workflow runs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
event
string

workflow event name

branch
string

workflow branch

status
string

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

actor
string

triggered by user

head_sha
string

triggering sha of the workflow run

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

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

List 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
application/json
[
  • {
    }
]

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

description
string

Description of the secret to update

Responses

Request samples

Content type
application/json
{
  • "data": "string",
  • "description": "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

Get an org-level variables list

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

Get an org-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

variablename
required
string

name of the variable

Responses

Response samples

Content type
application/json
{
  • "data": "string",
  • "description": "string",
  • "name": "string",
  • "owner_id": 0,
  • "repo_id": 0
}

Update an org-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

variablename
required
string

name of the variable

Request Body schema: application/json
description
string

Description of the variable to update

name
string

New name for the variable. If the field is empty, the variable name won't be updated.

value
required
string

Value of the variable to update

Responses

Request samples

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

Create an org-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

variablename
required
string

name of the variable

Request Body schema: application/json
description
string

Description of the variable to create

value
required
string

Value of the variable to create

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "value": "string"
}

Delete an org-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

variablename
required
string

name of the variable

Responses

Response samples

Content type
application/json
{
  • "data": "string",
  • "description": "string",
  • "name": "string",
  • "owner_id": 0,
  • "repo_id": 0
}

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

Update Avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
image
string

image must be base64 encoded

Responses

Request samples

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

Delete Avatar

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Responses

List users blocked by the organization

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

Check if a user is blocked by the organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user to check

Responses

Block a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user to block

query Parameters
note
string

optional note for the block

Responses

Unblock a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user to unblock

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

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
required
active
boolean
Default: false

Whether the webhook should be active upon creation

authorization_header
string

Authorization header to include in webhook requests

branch_filter
string

Branch filter pattern to determine which branches trigger the webhook

required
object (CreateHookOptionConfig)

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

events
Array of strings

List of events that will trigger this webhook

name
string

Optional human-readable name for the webhook

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

The type of the webhook to create

Responses

Request samples

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

Response samples

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

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to get

Responses

Response samples

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

Delete a hook

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

Whether the webhook is active and will be triggered

authorization_header
string

Authorization header to include in webhook requests

branch_filter
string

Branch filter pattern to determine which branches trigger the webhook

object

Configuration settings for the webhook

events
Array of strings

List of events that trigger this webhook

name
string

Optional human-readable name

Responses

Request samples

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

Response samples

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

List 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
application/json
[
  • {
    }
]

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

Description provides additional context about the label's purpose

exclusive
boolean
is_archived
boolean
name
required
string

Name is the display name for the new label

Responses

Request samples

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

Response samples

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

Description provides additional context about the label's purpose

exclusive
boolean
is_archived
boolean
name
string

Name is the new display name for the label

Responses

Request samples

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

Response samples

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

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 to check for an organization membership

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 to remove from the organization

Responses

List an organization's projects

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

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

State of the project (open, closed, all)

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a project owned by an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
card_type
string

Card type: "text_only" or "images_and_text"

description
string
template_type
string

Template type: "none", "basic_kanban" or "bug_triage"

title
required
string

Responses

Request samples

Content type
application/json
{
  • "card_type": "string",
  • "description": "string",
  • "template_type": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "card_type": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "creator_id": 0,
  • "description": "string",
  • "html_url": "string",
  • "id": 0,
  • "is_closed": true,
  • "num_closed_issues": 0,
  • "num_issues": 0,
  • "num_open_issues": 0,
  • "owner_id": 0,
  • "repo_id": 0,
  • "state": "open",
  • "template_type": "string",
  • "title": "string",
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a project

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

Responses

Response samples

Content type
application/json
{
  • "card_type": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "creator_id": 0,
  • "description": "string",
  • "html_url": "string",
  • "id": 0,
  • "is_closed": true,
  • "num_closed_issues": 0,
  • "num_issues": 0,
  • "num_open_issues": 0,
  • "owner_id": 0,
  • "repo_id": 0,
  • "state": "open",
  • "template_type": "string",
  • "title": "string",
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a project

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

Responses

Edit a project

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

Request Body schema: application/json
card_type
string

Card type: "text_only" or "images_and_text"

description
string
state
string
Enum: "open" "closed"
title
string

Responses

Request samples

Content type
application/json
{
  • "card_type": "string",
  • "description": "string",
  • "state": "open",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "card_type": "string",
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "creator_id": 0,
  • "description": "string",
  • "html_url": "string",
  • "id": 0,
  • "is_closed": true,
  • "num_closed_issues": 0,
  • "num_issues": 0,
  • "num_open_issues": 0,
  • "owner_id": 0,
  • "repo_id": 0,
  • "state": "open",
  • "template_type": "string",
  • "title": "string",
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List a project's columns

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a column in a project

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

Request Body schema: application/json
color
string

Column color in 6-digit hex format, e.g. #FF0000

title
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "color": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "default": true,
  • "id": 0,
  • "project_id": 0,
  • "sorting": 0,
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Reorder a project's columns

Reorders every column of the project at once. The body lists all column IDs in their new order.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

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

Every column ID of the project, in the desired left-to-right order

Responses

Request samples

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

Get a project column

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

Responses

Response samples

Content type
application/json
{
  • "color": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "default": true,
  • "id": 0,
  • "project_id": 0,
  • "sorting": 0,
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a project column

The default column cannot be deleted while it is still the column new issues land in.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

Responses

Edit a project column

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

Request Body schema: application/json
color
string

Column color in 6-digit hex format, e.g. #FF0000

sorting
integer <int64>

Position of the column within the project, between -128 and 127

title
string

Responses

Request samples

Content type
application/json
{
  • "color": "string",
  • "sorting": 0,
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "color": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "default": true,
  • "id": 0,
  • "project_id": 0,
  • "sorting": 0,
  • "title": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Set a project's default column

The default column is where newly assigned issues land.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

Responses

List the issues in a project column

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add an issue to a project column

Assigns the issue to the project if it is not a member yet, then places it in the column.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

issue_id
required
integer <int64>

global id of the issue, not the repository-local index

Responses

Remove an issue from a project column

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

column_id
required
integer <int64>

id of the column

issue_id
required
integer <int64>

global id of the issue, not the repository-local index

Responses

Move an issue between a project's columns

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the project

issue_id
required
integer <int64>

global id of the issue, not the repository-local index

Request Body schema: application/json
column_id
required
integer <int64>

Target column to move the issue into

sorting
integer <int64>

Position within the column, ascending. Omit to append. Negative values sort above the rest, equal values are ordered newest first.

Responses

Request samples

Content type
application/json
{
  • "column_id": 0,
  • "sorting": 0
}

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

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 to check for a public organization membership

Responses

Publicize a user's membership

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user whose membership is to be publicized

Responses

Conceal a user's membership

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

username
required
string

username of the user whose membership is to be concealed

Responses

Rename an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

existing org name

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

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

Responses

Request samples

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

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

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

object_format_name
string
Enum: "sha1" "sha256"

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

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

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

TrustModel of the repository

Responses

Request samples

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

Response samples

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

Delete all repositories in an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Responses

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

Create a team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

Request Body schema: application/json
can_create_org_repo
boolean

Whether the team can create repositories in the organization

description
string

The description of the team

includes_all_repositories
boolean

Whether the team has access to all repositories in the organization

name
required
string
permission
string
Enum: "read" "write" "admin"
units
Array of strings

Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.

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

Team visibility within the organization. Defaults to "private".

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": {
    },
  • "visibility": "public"
}

Response samples

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

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
application/json
{
  • "can_create_org_repo": true,
  • "description": "string",
  • "id": 0,
  • "includes_all_repositories": true,
  • "name": "string",
  • "organization": {
    },
  • "permission": "none",
  • "units": [
    ],
  • "units_map": {
    },
  • "visibility": "public"
}

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

Whether the team can create repositories in the organization

description
string

The description of the team

includes_all_repositories
boolean

Whether the team has access to all repositories in the organization

name
required
string
permission
string
Enum: "read" "write" "admin"
units
Array of strings

Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.

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

Team visibility within the organization. When omitted, visibility is left unchanged.

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": {
    },
  • "visibility": "public"
}

Response samples

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

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

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

List a particular member of team

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the team

username
required
string

username of the user whose data is to be listed

Responses

Response samples

Content type
application/json
{
  • "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",
  • "html_url": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "source_id": 0,
  • "starred_repos_count": 0,
  • "visibility": "public",
  • "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 to a team

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 from a team

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

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

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

List a user's organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose organizations are to be listed

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get user permissions in organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user whose permissions are to be obtained

org
required
string

name of the organization

Responses

Response samples

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

package

Package registry

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" "terraform" "vagrant"

package type filter

q
string

name filter

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Gets all versions 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

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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

Responses

Gets the latest version 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

Responses

Response samples

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

Link a package to a repository

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

repo_name
required
string

name of the repository to link.

Responses

Unlink a package from a repository

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

Responses

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
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "html_url": "string",
  • "id": 0,
  • "name": "string",
  • "owner": {
    },
  • "repository": {
    },
  • "type": "string",
  • "version": "string"
}

Delete a package version

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

repository

Repositories and their contents

Migrate a remote git repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: application/json
auth_password
string
auth_token
string
auth_username
string
aws_access_key_id
string
aws_secret_access_key
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

the organization's name or individual user's name who will own the migrated repository

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

deprecated (only for backwards compatibility, use repo_owner instead)

wiki
boolean

Responses

Request samples

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

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

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: application/json

Properties of a repo that you can edit

allow_fast_forward_only_merge
boolean

either true to allow fast-forward-only merging pull requests, or false to prevent fast-forward-only merging.

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_merge_update
boolean

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

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", "squash", or "fast-forward-only".

default_update_style
string

set to an update style to be used by this repository: "merge" or "rebase".

description
string

a short description of the repository.

enable_prune
boolean

enable prune - remove obsolete remote-tracking references when mirroring

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_code
boolean

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

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

mirror_password
string

authentication password for the remote repository (mirrors)

mirror_token
string

authentication token for the remote repository (mirrors)

mirror_username
string

authentication username for the remote repository (mirrors)

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.

projects_mode
string

repo to only allow repo-level projects, owner to only allow owner projects, all to allow both.

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
application/json
{
  • "allow_fast_forward_only_merge": true,
  • "allow_manual_merge": true,
  • "allow_merge_commits": true,
  • "allow_merge_update": 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",
  • "default_update_style": "string",
  • "description": "string",
  • "enable_prune": true,
  • "external_tracker": {
    },
  • "external_wiki": {
    },
  • "has_actions": true,
  • "has_code": true,
  • "has_issues": true,
  • "has_packages": true,
  • "has_projects": true,
  • "has_pull_requests": true,
  • "has_releases": true,
  • "has_wiki": true,
  • "ignore_whitespace_conflicts": true,
  • "internal_tracker": {
    },
  • "mirror_interval": "string",
  • "mirror_password": "string",
  • "mirror_token": "string",
  • "mirror_username": "string",
  • "name": "string",
  • "private": true,
  • "projects_mode": "string",
  • "template": true,
  • "website": "string"
}

Response samples

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

Lists all artifacts for a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

query Parameters
name
string

name of the artifact

Responses

Response samples

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

Gets a specific artifact for a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

artifact_id
required
string

id of the artifact

Responses

Response samples

Content type
application/json
{
  • "archive_download_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "expired": true,
  • "expires_at": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "name": "string",
  • "size_in_bytes": 0,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string",
  • "workflow_run": {
    }
}

Deletes a specific artifact for a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

artifact_id
required
string

id of the artifact

Responses

Downloads a specific artifact for a workflow run redirects to blob url

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

artifact_id
required
string

id of the artifact

Responses

Lists all jobs for a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

query Parameters
status
string

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

sort
string

sort jobs by attribute. Supported values are "id". Default is "id"

order
string

sort order, either "asc" (ascending) or "desc" (descending). Default is "asc"

Responses

Response samples

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

Gets a specific workflow job for a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

job_id
required
string

id of the job

Responses

Response samples

Content type
application/json
{
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "head_branch": "string",
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "labels": [
    ],
  • "name": "string",
  • "run_attempt": 0,
  • "run_id": 0,
  • "run_url": "string",
  • "runner_id": 0,
  • "runner_name": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "steps": [
    ],
  • "url": "string"
}

Downloads the job logs for a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

job_id
required
integer

id of the job

Responses

Get repo-level runners

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
disabled
boolean

filter by disabled status (true or false)

Responses

Response samples

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

Get a repository's actions runner registration token

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Get a repo-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

runner_id
required
string

id of the runner

Responses

Response samples

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

Delete a repo-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

runner_id
required
string

id of the runner

Responses

Update a repo-level runner

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

runner_id
required
string

id of the runner

Request Body schema: application/json
disabled
required
boolean

Responses

Request samples

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

Response samples

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

Lists all runs for a repository run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

query Parameters
event
string

workflow event name

branch
string

workflow branch

status
string

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

actor
string

triggered by user

head_sha
string

triggering sha of the workflow run

exclude_pull_requests
boolean

if true, the pull_requests field on each returned run is emptied

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

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

Gets a specific workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

id of the run

Responses

Response samples

Content type
application/json
{
  • "actor": {
    },
  • "artifacts_url": "string",
  • "cancel_url": "string",
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_title": "string",
  • "event": "string",
  • "head_branch": "string",
  • "head_repository": {
    },
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "jobs_url": "string",
  • "logs_url": "string",
  • "path": "string",
  • "previous_attempt_url": "string",
  • "pull_requests": [
    ],
  • "repository": {
    },
  • "repository_id": 0,
  • "rerun_url": "string",
  • "run_attempt": 0,
  • "run_number": 0,
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "trigger_actor": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Delete a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

runid of the workflow run

Responses

Approve a workflow run that requires approval

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

run ID

Responses

Response samples

Content type
application/json
{
  • "actor": {
    },
  • "artifacts_url": "string",
  • "cancel_url": "string",
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_title": "string",
  • "event": "string",
  • "head_branch": "string",
  • "head_repository": {
    },
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "jobs_url": "string",
  • "logs_url": "string",
  • "path": "string",
  • "previous_attempt_url": "string",
  • "pull_requests": [
    ],
  • "repository": {
    },
  • "repository_id": 0,
  • "rerun_url": "string",
  • "run_attempt": 0,
  • "run_number": 0,
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "trigger_actor": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Lists all artifacts for a repository run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

runid of the workflow run

query Parameters
name
string

name of the artifact

Responses

Response samples

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

Gets a specific workflow run attempt

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

id of the run

attempt
required
integer

logical attempt number of the run

Responses

Response samples

Content type
application/json
{
  • "actor": {
    },
  • "artifacts_url": "string",
  • "cancel_url": "string",
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_title": "string",
  • "event": "string",
  • "head_branch": "string",
  • "head_repository": {
    },
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "jobs_url": "string",
  • "logs_url": "string",
  • "path": "string",
  • "previous_attempt_url": "string",
  • "pull_requests": [
    ],
  • "repository": {
    },
  • "repository_id": 0,
  • "rerun_url": "string",
  • "run_attempt": 0,
  • "run_number": 0,
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "trigger_actor": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Lists all jobs for a workflow run attempt

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

id of the workflow run

attempt
required
integer

logical attempt number of the run

query Parameters
status
string

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

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

Cancel a workflow run and its jobs

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

run ID

Responses

Response samples

Content type
application/json
{
  • "actor": {
    },
  • "artifacts_url": "string",
  • "cancel_url": "string",
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_title": "string",
  • "event": "string",
  • "head_branch": "string",
  • "head_repository": {
    },
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "jobs_url": "string",
  • "logs_url": "string",
  • "path": "string",
  • "previous_attempt_url": "string",
  • "pull_requests": [
    ],
  • "repository": {
    },
  • "repository_id": 0,
  • "rerun_url": "string",
  • "run_attempt": 0,
  • "run_number": 0,
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "trigger_actor": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Force-cancel a workflow run

Cancels a workflow run without waiting for its runners to acknowledge the cancellation. The jobs are marked cancelled at once and anything a runner reports for them afterwards is discarded. Only use this endpoint when the workflow run does not respond to POST /repos/{owner}/{repo}/actions/runs/{run}/cancel.

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

run ID

Responses

Response samples

Content type
application/json
{
  • "actor": {
    },
  • "artifacts_url": "string",
  • "cancel_url": "string",
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_title": "string",
  • "event": "string",
  • "head_branch": "string",
  • "head_repository": {
    },
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "jobs_url": "string",
  • "logs_url": "string",
  • "path": "string",
  • "previous_attempt_url": "string",
  • "pull_requests": [
    ],
  • "repository": {
    },
  • "repository_id": 0,
  • "rerun_url": "string",
  • "run_attempt": 0,
  • "run_number": 0,
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "trigger_actor": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Lists all jobs for a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

runid of the workflow run

query Parameters
status
string

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

sort
string

sort jobs by attribute. Supported values are "id". Default is "id"

order
string

sort order, either "asc" (ascending) or "desc" (descending). Default is "asc"

Responses

Response samples

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

Reruns a specific workflow job in a run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

id of the run

job_id
required
integer

id of the job

Responses

Response samples

Content type
application/json
{
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "head_branch": "string",
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "labels": [
    ],
  • "name": "string",
  • "run_attempt": 0,
  • "run_id": 0,
  • "run_url": "string",
  • "runner_id": 0,
  • "runner_name": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "steps": [
    ],
  • "url": "string"
}

Download workflow run logs as archive

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

run ID

Responses

Reruns an entire workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

id of the run

Responses

Response samples

Content type
application/json
{
  • "actor": {
    },
  • "artifacts_url": "string",
  • "cancel_url": "string",
  • "completed_at": "2019-08-24T14:15:22Z",
  • "conclusion": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_title": "string",
  • "event": "string",
  • "head_branch": "string",
  • "head_repository": {
    },
  • "head_sha": "string",
  • "html_url": "string",
  • "id": 0,
  • "jobs_url": "string",
  • "logs_url": "string",
  • "path": "string",
  • "previous_attempt_url": "string",
  • "pull_requests": [
    ],
  • "repository": {
    },
  • "repository_id": 0,
  • "rerun_url": "string",
  • "run_attempt": 0,
  • "run_number": 0,
  • "started_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "trigger_actor": {
    },
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Reruns all failed jobs in a workflow run

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

run
required
integer

id of the run

Responses

List a repo's actions secrets

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create 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

description
string

Description of the secret to update

Responses

Request samples

Content type
application/json
{
  • "data": "string",
  • "description": "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 action tasks

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
application/json
{
  • "total_count": 0,
  • "workflow_runs": [
    ]
}

Get repo-level variables list

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a repo-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

variablename
required
string

name of the variable

Responses

Response samples

Content type
application/json
{
  • "data": "string",
  • "description": "string",
  • "name": "string",
  • "owner_id": 0,
  • "repo_id": 0
}

Update a repo-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

variablename
required
string

name of the variable

Request Body schema: application/json
description
string

Description of the variable to update

name
string

New name for the variable. If the field is empty, the variable name won't be updated.

value
required
string

Value of the variable to update

Responses

Request samples

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

Create a repo-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

variablename
required
string

name of the variable

Request Body schema: application/json
description
string

Description of the variable to create

value
required
string

Value of the variable to create

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "value": "string"
}

Delete a repo-level variable

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repository

variablename
required
string

name of the variable

Responses

Response samples

Content type
application/json
{
  • "data": "string",
  • "description": "string",
  • "name": "string",
  • "owner_id": 0,
  • "repo_id": 0
}

List repository workflows

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Response samples

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

Get a workflow

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

workflow_id
required
string

id of the workflow

Responses

Response samples

Content type
application/json
{
  • "badge_url": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "deleted_at": "2019-08-24T14:15:22Z",
  • "html_url": "string",
  • "id": "string",
  • "name": "string",
  • "path": "string",
  • "state": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "url": "string"
}

Disable a workflow

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

workflow_id
required
string

id of the workflow

Responses

Create a workflow dispatch event

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

workflow_id
required
string

id of the workflow

query Parameters
return_run_details
boolean

Whether the response should include the workflow run ID and URLs.

scoped_workflow_source_repo_id
integer <int64>

For a scoped workflow, the ID of the source repository providing it; omit or 0 for a repo-level workflow.

Request Body schema: application/json
object
ref
required
string

Responses

Request samples

Content type
application/json
{
  • "inputs": {
    },
  • "ref": "refs/heads/main"
}

Response samples

Content type
application/json
{
  • "html_url": "string",
  • "run_url": "string",
  • "workflow_run_id": 0
}

Enable a workflow

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

workflow_id
required
string

id of the workflow

Responses

List runs for a workflow

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

workflow_id
required
string

id of the workflow, must be the workflow file name (e.g. build.yml)

query Parameters
event
string

workflow event name

branch
string

workflow branch

status
string

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

actor
string

triggered by user

head_sha
string

triggering sha of the workflow run

exclude_pull_requests
boolean

if true, the pull_requests field on each returned run is emptied

scoped_workflow_source_repo_id
integer <int64>

For a scoped workflow, the ID of the source repository providing it; omit or 0 for a repo-level workflow.

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

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

List 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
application/json
[
  • {