跳到主要内容

Gitea API. (1.20.6)

Download OpenAPI specification:Download

License: MIT

This documentation describes the Gitea API.

activitypub

Returns the Person actor for a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
user-id
required
integer

user ID of the user

Responses

Response samples

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

Send to the inbox

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
user-id
required
integer

user ID of the user

Responses

admin

List cron tasks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Run cron task

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
task
required
string

task to run

Responses

List all emails

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Search all emails

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
q
string

keyword

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List system's webhooks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a hook

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

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

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

Responses

Request samples

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

Response samples

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

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to get

Responses

Response samples

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

Delete a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to delete

Responses

Update a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
integer <int64>

id of the hook to update

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

Responses

Request samples

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

Response samples

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

List all organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

List unadopted repositories

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

pattern
string

pattern of repositories to search for

Responses

Response samples

Content type
[
  • "string"
]

Adopt unadopted files as a repository

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Delete unadopted files

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

Responses

Search users according filter conditions

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
source_id
integer <int64>

ID of the user's login source to search for

login_name
string

user's login name to search for

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a user

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

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

email
required
string <email>
full_name
string
login_name
string
must_change_password
boolean
password
required
string
restricted
boolean
send_notify
boolean
source_id
integer <int64>
username
required
string
visibility
string

Responses

Request samples

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

Response samples

Content type
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Delete a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user to delete

query Parameters
purge
boolean

purge the user from the system completely

Responses

Edit an existing user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user to edit

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

Responses

Request samples

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

Response samples

Content type
{
  • "active": true,
  • "avatar_url": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "email": "user@example.com",
  • "followers_count": 0,
  • "following_count": 0,
  • "full_name": "string",
  • "id": 0,
  • "is_admin": true,
  • "language": "string",
  • "last_login": "2019-08-24T14:15:22Z",
  • "location": "string",
  • "login": "string",
  • "login_name": "empty",
  • "prohibit_login": true,
  • "restricted": true,
  • "starred_repos_count": 0,
  • "visibility": "string",
  • "website": "string"
}

Add a public key on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user

Request Body schema: application/json
key
required
string unique

An armored SSH key to add

read_only
boolean

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

title
required
string unique

Title of the key to add

Responses

Request samples

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

Response samples

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

Delete a user's public key

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of user

id
required
integer <int64>

id of the key to delete

Responses

Create an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user that will own the created organization

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

possible values are public (default), limited or private

website
string

Responses

Request samples

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

Response samples

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

Rename a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

existing username of user

Request Body schema:
required
new_username
required
string unique

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

Responses

Request samples

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

Create a repository on behalf of a user

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
username
required
string

username of the user. This user will own the created repository

Request Body schema: application/json
required
auto_init
boolean

Whether the repository should be auto-initialized?

default_branch
string

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

description
string

Description of the repository to create

gitignores
string

Gitignores to use

issue_labels
string

Label-Set to use

license
string

License to use

name
required
string unique

Name of the repository to create

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

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

TrustModel of the repository

Responses

Request samples

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

Response samples

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

miscellaneous

Returns a list of all gitignore templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • "string"
]

Returns information about a gitignore template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

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

Returns a list of all label templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • "string"
]

Returns all labels in a template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the template

Responses

Response samples

Content type
[
  • {
    }
]

Returns a list of all license templates

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
[
  • {
    }
]

Returns information about a license template

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
name
required
string

name of the license

Responses

Response samples

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

Render a markdown document as HTML

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

Context to render

in: body

Mode
string

Mode to render (comment, gfm, markdown)

in: body

Text
string

Text markdown to render

in: body

Wiki
boolean

Is it a wiki page ?

in: body

Responses

Request samples

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

Response samples

Content type
"string"

Render raw markdown as HTML

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
Request Body schema: text/plain
required

Request body to render

string

Responses

Response samples

Content type
"string"

Render a markup document as HTML

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

Context to render

in: body

FilePath
string

File path for detecting extension in file mode

in: body

Mode
string

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

in: body

Text
string

Text markup to render

in: body

Wiki
boolean

Is it a wiki page ?

in: body

Responses

Request samples

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

Response samples

Content type
"string"

Returns the nodeinfo of the Gitea application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

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

Get default signing-key.gpg

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Returns the version of the Gitea application

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

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

notification

List users's notification threads

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
all
boolean

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

status-types
Array of strings

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

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

filter notifications by subject type

since
string <date-time>

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

before
string <date-time>

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Mark notification threads as read, pinned or unread

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

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

all
string

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

status-types
Array of strings

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

to-status
string

Status to mark notifications as, Defaults to read.

Responses

Response samples

Content type
[
  • {
    }
]

Check if unread notifications exist

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader

Responses

Response samples

Content type
{
  • "new": 0
}

Get notification thread by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

Responses

Response samples

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

Mark notification thread as read by ID

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
id
required
string

id of notification thread

query Parameters
to-status
string
Default: "read"

Status to mark notifications as

Responses

Response samples

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

List users's notification threads on a specific repo

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
all
boolean

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

status-types
Array of strings

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

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

filter notifications by subject type

since
string <date-time>

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

before
string <date-time>

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

page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

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

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
owner
required
string

owner of the repo

repo
required
string

name of the repo

query Parameters
all
string

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

status-types
Array of strings

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

to-status
string

Status to mark notifications as. Defaults to read.

last_read_at
string <date-time>

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

Responses

Response samples

Content type
[
  • {
    }
]

organization

Create a repository in an organization Deprecated

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of organization

Request Body schema: application/json
auto_init
boolean

Whether the repository should be auto-initialized?

default_branch
string

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

description
string

Description of the repository to create

gitignores
string

Gitignores to use

issue_labels
string

Label-Set to use

license
string

License to use

name
required
string unique

Name of the repository to create

private
boolean

Whether the repository is private

readme
string

Readme of the repository to create

template
boolean

Whether the repository is template

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

TrustModel of the repository

Responses

Request samples

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

Response samples

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

Get list of organizations

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create an organization

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

possible values are public (default), limited or private

website
string

Responses

Request samples

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

Response samples

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

Get an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization to get

Responses

Response samples

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

Delete an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

organization that is to be deleted

Responses

Edit an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization to edit

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

possible values are public, limited or private

website
string

Responses

Request samples

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

Response samples

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

List an organization's 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
[
  • {
    }
]

List an organization's webhooks

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

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

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

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

Responses

Request samples

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

Response samples

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

Get a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to get

Responses

Response samples

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

Delete a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to delete

Responses

Update a hook

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

id
required
integer <int64>

id of the hook to update

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

Responses

Request samples

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

Response samples

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

List an organization's labels

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string

name of the organization

query Parameters
page
integer

page number of results to return (1-based)

limit
integer

page size of results

Responses

Response samples

Content type
[
  • {
    }
]

Create a label for an organization

Authorizations:
BasicAuthTokenAccessTokenAuthorizationHeaderTokenSudoParamSudoHeaderTOTPHeader
path Parameters
org
required
string