GitHub API API documentation version v3
https://api.github.com/
/search
Search repositories.
get /search/repositories
Search repositories.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- q: required (string)
The search terms. This can be any combination of the supported repository search parameters: 'Search In' Qualifies which fields are searched. With this qualifier you can restrict the search to just the repository name, description, readme, or any combination of these. 'Size' Finds repositories that match a certain size (in kilobytes). 'Forks' Filters repositories based on the number of forks, and/or whether forked repositories should be included in the results at all. 'Created' and 'Last Updated' Filters repositories based on times of creation, or when they were last updated. 'Users or Repositories' Limits searches to a specific user or repository. 'Languages' Searches repositories based on the language they're written in. 'Stars' Searches repositories based on the number of stars.
- sort: (one of stars,forks,updated)
If not provided, results are sorted by best match.
- order: (one of asc,desc - default: desc)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"total_count": {
"type": "integer"
},
"items": [
{
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"private": {
"type": "boolean"
},
"html_url": {
"type": "string"
},
"description": {
"type": "string"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"homepage": {
"type": "string"
},
"size": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"language": {
"type": "string"
},
"forks_count": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"forks": {
"type": "integer"
},
"open_issues": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"default_branch": {
"type": "string"
},
"score": {
"type": "number"
}
},
"type": "object"
}
],
"type": "array"
}
}
Example:
{
"total_count": 40,
"items": [
{
"id": 3081286,
"name": "Tetris",
"full_name": "dtrupenn/Tetris",
"owner": {
"login": "dtrupenn",
"id": 872147,
"avatar_url": "https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com/images/gravatars/gravatar-user-420.png",
"gravatar_id": "e7956084e75f239de85d3a31bc172ace",
"url": "https://api.github.com/users/dtrupenn",
"received_events_url": "https://api.github.com/users/dtrupenn/received_events",
"type": "User"
},
"private": false,
"html_url": "https://github.com/dtrupenn/Tetris",
"description": "A C implementation of Tetris using Pennsim through LC4",
"fork": false,
"url": "https://api.github.com/repos/dtrupenn/Tetris",
"created_at": "2012-01-01T00:31:50Z",
"updated_at": "2013-01-05T17:58:47Z",
"pushed_at": "2012-01-01T00:37:02Z",
"homepage": "",
"size": 524,
"watchers_count": 1,
"language": "Assembly",
"forks_count": 0,
"open_issues_count": 0,
"forks": 0,
"open_issues": 0,
"watchers": 1,
"master_branch": "master",
"default_branch": "master",
"score": 10.309712
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Search code.
get /search/code
Search code.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- q: required (string)
The search terms. This can be any combination of the supported code search parameters: 'Search In' Qualifies which fields are searched. With this qualifier you can restrict the search to just the file contents, the file path, or both. 'Languages' Searches code based on the language it's written in. 'Forks' Filters repositories based on the number of forks, and/or whether code from forked repositories should be included in the results at all. 'Size' Finds files that match a certain size (in bytes). 'Path' Specifies the path that the resulting file must be at. 'Extension' Matches files with a certain extension. 'Users' or 'Repositories' Limits searches to a specific user or repository.
- sort: (one of indexed)
Can only be 'indexed', which indicates how recently a file has been indexed by the GitHub search infrastructure. If not provided, results are sorted by best match.
- order: (one of asc,desc - default: desc)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"total_count": {
"type": "integer"
},
"items": [
{
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"repository": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"followers_url": {
"type": "string"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string"
},
"organizations_url": {
"type": "string"
},
"repos_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"private": {
"type": "boolean"
},
"html_url": {
"type": "string"
},
"description": {
"type": "string"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"forks_url": {
"type": "string"
},
"keys_url": {
"type": "string"
},
"collaborators_url": {
"type": "string"
},
"teams_url": {
"type": "string"
},
"hooks_url": {
"type": "string"
},
"issue_events_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"assignees_url": {
"type": "string"
},
"branches_url": {
"type": "string"
},
"tags_url": {
"type": "string"
},
"blobs_url": {
"type": "string"
},
"git_tags_url": {
"type": "string"
},
"git_refs_url": {
"type": "string"
},
"trees_url": {
"type": "string"
},
"statuses_url": {
"type": "string"
},
"languages_url": {
"type": "string"
},
"stargazers_url": {
"type": "string"
},
"contributors_url": {
"type": "string"
},
"subscribers_url": {
"type": "string"
},
"subscription_url": {
"type": "string"
},
"commits_url": {
"type": "string"
},
"git_commits_url": {
"type": "string"
},
"comments_url": {
"type": "string"
},
"issue_comment_url": {
"type": "string"
},
"contents_url": {
"type": "string"
},
"compare_url": {
"type": "string"
},
"merges_url": {
"type": "string"
},
"archive_url": {
"type": "string"
},
"downloads_url": {
"type": "string"
},
"issues_url": {
"type": "string"
},
"pulls_url": {
"type": "string"
},
"milestones_url": {
"type": "string"
},
"notifications_url": {
"type": "string"
},
"labels_url": {
"type": "string"
}
},
"type": "object"
},
"score": {
"type": "number"
}
},
"type": "object"
}
],
"type": "array"
}
}
Example:
{
"total_count": 104,
"items": [
{
"name": "github-issue-importer.gemspec",
"path": "github-issue-importer.gemspec",
"sha": "394508202991504d8a0771ae027454facaaa045a",
"url": "https://api.github.com/repositories/1586630/contents/github-issue-importer.gemspec?ref=aa22a4be513163c73531e96bd99f4b49d6ded8a6",
"git_url": "https://api.github.com/repositories/1586630/git/blobs/394508202991504d8a0771ae027454facaaa045a",
"html_url": "https://github.com/johnf/github-issue-importer/blob/aa22a4be513163c73531e96bd99f4b49d6ded8a6/github-issue-importer.gemspec",
"repository": {
"id": 1586630,
"name": "github-issue-importer",
"full_name": "johnf/github-issue-importer",
"owner": {
"login": "johnf",
"id": 42590,
"avatar_url": "https://secure.gravatar.com/avatar/ab4d879ba3233a270aa14f447c795505?d=https://a248.e.akamai.net/assets.github.com/images/gravatars/gravatar-user-420.png",
"gravatar_id": "ab4d879ba3233a270aa14f447c795505",
"url": "https://api.github.com/users/johnf",
"html_url": "https://github.com/johnf",
"followers_url": "https://api.github.com/users/johnf/followers",
"following_url": "https://api.github.com/users/johnf/following{/other_user}",
"gists_url": "https://api.github.com/users/johnf/gists{/gist_id}",
"starred_url": "https://api.github.com/users/johnf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/johnf/subscriptions",
"organizations_url": "https://api.github.com/users/johnf/orgs",
"repos_url": "https://api.github.com/users/johnf/repos",
"events_url": "https://api.github.com/users/johnf/events{/privacy}",
"received_events_url": "https://api.github.com/users/johnf/received_events",
"type": "User"
},
"private": false,
"html_url": "https://github.com/johnf/github-issue-importer",
"description": "Import Issues from Launchpad (for now) into github",
"fork": false,
"url": "https://api.github.com/repos/johnf/github-issue-importer",
"forks_url": "https://api.github.com/repos/johnf/github-issue-importer/forks",
"keys_url": "https://api.github.com/repos/johnf/github-issue-importer/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/johnf/github-issue-importer/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/johnf/github-issue-importer/teams",
"hooks_url": "https://api.github.com/repos/johnf/github-issue-importer/hooks",
"issue_events_url": "https://api.github.com/repos/johnf/github-issue-importer/issues/events{/number}",
"events_url": "https://api.github.com/repos/johnf/github-issue-importer/events",
"assignees_url": "https://api.github.com/repos/johnf/github-issue-importer/assignees{/user}",
"branches_url": "https://api.github.com/repos/johnf/github-issue-importer/branches{/branch}",
"tags_url": "https://api.github.com/repos/johnf/github-issue-importer/tags",
"blobs_url": "https://api.github.com/repos/johnf/github-issue-importer/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/johnf/github-issue-importer/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/johnf/github-issue-importer/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/johnf/github-issue-importer/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/johnf/github-issue-importer/statuses/{sha}",
"languages_url": "https://api.github.com/repos/johnf/github-issue-importer/languages",
"stargazers_url": "https://api.github.com/repos/johnf/github-issue-importer/stargazers",
"contributors_url": "https://api.github.com/repos/johnf/github-issue-importer/contributors",
"subscribers_url": "https://api.github.com/repos/johnf/github-issue-importer/subscribers",
"subscription_url": "https://api.github.com/repos/johnf/github-issue-importer/subscription",
"commits_url": "https://api.github.com/repos/johnf/github-issue-importer/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/johnf/github-issue-importer/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/johnf/github-issue-importer/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/johnf/github-issue-importer/issues/comments/{number}",
"contents_url": "https://api.github.com/repos/johnf/github-issue-importer/contents/{ path}",
"compare_url": "https://api.github.com/repos/johnf/github-issue-importer/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/johnf/github-issue-importer/merges",
"archive_url": "https://api.github.com/repos/johnf/github-issue-importer/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/johnf/github-issue-importer/downloads",
"issues_url": "https://api.github.com/repos/johnf/github-issue-importer/issues{/number}",
"pulls_url": "https://api.github.com/repos/johnf/github-issue-importer/pulls{/number}",
"milestones_url": "https://api.github.com/repos/johnf/github-issue-importer/milestones{/number}",
"notifications_url": "https://api.github.com/repos/johnf/github-issue-importer/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/johnf/github-issue-importer/labels{/name}"
},
"score": 0.96691436
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Search users.
get /search/users
Search users.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- q: required (string)
The search terms. This can be any combination of the supported user search parameters: 'Search In' Qualifies which fields are searched. With this qualifier you can restrict the search to just the username, public email, full name, location, or any combination of these. 'Repository count' Filters users based on the number of repositories they have. 'Location' Filter users by the location indicated in their profile. 'Language' Search for users that have repositories that match a certain language. 'Created' Filter users based on when they joined. 'Followers' Filter users based on the number of followers they have.
- sort: (one of followers,repositories,joined)
If not provided, results are sorted by best match.
- order: (one of asc,desc - default: desc)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"total_count": {
"type": "integer"
},
"items": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"followers_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string"
},
"organizations_url": {
"type": "string"
},
"repos_url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
},
"score": {
"type": "number"
}
},
"type": "object"
}
],
"type": "array"
}
}
Example:
{
"total_count": 12,
"items": [
{
"login": "mojombo",
"id": 1,
"avatar_url": "https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com/images/gravatars/gravatar-user-420.png",
"gravatar_id": "25c7c18223fb42a4c6ae1c8db6f50f9b",
"url": "https://api.github.com/users/mojombo",
"html_url": "https://github.com/mojombo",
"followers_url": "https://api.github.com/users/mojombo/followers",
"subscriptions_url": "https://api.github.com/users/mojombo/subscriptions",
"organizations_url": "https://api.github.com/users/mojombo/orgs",
"repos_url": "https://api.github.com/users/mojombo/repos",
"received_events_url": "https://api.github.com/users/mojombo/received_events",
"type": "User",
"score": 105.47857
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/events
List public events.
get /events
List public events.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/feeds
List Feeds. GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticating user.
get /feeds
List Feeds. GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticating user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"timeline_url": {
"type": "string"
},
"user_url": {
"type": "string"
},
"current_user_public": {
"type": "string"
},
"current_user_url": {
"type": "string"
},
"current_user_actor_url": {
"type": "string"
},
"current_user_organization_url": {
"type": "string"
},
"_links": {
"properties": {
"timeline": {
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"user": {
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"current_user_public": {
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"current_user": {
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"current_user_actor": {
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"current_user_organization": {
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
}
}
}
}
Example:
{
"timeline_url": "https://github.com/timeline",
"user_url": "https://github.com/{user}",
"current_user_public": "https://github.com/defunkt",
"current_user_url": "https://github.com/defunkt.private?token=abc123",
"current_user_actor_url": "https://github.com/defunkt.private.actor?token=abc123",
"current_user_organization_url": "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123",
"_links": {
"timeline": {
"href": "https://github.com/timeline",
"type": "application/atom xml"
},
"user": {
"href": "https://github.com/{user}",
"type": "application/atom xml"
},
"current_user_public": {
"href": "https://github.com/defunkt",
"type": "application/atom xml"
},
"current_user": {
"href": "https://github.com/defunkt.private?token=abc123",
"type": "application/atom xml"
},
"current_user_actor": {
"href": "https://github.com/defunkt.private.actor?token=abc123",
"type": "application/atom xml"
},
"current_user_organization": {
"href": "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123",
"type": "application/atom xml"
}
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/meta
This gives some information about GitHub.com, the service.
get /meta
This gives some information about GitHub.com, the service.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"hooks": [
{
"description": "An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from.",
"type": "string"
}
],
"type": "array",
"git": [
{
"description": "An Array of IP addresses in CIDR format specifying the Git servers at GitHub.",
"type": "string"
}
]
}
}
Example:
{
"hooks": [
"127.0.0.1/32"
],
"git": [
"127.0.0.1/32"
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/rate_limit
Get your current rate limit status Note: Accessing this endpoint does not count against your rate limit.
get /rate_limit
Get your current rate limit status Note: Accessing this endpoint does not count against your rate limit.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"rate": {
"properties": {
"limit": {
"type": "integer"
},
"remaining": {
"type": "integer"
},
"reset": {
"type": "integer"
}
}
}
}
}
Example:
{
"rate": {
"limit": 5000,
"remaining": 4999,
"reset": 1372700873
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/issues
List issues. List all issues across all the authenticated user's visible repositories.
get /issues
List issues. List all issues across all the authenticated user's visible repositories.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- filter: required (one of assigned,created,mentioned,subscribed,all - default: all)
Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state: required (one of open,closed - default: open)
- labels: required (string)
String list of comma separated Label names. Example - bug,ui,@high.
- sort: required (one of created,updated,comments - default: created)
- direction: required (one of asc,desc - default: desc)
- since: (string)
Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only issues updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"issues": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/notifications
List your notifications. List all notifications for the current user, grouped by repository.
Mark as read. Marking a notification as "read" removes it from the default view on GitHub.com.
get /notifications
List your notifications. List all notifications for the current user, grouped by repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- all: (string)
True to show notifications marked as read.
- participating: (string)
True to show only notifications in which the user is directly participating or mentioned.
- since: (string)
Time filters out any notifications updated before the given time. The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Example: "2012-10-09T23:39:01Z".
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"id": {
"type": "integer"
},
"repository": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
}
},
"type": "object"
},
"subject": {
"properties": {
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"latest_comment_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"reason": {
"type": "string"
},
"unread": {
"type": "boolean"
},
"updated_at": {
"type": "string"
},
"last_read_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1,
"repository": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World"
},
"subject": {
"title": "Greetings",
"url": "https://api.github.com/repos/pengwynn/octokit/issues/123",
"latest_comment_url": "https://api.github.com/repos/pengwynn/octokit/issues/comments/123",
"type": "Issue"
},
"reason": "subscribed",
"unread": true,
"updated_at": "2012-09-25T07:54:41-07:00",
"last_read_at": "2012-09-25T07:54:41-07:00",
"url": "https://api.github.com/notifications/threads/1"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
put /notifications
Mark as read. Marking a notification as "read" removes it from the default view on GitHub.com.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"last_read_at": {
"description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. Default: Now.",
"type": "string"
}
}
}
HTTP status code 205
Marked as read.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
View a single thread.
get /notifications/threads/{id}
View a single thread.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"id": {
"type": "integer"
},
"repository": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
}
},
"type": "object"
},
"subject": {
"properties": {
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"latest_comment_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"reason": {
"type": "string"
},
"unread": {
"type": "boolean"
},
"updated_at": {
"type": "string"
},
"last_read_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1,
"repository": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World"
},
"subject": {
"title": "Greetings",
"url": "https://api.github.com/repos/pengwynn/octokit/issues/123",
"latest_comment_url": "https://api.github.com/repos/pengwynn/octokit/issues/comments/123",
"type": "Issue"
},
"reason": "subscribed",
"unread": true,
"updated_at": "2012-09-25T07:54:41-07:00",
"last_read_at": "2012-09-25T07:54:41-07:00",
"url": "https://api.github.com/notifications/threads/1"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /notifications/threads/{id}
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 205
Thread marked as read.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Thread Subscription.
Set a Thread Subscription. This lets you subscribe to a thread, or ignore it. Subscribing to a thread is unnecessary if the user is already subscribed to the repository. Ignoring a thread will mute all future notifications (until you comment or get @mentioned).
Delete a Thread Subscription.
get /notifications/threads/{id}/subscription
Get a Thread Subscription.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"subscribed":{
"type": "boolean"
},
"ignored": {
"type": "boolean"
},
"reason": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"url": {
"type": "string"
},
"thread_url": {
"type": "string"
}
}
}
Example:
{
"subscribed": true,
"ignored": false,
"reason": null,
"created_at": "2012-10-06T21:34:12Z",
"url": "https://api.github.com/notifications/threads/1/subscription",
"thread_url": "https://api.github.com/notifications/threads/1"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
put /notifications/threads/{id}/subscription
Set a Thread Subscription. This lets you subscribe to a thread, or ignore it. Subscribing to a thread is unnecessary if the user is already subscribed to the repository. Ignoring a thread will mute all future notifications (until you comment or get @mentioned).
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"subscribed": {
"description": "Determines if notifications should be received from this thread.",
"type": "boolean"
},
"ignored": {
"description": "Determines if all notifications should be blocked from this thread.",
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"subscribed":{
"type": "boolean"
},
"ignored": {
"type": "boolean"
},
"reason": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"url": {
"type": "string"
},
"thread_url": {
"type": "string"
}
}
}
Example:
{
"subscribed": true,
"ignored": false,
"reason": null,
"created_at": "2012-10-06T21:34:12Z",
"url": "https://api.github.com/notifications/threads/1/subscription",
"thread_url": "https://api.github.com/notifications/threads/1"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /notifications/threads/{id}/subscription
Delete a Thread Subscription.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/gists
List the authenticated user's gists or if called anonymously, this will return all public gists.
Create a gist.
get /gists
List the authenticated user's gists or if called anonymously, this will return all public gists.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- since: (string)
Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"gists": [
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"type": "string"
}
}
}
]
}
Example:
[
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /gists
Create a gist.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"files": {
"description": "Files that make up this gist. The key of which should be a required string filename and the value another required hash with parameter 'content'.",
"type": "string"
},
"content": {
"description": "File contents.",
"type": "string"
}
},
"required": [ "public", "files", "content" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
},
"forks": [
{
"properties": {
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"url": {
"type": "string"
},
"created_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"history": [
{
"properties": {
"url": {
"type": "string"
},
"version": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"change_status": {
"properties": {
"deletions": {
"type": "integer"
},
"additions": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"type": "object"
},
"committed_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
},
"type": "object"
}
}
]
}
}
Example:
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z",
"forks": [
{
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"url": "https://api.github.com/gists/d39d0d37fb24f12e2045",
"created_at": "2011-04-14T16:00:49Z"
}
],
"history": [
{
"url": "https://api.github.com/gists/3a8bdc16d2e39d809469",
"version": "57a7f021a713b1c5a6a199b54cc514735d2d462f",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"change_status": {
"deletions": 0,
"additions": 180,
"total": 180
},
"committed_at": "2010-04-14T02:15:15Z"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List all public gists.
get /gists/public
List all public gists.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- since: (string)
Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"gists": [
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"type": "string"
}
}
}
]
}
Example:
[
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List the authenticated user's starred gists.
get /gists/starred
List the authenticated user's starred gists.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- since: (string)
Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"gists": [
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"type": "string"
}
}
}
]
}
Example:
[
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single gist.
Edit a gist.
Delete a gist.
get /gists/{id}
Get a single gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
},
"forks": [
{
"properties": {
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"url": {
"type": "string"
},
"created_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"history": [
{
"properties": {
"url": {
"type": "string"
},
"version": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"change_status": {
"properties": {
"deletions": {
"type": "integer"
},
"additions": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"type": "object"
},
"committed_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
},
"type": "object"
}
}
]
}
}
Example:
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z",
"forks": [
{
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"url": "https://api.github.com/gists/d39d0d37fb24f12e2045",
"created_at": "2011-04-14T16:00:49Z"
}
],
"history": [
{
"url": "https://api.github.com/gists/3a8bdc16d2e39d809469",
"version": "57a7f021a713b1c5a6a199b54cc514735d2d462f",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"change_status": {
"deletions": 0,
"additions": 180,
"total": 180
},
"committed_at": "2010-04-14T02:15:15Z"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /gists/{id}
Edit a gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"files": {
"properties": {
"file1.txt": {
"properties": {
"content": {
"type": "string"
}
},
"type": "object"
},
"old_name.txt": {
"properties": {
"filename": {
"type": "string"
},
"content": {
"type": "string"
}
},
"type": "object"
},
"new_file.txt": {
"properties": {
"content": {
"type": "string"
}
},
"type": "object"
},
"delete_this_file.txt": {
"type": "string"
}
}
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
},
"forks": [
{
"properties": {
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"url": {
"type": "string"
},
"created_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"history": [
{
"properties": {
"url": {
"type": "string"
},
"version": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"change_status": {
"properties": {
"deletions": {
"type": "integer"
},
"additions": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"type": "object"
},
"committed_at": {
"description": "Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.",
"type": "string"
},
"type": "object"
}
}
]
}
}
Example:
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z",
"forks": [
{
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"url": "https://api.github.com/gists/d39d0d37fb24f12e2045",
"created_at": "2011-04-14T16:00:49Z"
}
],
"history": [
{
"url": "https://api.github.com/gists/3a8bdc16d2e39d809469",
"version": "57a7f021a713b1c5a6a199b54cc514735d2d462f",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"change_status": {
"deletions": 0,
"additions": 180,
"total": 180
},
"committed_at": "2010-04-14T02:15:15Z"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /gists/{id}
Delete a gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check if a gist is starred.
Star a gist.
Unstar a gist.
get /gists/{id}/star
Check if a gist is starred.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Exists.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Not exists.
put /gists/{id}/star
Star a gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Starred.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /gists/{id}/star
Unstar a gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Fork a gist.
post /gists/{id}/forks
Fork a gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Exists.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Not exists.
List comments on a gist.
Create a comment
get /gists/{id}/comments
List comments on a gist.
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"comments": [
{
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601.",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1,
"url": "https://api.github.com/gists/ae709e9cf889e485e65f/comments/1",
"body": "Just commenting for the sake of commenting",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-18T23:23:56Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /gists/{id}/comments
Create a comment
URI Parameters
- id: required (integer)
Id of a thread.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"body": {
"type": "string"
}
},
"required": [ "body" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601.",
"type": "string"
}
}
}
Example:
{
"id": 1,
"url": "https://api.github.com/gists/83ba86d111d39709da8c/comments/1",
"body": "Just commenting for the sake of commenting",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-18T23:23:56Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single comment.
Edit a comment.
Delete a comment.
get /gists/{id}/comments/{commentId}
Get a single comment.
URI Parameters
- id: required (integer)
Id of a thread.
- commentId: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601.",
"type": "string"
}
}
}
Example:
{
"id": 1,
"url": "https://api.github.com/gists/83ba86d111d39709da8c/comments/1",
"body": "Just commenting for the sake of commenting",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-18T23:23:56Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /gists/{id}/comments/{commentId}
Edit a comment.
URI Parameters
- id: required (integer)
Id of a thread.
- commentId: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601.",
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601.",
"type": "string"
}
}
}
Example:
{
"id": 1,
"url": "https://api.github.com/gists/83ba86d111d39709da8c/comments/1",
"body": "Just commenting for the sake of commenting",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-18T23:23:56Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /gists/{id}/comments/{commentId}
Delete a comment.
URI Parameters
- id: required (integer)
Id of a thread.
- commentId: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/orgs/{orgId}
Get an Organization.
Edit an Organization.
get /orgs/{orgId}
Get an Organization.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"name": {
"type": "string"
},
"company": {
"type": "string"
},
"blog": {
"type": "string"
},
"location": {
"type": "string"
},
"email": {
"type": "string"
},
"public_repos": {
"type": "integer"
},
"public_gists": {
"type": "integer"
},
"followers": {
"type": "integer"
},
"following": {
"type": "integer"
},
"html_url": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"type": {
"type": "string"
}
}
}
Example:
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "Organization"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /orgs/{orgId}
Edit an Organization.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"billing_email": {
"description": "Billing email address. This address is not publicized.",
"type": "string"
},
"company": {
"type": "string"
},
"email": {
"description": "Publicly visible email address.",
"type": "string"
},
"location": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"name": {
"type": "string"
},
"company": {
"type": "string"
},
"blog": {
"type": "string"
},
"location": {
"type": "string"
},
"email": {
"type": "string"
},
"public_repos": {
"type": "integer"
},
"public_gists": {
"type": "integer"
},
"followers": {
"type": "integer"
},
"following": {
"type": "integer"
},
"html_url": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"type": {
"type": "string"
}
}
}
Example:
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "Organization"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List public events for an organization.
get /orgs/{orgId}/events
List public events for an organization.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List issues. List all issues for a given organization for the authenticated user.
get /orgs/{orgId}/issues
List issues. List all issues for a given organization for the authenticated user.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- filter: required (one of assigned,created,mentioned,subscribed,all - default: all)
Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state: required (one of open,closed - default: open)
- labels: required (string)
String list of comma separated Label names. Example - bug,ui,@high.
- sort: required (one of created,updated,comments - default: created)
- direction: required (one of asc,desc - default: desc)
- since: (string)
Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only issues updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"issues": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Members list. List all users who are members of an organization. A member is a user that belongs to at least 1 team in the organization. If the authenticated user is also an owner of this organization then both concealed and public members will be returned. If the requester is not an owner of the organization the query will be redirected to the public members list.
get /orgs/{orgId}/members
Members list. List all users who are members of an organization. A member is a user that belongs to at least 1 team in the organization. If the authenticated user is also an owner of this organization then both concealed and public members will be returned. If the requester is not an owner of the organization the query will be redirected to the public members list.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 302
Response if requester is not an organization member.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Remove a member. Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
delete /orgs/{orgId}/members/{userId}
Remove a member. Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
URI Parameters
- orgId: required (integer)
Id of organisation.
- userId: required (integer)
Id of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Public members list. Members of an organization can choose to have their membership publicized or not.
get /orgs/{orgId}/public_members
Public members list. Members of an organization can choose to have their membership publicized or not.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check public membership.
Publicize a user's membership.
Conceal a user's membership.
get /orgs/{orgId}/public_members/{userId}
Check public membership.
URI Parameters
- orgId: required (integer)
Id of organisation.
- userId: required (integer)
Id of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
User is a public member.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
User is not a public member.
put /orgs/{orgId}/public_members/{userId}
Publicize a user's membership.
URI Parameters
- orgId: required (integer)
Id of organisation.
- userId: required (integer)
Id of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Publicized.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /orgs/{orgId}/public_members/{userId}
Conceal a user's membership.
URI Parameters
- orgId: required (integer)
Id of organisation.
- userId: required (integer)
Id of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Concealed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List teams.
Create team. In order to create a team, the authenticated user must be an owner of orgId.
get /orgs/{orgId}/teams
List teams.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/teams/1",
"name": "Owners",
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /orgs/{orgId}/teams
Create team. In order to create a team, the authenticated user must be an owner of orgId.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"repo_names": [
{
"type": "string"
}
],
"type": "array",
"permission": {
"enum": [
"pull",
"push",
"admin"
]
}
},
"required": [
"name"
]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "integer"
},
"permission": {
"type": "string"
},
"members_count": {
"type": "integer"
},
"repos_count": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/teams/1",
"name": "Owners",
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List repositories for the specified org.
Create a new repository for the authenticated user. OAuth users must supply repo scope.
get /orgs/{orgId}/repos
List repositories for the specified org.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- type: (one of all,public,private,forks,sources,member - default: all)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /orgs/{orgId}/repos
Create a new repository for the authenticated user. OAuth users must supply repo scope.
URI Parameters
- orgId: required (integer)
Id of organisation.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"homepage": {
"type": "string"
},
"private": {
"description": "True to create a private repository, false to create a public one. Creating private repositories requires a paid GitHub account.",
"type": "boolean"
},
"has_issues": {
"description": "True to enable issues for this repository, false to disable them. Default is true.",
"type": "boolean"
},
"has_wiki": {
"description": "True to enable the wiki for this repository, false to disable it. Default is true.",
"type": "boolean"
},
"has_downloads": {
"description": "True to enable downloads for this repository, false to disable them. Default is true.",
"type": "boolean"
},
"team_id": {
"description": "The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization.",
"type": "integer"
},
"auto_init": {
"description": "True to create an initial commit with empty README. Default is false.",
"type": "boolean"
},
"gitignore_template": {
"description": "Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\" Ignored if auto_init parameter is not provided. ",
"type": "string"
}
},
"required": [ "name" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/teams/{teamsId}
Get team.
Edit team. In order to edit a team, the authenticated user must be an owner of the org that the team is associated with.
Delete team. In order to delete a team, the authenticated user must be an owner of the org that the team is associated with.
get /teams/{teamsId}
Get team.
URI Parameters
- teamsId: required (integer)
Id of a team.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "integer"
},
"permission": {
"type": "string"
},
"members_count": {
"type": "integer"
},
"repos_count": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/teams/1",
"name": "Owners",
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /teams/{teamsId}
Edit team. In order to edit a team, the authenticated user must be an owner of the org that the team is associated with.
URI Parameters
- teamsId: required (integer)
Id of a team.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"permission": {
"values": [
"pull",
"push",
"admin"
]
}
},
"required": [ "name" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "integer"
},
"permission": {
"type": "string"
},
"members_count": {
"type": "integer"
},
"repos_count": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/teams/1",
"name": "Owners",
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /teams/{teamsId}
Delete team. In order to delete a team, the authenticated user must be an owner of the org that the team is associated with.
URI Parameters
- teamsId: required (integer)
Id of a team.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List team members. In order to list members in a team, the authenticated user must be a member of the team.
get /teams/{teamsId}/members
List team members. In order to list members in a team, the authenticated user must be a member of the team.
URI Parameters
- teamsId: required (integer)
Id of a team.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get team member. In order to get if a user is a member of a team, the authenticated user must be a member of the team.
Add team member. In order to add a user to a team, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with.
Remove team member. In order to remove a user from a team, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. NOTE This does not delete the user, it just remove them from the team.
get /teams/{teamsId}/members/{userId}
Get team member. In order to get if a user is a member of a team, the authenticated user must be a member of the team.
URI Parameters
- teamsId: required (integer)
Id of a team.
- userId: required (integer)
Id of a member.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
User is a member.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
User is not a member.
put /teams/{teamsId}/members/{userId}
Add team member. In order to add a user to a team, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with.
URI Parameters
- teamsId: required (integer)
Id of a team.
- userId: required (integer)
Id of a member.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Team member added.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 422
If you attempt to add an organization to a team, you will get this.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"errors": [
{
"properties": {
"code": {
"type": "string"
},
"field": {
"type": "string"
},
"resource": {
"type": "string"
}
},
"type": "object"
}
],
"type": "object"
}
}
Example:
{
"message": "Validation Failed",
"errors": [
{
"code": "org",
"field": "user",
"resource": "TeamMember"
}
]
}
delete /teams/{teamsId}/members/{userId}
Remove team member. In order to remove a user from a team, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. NOTE This does not delete the user, it just remove them from the team.
URI Parameters
- teamsId: required (integer)
Id of a team.
- userId: required (integer)
Id of a member.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Team member removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/repositories
List all public repositories. This provides a dump of every public repository, in the order that they were created. Note: Pagination is powered exclusively by the since parameter. is the Link header to get the URL for the next page of repositories.
get /repositories
List all public repositories. This provides a dump of every public repository, in the order that they were created. Note: Pagination is powered exclusively by the since parameter. is the Link header to get the URL for the next page of repositories.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- since: (string)
The integer ID of the last Repository that you've seen.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/repos/{ownerId}/{repoId}
Get repository.
Edit repository.
Delete a Repository. Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
get /repos/{ownerId}/{repoId}
Get repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"organization": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"parent": {
"description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"source": {
"description": "Is present when the repo is a fork. Source is the ultimate source for the network.",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"has_issues": {
"type": "boolean"
},
"has_wiki": {
"type": "boolean"
},
"has_downloads": {
"type": "boolean"
}
}
}
Example:
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"organization": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"type": "Organization"
},
"parent": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
},
"source": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
},
"has_issues": true,
"has_wiki": true,
"has_downloads": true
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}
Edit repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"homepage": {
"type": "string"
},
"private": {
"description": "True makes the repository private, and false makes it public.",
"type": "boolean"
},
"has_issues": {
"description": "True to enable issues for this repository, false to disable them. Default is true.",
"type": "boolean"
},
"has_wiki": {
"description": "True to enable the wiki for this repository, false to disable it. Default is true.",
"type": "boolean"
},
"has_downloads": {
"description": "True to enable downloads for this repository, false to disable them. Default is true.",
"type": "boolean"
},
"default_branch": {
"description": "Update the default branch for this repository.",
"type": "string"
}
},
"required": [ "name" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"organization": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"parent": {
"description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"source": {
"description": "Is present when the repo is a fork. Source is the ultimate source for the network.",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"has_issues": {
"type": "boolean"
},
"has_wiki": {
"type": "boolean"
},
"has_downloads": {
"type": "boolean"
}
}
}
Example:
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"organization": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"type": "Organization"
},
"parent": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
},
"source": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
},
"has_issues": true,
"has_wiki": true,
"has_downloads": true
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}
Delete a Repository. Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of repository events.
get /repos/{ownerId}/{repoId}/events
Get list of repository events.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List languages. List languages for the specified repository. The value on the right of a language is the number of bytes of code written in that language.
get /repos/{ownerId}/{repoId}/languages
List languages. List languages for the specified repository. The value on the right of a language is the number of bytes of code written in that language.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"language": {
"type": "string"
},
"count": {
"type": "string"
}
}
}
Example:
{
"C": 78769,
"Python": 7769
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Create a Blob.
post /repos/{ownerId}/{repoId}/git/blobs
Create a Blob.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"content": {
"type": "string"
},
"encoding": {
"enum": [
"utf-8",
"base64"
]
},
"sha": {
"type": "string"
},
"size": {
"type": "integer"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
}
}
}
Example:
{
"sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Blob. Since blobs can be any arbitrary binary data, the input and responses for the blob API takes an encoding parameter that can be either utf-8 or base64. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it.
get /repos/{ownerId}/{repoId}/git/blobs/{shaCode}
Get a Blob. Since blobs can be any arbitrary binary data, the input and responses for the blob API takes an encoding parameter that can be either utf-8 or base64. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (string)
SHA-1 code.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"content": {
"type": "string"
},
"encoding": {
"enum": [
"utf-8",
"base64"
]
},
"sha": {
"type": "string"
},
"size": {
"type": "integer"
}
}
}
Example:
{
"content": "Content of the blob",
"encoding": "utf-8",
"sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15",
"size": 100
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Create a Commit.
post /repos/{ownerId}/{repoId}/git/commits
Create a Commit.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"message": {
"description": "String of the commit message",
"type": "string"
},
"tree": {
"description": "String of the SHA of the tree object this commit points to.",
"type": "string"
},
"parents": [
{
"description": "Array of the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided, for a merge commit, an array of more than one should be provided.",
"type": "string"
}
],
"type": "array",
"author": {
"properties": {
"name": {
"description": "String of the name of the author of the commit.",
"type": "string"
},
"email": {
"description": "String of the email of the author of the commit.",
"type": "string"
},
"date": {
"description": "Timestamp of when this commit was authored.",
"type": "timestamp"
}
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"description": "String of the name of the committer of the commit.",
"type": "string"
},
"email": {
"description": "String of the email of the committer of the commit.",
"type": "string"
},
"date": {
"description": "Timestamp of when this commit was committed.",
"type": "timestamp"
}
},
"type": "object"
}
},
"required": [
"message",
"tree",
"parents"
]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"author": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"type": "string"
}
],
"tree": {
"type": "string"
}
}
}
Example:
{
"message": "my commit message",
"author": {
"name": "Scott Chacon",
"email": "schacon@gmail.com",
"date": "2008-07-09T16:13:30 12:00"
},
"parents": [
"7d1b31e74ee336d15cbd21741bc88a537ed063a0"
],
"tree": "827efc6d56897b048c772eb4087f854f46256132"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Commit.
get /repos/{ownerId}/{repoId}/git/commits/{shaCode}
Get a Commit.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (string)
SHA-1 code.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"author": {
"properties": {
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array"
}
}
Example:
{
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"committer": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"message": "added readme, because im a good github citizen\n",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get all References
Create a Reference
get /repos/{ownerId}/{repoId}/git/refs
Get all References
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"references": [
{
"properties": {
"ref": {
"type": "string"
},
"url": {
"type": "string"
},
"object": {
"properties": {
"type": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"ref": "refs/heads/master",
"url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/master",
"object": {
"type": "commit",
"sha": "aa218f56b14c9653891f9e74264a383fa43fefbd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
},
{
"ref": "refs/heads/gh-pages",
"url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/gh-pages",
"object": {
"type": "commit",
"sha": "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac"
}
},
{
"ref": "refs/tags/v0.0.1",
"url": "https://api.github.com/repos/octocat/Hello-World/git/refs/tags/v0.0.1",
"object": {
"type": "tag",
"sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/git/refs
Create a Reference
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"ref": {
"description": "String of the name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with ?refs' and have at least two slashes, it will be rejected.",
"type": "string"
},
"sha": {
"description": "String of the SHA1 value to set this reference to.",
"type": "string"
}
},
"required": [
"ref",
"sha"
]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"ref": {
"type": "string"
},
"url": {
"type": "string"
},
"object": {
"properties": {
"type": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"ref": "refs/heads/sc/featureA",
"url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA",
"object": {
"type": "commit",
"sha": "aa218f56b14c9653891f9e74264a383fa43fefbd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of subdirectories.
get /repos/{ownerId}/{repoId}/git/refs/{heads}
Get list of subdirectories.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- heads: required (string)
Subfolder of path to the branch.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"name": {
"type": "string"
},
"commit": {
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"zipball_url": {
"type": "string"
},
"tarball_url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"name": "v0.1",
"commit": {
"sha": "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
"url": "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
},
"zipball_url": "https://github.com/octocat/Hello-World/zipball/v0.1",
"tarball_url": "https://github.com/octocat/Hello-World/tarball/v0.1"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Reference.
Update a Reference
Delete a Reference.
get /repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
Get a Reference.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- heads: required (string)
Subfolder of path to the branch.
- branch: required (string)
Path to the branch.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"ref": {
"type": "string"
},
"url": {
"type": "string"
},
"object": {
"properties": {
"type": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"ref": "refs/heads/sc/featureA",
"url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA",
"object": {
"type": "commit",
"sha": "aa218f56b14c9653891f9e74264a383fa43fefbd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
Update a Reference
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- heads: required (string)
Subfolder of path to the branch.
- branch: required (string)
Path to the branch.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"description": "String of the SHA1 value to set this reference to.",
"type": "string"
},
"force": {
"description": "Boolean indicating whether to force the update or to make sure the update is a fast-forward update. The default is false, so leaving this out or setting it to false will make sure you're not overwriting work.",
"type": "boolean"
}
},
"required": [
"sha",
"force"
]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"ref": {
"type": "string"
},
"url": {
"type": "string"
},
"object": {
"properties": {
"type": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"ref": "refs/heads/sc/featureA",
"url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA",
"object": {
"type": "commit",
"sha": "aa218f56b14c9653891f9e74264a383fa43fefbd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
Delete a Reference.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- heads: required (string)
Subfolder of path to the branch.
- branch: required (string)
Path to the branch.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Create a Tag Object. Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, you only have to create the tag reference - this call would be unnecessary.
post /repos/{ownerId}/{repoId}/git/tags
Create a Tag Object. Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, you only have to create the tag reference - this call would be unnecessary.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"tag": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"message": {
"type": "string"
},
"tagger": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"object": {
"properties": {
"type": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"tag": {
"type": "string"
},
"message": {
"description": "String of the tag message.",
"type": "string"
},
"object": {
"description": "String of the SHA of the git object this is tagging.",
"type": "string"
},
"type": {
"description": "String of the type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.",
"type": "string"
},
"tagger": {
"properties": {
"name": {
"description": "String of the name of the author of the tag.",
"type": "string"
},
"email": {
"description": "String of the email of the author of the tag.",
"type": "string"
},
"date": {
"description": "Timestamp of when this object was tagged.",
"type": "timestamp"
}
},
"type": "object"
}
},
"required": [
"tag",
"message",
"object",
"type",
"tagger"
]
}
Example:
{
"tag": "v0.0.1",
"sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"message": "initial version\n",
"tagger": {
"name": "Scott Chacon",
"email": "schacon@gmail.com",
"date": "2011-06-17T14:53:35-07:00"
},
"object": {
"type": "commit",
"sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Tag.
get /repos/{ownerId}/{repoId}/git/tags/{shaCode}
Get a Tag.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"tag": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"message": {
"type": "string"
},
"tagger": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"object": {
"properties": {
"type": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"tag": "v0.0.1",
"sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"message": "initial version\n",
"tagger": {
"name": "Scott Chacon",
"email": "schacon@gmail.com",
"date": "2011-06-17T14:53:35-07:00"
},
"object": {
"type": "commit",
"sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Create a Tree. The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out.
post /repos/{ownerId}/{repoId}/git/trees
Create a Tree. The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"tree": [
{
"path": {
"type": "string"
},
"mode": {
"type": "string"
},
"type": {
"type": "string"
},
"size": {
"type": "integer"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
}
],
"type": "array"
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"base_tree": {
"type": "string"
},
"tree": [
{
"properties": {
"path": {
"type": "string"
},
"mode": {
"description": "One of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit) or 120000 for a blob that specifies the path of a symlink.",
"type": "string",
"enum": [
"100644",
"100755",
"040000",
"160000",
"120000"
]
},
"type": {
"type": "string",
"enum": [
"blob",
"tree",
"commit"
]
},
"oneOf": [
{
"sha": {
"description": "SHA1 checksum ID of the object in the tree.",
"type": "string"
}
},
{
"content": {
"description": "content you want this file to have - GitHub will write this blob out and use that SHA for this entry.",
"type": "string"
}
}
]
},
"type": "object"
}
],
"type": "array"
},
"required": [
"tree"
]
}
Example:
{
"sha": "cd8274d15fa3ae2ab983129fb037999f264ba9a7",
"url": "https://api.github.com/repo/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7",
"tree": [
{
"path": "file.rb",
"mode": "100644",
"type": "blob",
"size": 132,
"sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
"url": "https://api.github.com/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Tree.
get /repos/{ownerId}/{repoId}/git/trees/{shaCode}
Get a Tree.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (integer)
Id of the owner.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- recursive: (integer)
Get a Tree Recursively. (0 or 1)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"tree": [
{
"path": {
"type": "string"
},
"mode": {
"type": "string"
},
"type": {
"type": "string"
},
"size": {
"type": "integer"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
}
],
"type": "array"
}
}
Example:
{
"sha": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"url": "https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"tree": [
{
"path": "file.rb",
"mode": "100644",
"type": "blob",
"size": 30,
"sha": "44b4fc6d56897b048c772eb4087f854f46256132",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132"
},
{
"path": "subdir",
"mode": "040000",
"type": "tree",
"sha": "f484d249c660418515fb01c2b9662073663c242e",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e"
},
{
"path": "exec_file",
"mode": "100755",
"type": "blob",
"size": 75,
"sha": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get the README. This method returns the preferred README for a repository.
get /repos/{ownerId}/{repoId}/readme
Get the README. This method returns the preferred README for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- ref: (string)
The String name of the Commit/Branch/Tag. Defaults to master.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"encoding": {
"type": "string"
},
"size": {
"type": "integer"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"_links": {
"properties": {
"git": {
"type": "string"
},
"self": {
"type": "string"
},
"html": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"type": "file",
"encoding": "base64",
"size": 5362,
"name": "README.md",
"path": "README.md",
"content": "encoded content ...",
"sha": "3d21ec53a331a6f037a91c368710b99387d012c1",
"url": "https://api.github.com/repos/pengwynn/octokit/contents/README.md",
"git_url": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"html_url": "https://github.com/pengwynn/octokit/blob/master/README.md",
"_links": {
"git": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"self": "https://api.github.com/repos/pengwynn/octokit/contents/README.md",
"html": "https://github.com/pengwynn/octokit/blob/master/README.md"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List Stargazers.
get /repos/{ownerId}/{repoId}/stargazers
List Stargazers.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List watchers.
get /repos/{ownerId}/{repoId}/subscribers
List watchers.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of tags.
get /repos/{ownerId}/{repoId}/tags
Get list of tags.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"tag": {
"type": "string"
},
"message": {
"description": "String of the tag message.",
"type": "string"
},
"object": {
"description": "String of the SHA of the git object this is tagging.",
"type": "string"
},
"type": {
"description": "String of the type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.",
"type": "string"
},
"tagger": {
"properties": {
"name": {
"description": "String of the name of the author of the tag.",
"type": "string"
},
"email": {
"description": "String of the email of the author of the tag.",
"type": "string"
},
"date": {
"description": "Timestamp of when this object was tagged.",
"type": "timestamp"
}
},
"type": "object"
}
},
"required": [
"tag",
"message",
"object",
"type",
"tagger"
]
}
Example:
{
"tag": "v0.0.1",
"sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"message": "initial version\n",
"tagger": {
"name": "Scott Chacon",
"email": "schacon@gmail.com",
"date": "2011-06-17T14:53:35-07:00"
},
"object": {
"type": "commit",
"sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of teams
get /repos/{ownerId}/{repoId}/teams
Get list of teams
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/teams/1",
"name": "Owners",
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List Stargazers. New implementation.
get /repos/{ownerId}/{repoId}/watchers
List Stargazers. New implementation.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of contributors.
get /repos/{ownerId}/{repoId}/contributors
Get list of contributors.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- anon: required (string)
Set to 1 or true to include anonymous contributors in results.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"contributions": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"contributions": 32
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of branches
get /repos/{ownerId}/{repoId}/branches
Get list of branches
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"name": {
"type": "string"
},
"commit": {
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"name": "master",
"commit": {
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get Branch
get /repos/{ownerId}/{repoId}/branches/{branchId}
Get Branch
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- branchId: required (integer)
Id of the branch.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"commit": {
"properties": {
"sha": {
"type": "string"
},
"commit": {
"author": {
"name": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"email": {
"type": "string"
}
},
"url": {
"type": "string"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"author": {
"properties": {
"gravatar_id": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"login": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"url": {
"type": "string"
},
"committer": {
"properties": {
"gravatar_id": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"login": {
"type": "string"
}
},
"type": "object"
}
},
"_links": {
"properties": {
"html": {
"type": "string"
},
"self": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"name": "master",
"commit": {
"sha": "7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
"commit": {
"author": {
"name": "The Octocat",
"date": "2012-03-06T15:06:50-08:00",
"email": "octocat@nowhere.com"
},
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
"message": "Merge pull request #6 from Spaceghost/patch-1\n\nNew line at end of file.",
"tree": {
"sha": "b4eecafa9be2f2006ce1b709d6857b07069b4608",
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608"
},
"committer": {
"name": "The Octocat",
"date": "2012-03-06T15:06:50-08:00",
"email": "octocat@nowhere.com"
}
},
"author": {
"gravatar_id": "7ad39074b0584bc555d0417ae3e7d974",
"avatar_url": "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com/images/gravatars/gravatar-140.png",
"url": "https://api.github.com/users/octocat",
"id": 583231,
"login": "octocat"
},
"parents": [
{
"sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e",
"url": "https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e"
},
{
"sha": "762941318ee16e59dabbacb1b4049eec22f0d303",
"url": "https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303"
}
],
"url": "https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d",
"committer": {
"gravatar_id": "7ad39074b0584bc555d0417ae3e7d974",
"avatar_url": "https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com/images/gravatars/gravatar-140.png",
"url": "https://api.github.com/users/octocat",
"id": 583231,
"login": "octocat"
}
},
"_links": {
"html": "https://github.com/octocat/Hello-World/tree/master",
"self": "https://api.github.com/repos/octocat/Hello-World/branches/master"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List issues for a repository.
Create an issue. Any user with pull access to a repository can create an issue.
get /repos/{ownerId}/{repoId}/issues
List issues for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- filter: required (one of assigned,created,mentioned,subscribed,all - default: all)
Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state: required (one of open,closed - default: open)
- labels: required (string)
String list of comma separated Label names. Example - bug,ui,@high.
- sort: required (one of created,updated,comments - default: created)
- direction: required (one of asc,desc - default: desc)
- since: (string)
Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only issues updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"issues": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/issues
Create an issue. Any user with pull access to a repository can create an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"assignee": {
"description": "Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise.",
"type": "string"
},
"milestone": {
"description": "Milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise.",
"type": "integer"
},
"labels": [
{
"description": "Array of strings - Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.",
"type": "string"
}
],
"type": "array"
},
"required": [ "title" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List issue events for a repository.
get /repos/{ownerId}/{repoId}/issues/events
List issue events for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single event.
get /repos/{ownerId}/{repoId}/issues/events/{eventId}
Get a single event.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- eventId: required (integer)
Id of the event.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"type": "object"
},
"event": {
"type": "string"
},
"commit_id": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"issue": {
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1",
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"event": "closed",
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"created_at": "2011-04-14T16:00:49Z",
"issue": {
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single issue
Edit an issue. Issue owners and users with push access can edit an issue.
get /repos/{ownerId}/{repoId}/issues/{number}
Get a single issue
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/issues/{number}
Edit an issue. Issue owners and users with push access can edit an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List comments on an issue.
Create a comment.
get /repos/{ownerId}/{repoId}/issues/{number}/comments
List comments on an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/issues/{number}/comments
Create a comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"body": {
"type": "string"
}
},
"required": [ "body" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"id": 1,
"url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1",
"html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1",
"body": "Me too",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List issue events for a repository.
get /repos/{ownerId}/{repoId}/issues/{number}/events
List issue events for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single event.
get /repos/{ownerId}/{repoId}/issues/{number}/events/{eventId}
Get a single event.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
- eventId: required (integer)
Id of the event.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"type": "object"
},
"event": {
"type": "string"
},
"commit_id": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"issue": {
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1",
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"event": "closed",
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"created_at": "2011-04-14T16:00:49Z",
"issue": {
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List labels on an issue.
Add labels to an issue.
Replace all labels for an issue. Sending an empty array ([]) will remove all Labels from the Issue.
Remove all labels from an issue.
get /repos/{ownerId}/{repoId}/issues/{number}/labels
List labels on an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/issues/{number}/labels
Add labels to an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"color": {
"description": "6 character hex code, without a leading #.",
"type": "string",
"minLength": 6,
"maxLength": 6
}
},
"required": [ "name", "color" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
put /repos/{ownerId}/{repoId}/issues/{number}/labels
Replace all labels for an issue. Sending an empty array ([]) will remove all Labels from the Issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"color": {
"description": "6 character hex code, without a leading #.",
"type": "string",
"minLength": 6,
"maxLength": 6
}
},
"required": [ "name", "color" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/issues/{number}/labels
Remove all labels from an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Remove a label from an issue.
delete /repos/{ownerId}/{repoId}/issues/{number}/labels/{name}
Remove a label from an issue.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the issue.
- name: required (string)
Name of the label.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List comments in a repository.
get /repos/{ownerId}/{repoId}/issues/comments
List comments in a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- sort: (one of created,updated)
- direction: (one of asc,desc)
Ignored without sort parameter.
- since: (string)
Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single comment.
Edit a comment.
Delete a comment.
get /repos/{ownerId}/{repoId}/issues/comments/{commentId}
Get a single comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- commentId: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"id": 1,
"url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1",
"html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1",
"body": "Me too",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/issues/comments/{commentId}
Edit a comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- commentId: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"body": {
"type": "string"
}
},
"required": [ "body" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"id": 1,
"url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1",
"html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1",
"body": "Me too",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/issues/comments/{commentId}
Delete a comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- commentId: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List your notifications in a repository List all notifications for the current user.
Mark notifications as read in a repository. Marking all notifications in a repository as "read" removes them from the default view on GitHub.com.
get /repos/{ownerId}/{repoId}/notifications
List your notifications in a repository List all notifications for the current user.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- all: (string)
True to show notifications marked as read.
- participating: (string)
True to show only notifications in which the user is directly participating or mentioned.
- since: (string)
Time filters out any notifications updated before the given time. The time should be passed in as UTC in the ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Example: "2012-10-09T23:39:01Z".
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"id": {
"type": "integer"
},
"repository": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
}
},
"type": "object"
},
"subject": {
"properties": {
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"latest_comment_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"reason": {
"type": "string"
},
"unread": {
"type": "boolean"
},
"updated_at": {
"type": "string"
},
"last_read_at": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1,
"repository": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World"
},
"subject": {
"title": "Greetings",
"url": "https://api.github.com/repos/pengwynn/octokit/issues/123",
"latest_comment_url": "https://api.github.com/repos/pengwynn/octokit/issues/comments/123",
"type": "Issue"
},
"reason": "subscribed",
"unread": true,
"updated_at": "2012-09-25T07:54:41-07:00",
"last_read_at": "2012-09-25T07:54:41-07:00",
"url": "https://api.github.com/notifications/threads/1"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
put /repos/{ownerId}/{repoId}/notifications
Mark notifications as read in a repository. Marking all notifications in a repository as "read" removes them from the default view on GitHub.com.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"last_read_at": {
"description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. Default: Now.",
"type": "string"
}
}
}
HTTP status code 205
Marked as read.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a Repository Subscription.
Set a Repository Subscription
Delete a Repository Subscription.
get /repos/{ownerId}/{repoId}/subscription
Get a Repository Subscription.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
},
"ignored": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"url": {
"type": "string"
},
"repository_url": {
"type": "string"
}
}
}
Example:
{
"subscribed": true,
"ignored": false,
"reason": null,
"created_at": "2012-10-06T21:34:12Z",
"url": "https://api.github.com/repos/octocat/example/subscription",
"repository_url": "https://api.github.com/repos/octocat/example"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
put /repos/{ownerId}/{repoId}/subscription
Set a Repository Subscription
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"subscribed": {
"description": "Determines if notifications should be received from this repository.",
"type": "boolean"
},
"ignored": {
"description": "Determines if all notifications should be blocked from this repository.",
"type": "boolean"
}
},
"required": [ "subscribed", "ignored" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
},
"ignored": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"url": {
"type": "string"
},
"repository_url": {
"type": "string"
}
}
}
Example:
{
"subscribed": true,
"ignored": false,
"reason": null,
"created_at": "2012-10-06T21:34:12Z",
"url": "https://api.github.com/repos/octocat/example/subscription",
"repository_url": "https://api.github.com/repos/octocat/example"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/subscription
Delete a Repository Subscription.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List assignees. This call lists all the available assignees (owner collaborators) to which issues may be assigned.
get /repos/{ownerId}/{repoId}/assignees
List assignees. This call lists all the available assignees (owner collaborators) to which issues may be assigned.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "integer"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check assignee. You may also check to see if a particular user is an assignee for a repository.
get /repos/{ownerId}/{repoId}/assignees/{assignee}
Check assignee. You may also check to see if a particular user is an assignee for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- assignee: required (string)
Login of the assignee.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
User is an assignee.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
User isn't an assignee.
List all labels for this repository.
Create a label.
get /repos/{ownerId}/{repoId}/labels
List all labels for this repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/labels
Create a label.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"color": {
"description": "6 character hex code, without a leading #.",
"type": "string",
"minLength": 6,
"maxLength": 6
}
},
"required": [ "name", "color" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single label.
Update a label.
Delete a label.
get /repos/{ownerId}/{repoId}/labels/{name}
Get a single label.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- name: required (string)
Name of the label.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/labels/{name}
Update a label.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- name: required (string)
Name of the label.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"color": {
"description": "6 character hex code, without a leading #.",
"type": "string",
"minLength": 6,
"maxLength": 6
}
},
"required": [ "name", "color" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/labels/{name}
Delete a label.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- name: required (string)
Name of the label.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List milestones for a repository.
Create a milestone.
get /repos/{ownerId}/{repoId}/milestones
List milestones for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- state: (one of open,closed - default: open)
- sort: (one of due_date,completeness - default: due_date)
- direction: (one of asc,desc - default: desc)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/milestones
Create a milestone.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"state": {
"enum": [
"open",
"closed"
]
},
"description": {
"type": "string"
},
"due_on": {
"description": "ISO 8601 time.",
"type": "string"
}
},
"required": [ "title" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single milestone.
Update a milestone.
Delete a milestone.
get /repos/{ownerId}/{repoId}/milestones/{number}
Get a single milestone.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the milestone.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/milestones/{number}
Update a milestone.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the milestone.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"number": {
"type": "integer"
},
"title": {
"type": "string"
},
"state": {
"enum": [
"open",
"closed"
]
},
"description": {
"type": "string"
},
"due_on": {
"description": "ISO 8601 time.",
"type": "string"
}
},
"required": [ "number" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/milestones/{number}
Delete a milestone.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the milestone.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get labels for every issue in a milestone.
get /repos/{ownerId}/{repoId}/milestones/{number}/labels
Get labels for every issue in a milestone.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the milestone.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string",
"maxLength": 6,
"minLength": 6
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List pull requests.
Create a pull request.
get /repos/{ownerId}/{repoId}/pulls
List pull requests.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- state: (one of open,closed - default: open)
String to filter by state.
- head: (string)
Filter pulls by head user and branch name in the format of 'user:ref-name'. Example: github:new-script-format.
- base: (string)
Filter pulls by base branch name. Example - gh-pages.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
},
"issue_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"merged_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"head": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"base": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"review_comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/octocat/Hello-World/pulls/1",
"html_url": "https://github.com/octocat/Hello-World/pulls/1",
"diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff",
"patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch",
"issue_url": "https://github.com/octocat/Hello-World/issue/1",
"number": 1,
"state": "open",
"title": "new-feature",
"body": "Please pull these awesome changes",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:01:12Z",
"closed_at": "2011-01-26T19:01:12Z",
"merged_at": "2011-01-26T19:01:12Z",
"head": {
"label": "new-topic",
"ref": "new-topic",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"base": {
"label": "master",
"ref": "master",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1"
},
"comments": {
"href": "https://api.github.com/octocat/Hello-World/issues/1/comments"
},
"review_comments": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1/comments"
}
},
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/pulls
Create a pull request.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
},
"issue_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"merged_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"head": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"base": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"review_comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/octocat/Hello-World/pulls/1",
"html_url": "https://github.com/octocat/Hello-World/pulls/1",
"diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff",
"patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch",
"issue_url": "https://github.com/octocat/Hello-World/issue/1",
"number": 1,
"state": "open",
"title": "new-feature",
"body": "Please pull these awesome changes",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:01:12Z",
"closed_at": "2011-01-26T19:01:12Z",
"merged_at": "2011-01-26T19:01:12Z",
"head": {
"label": "new-topic",
"ref": "new-topic",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"base": {
"label": "master",
"ref": "master",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1"
},
"comments": {
"href": "https://api.github.com/octocat/Hello-World/issues/1/comments"
},
"review_comments": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1/comments"
}
},
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single pull request.
Update a pull request.
get /repos/{ownerId}/{repoId}/pulls/{number}
Get a single pull request.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
},
"issue_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"merged_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"head": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"base": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"review_comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"url": "https://api.github.com/octocat/Hello-World/pulls/1",
"html_url": "https://github.com/octocat/Hello-World/pulls/1",
"diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff",
"patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch",
"issue_url": "https://github.com/octocat/Hello-World/issue/1",
"number": 1,
"state": "open",
"title": "new-feature",
"body": "Please pull these awesome changes",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:01:12Z",
"closed_at": "2011-01-26T19:01:12Z",
"merged_at": "2011-01-26T19:01:12Z",
"head": {
"label": "new-topic",
"ref": "new-topic",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"base": {
"label": "master",
"ref": "master",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1"
},
"comments": {
"href": "https://api.github.com/octocat/Hello-World/issues/1/comments"
},
"review_comments": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1/comments"
}
},
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6",
"merged": false,
"mergeable": true,
"merged_by": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"comments": 10,
"commits": 3,
"additions": 100,
"deletions": 3,
"changed_files": 5
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/pulls/{number}
Update a pull request.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"state": {
"enum": [ "open", "closed" ]
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"organization": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"parent": {
"description": "Is present when the repo is a fork. Parent is the repo this repo was forked from.",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"source": {
"description": "Is present when the repo is a fork. Source is the ultimate source for the network.",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"has_issues": {
"type": "boolean"
},
"has_wiki": {
"type": "boolean"
},
"has_downloads": {
"type": "boolean"
}
}
}
Example:
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"organization": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"type": "Organization"
},
"parent": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
},
"source": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
},
"has_issues": true,
"has_wiki": true,
"has_downloads": true
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List pull requests files.
get /repos/{ownerId}/{repoId}/pulls/{number}/files
List pull requests files.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
},
"issue_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"merged_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"head": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"base": {
"properties": {
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"sha": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"review_comments": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/octocat/Hello-World/pulls/1",
"html_url": "https://github.com/octocat/Hello-World/pulls/1",
"diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff",
"patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch",
"issue_url": "https://github.com/octocat/Hello-World/issue/1",
"number": 1,
"state": "open",
"title": "new-feature",
"body": "Please pull these awesome changes",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:01:12Z",
"closed_at": "2011-01-26T19:01:12Z",
"merged_at": "2011-01-26T19:01:12Z",
"head": {
"label": "new-topic",
"ref": "new-topic",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"base": {
"label": "master",
"ref": "master",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"repo": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
},
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1"
},
"comments": {
"href": "https://api.github.com/octocat/Hello-World/issues/1/comments"
},
"review_comments": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1/comments"
}
},
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List commits on a pull request.
get /repos/{ownerId}/{repoId}/pulls/{number}/commits
List commits on a pull request.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
},
"commit": {
"properties": {
"url": {
"type": "string"
},
"author": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
},
"author": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array"
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"commit": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"author": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"date": "2011-04-14T16:00:49Z"
},
"committer": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"date": "2011-04-14T16:00:49Z"
},
"message": "Fix all the bugs",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
},
"author": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"committer": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
]
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get if a pull request has been merged.
Merge a pull request (Merge Buttonâ„¢)
get /repos/{ownerId}/{repoId}/pulls/{number}/merge
Get if a pull request has been merged.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Pull request has been merged.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Pull request has not been merged.
put /repos/{ownerId}/{repoId}/pulls/{number}/merge
Merge a pull request (Merge Buttonâ„¢)
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"commit_message": {
"description": "The message that will be used for the merge commit",
"type": "string"
}
}
}
HTTP status code 200
Response if merge was successful.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"merged": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
Example:
{
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"merged": true,
"message": "Pull Request successfully merged"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 405
Response if merge cannot be performed.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"merged": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
Example:
{
"sha": null,
"merged": false,
"message": "Failure reason"
}
List comments on a pull request.
Create a comment.
TODO Alternative input ( http://developer.github.com/v3/pulls/comments/ )
description: | Alternative Input. Instead of passing commit_id, path, and position you can reply to an existing Pull Request Comment like this:
body
Required string
in_reply_to
Required number - Comment id to reply to.
get /repos/{ownerId}/{repoId}/pulls/{number}/comments
List comments on a pull request.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/pulls/{number}/comments
Create a comment.
TODO Alternative input ( http://developer.github.com/v3/pulls/comments/ )
description: | Alternative Input. Instead of passing commit_id, path, and position you can reply to an existing Pull Request Comment like this:
body
Required string
in_reply_to
Required number - Comment id to reply to.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of a pull.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"body": {
"type": "string"
},
"commit_id": {
"description": "Sha of the commit to comment on.",
"type": "string"
},
"path": {
"description": "Relative path of the file to comment on.",
"type": "string"
},
"position": {
"description": "Line index in the diff to comment on.",
"type": "string"
}
},
"required": [ "body", "commit_id", "path", "position" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List comments in a repository. By default, Review Comments are ordered by ascending ID.
get /repos/{ownerId}/{repoId}/pulls/comments
List comments in a repository. By default, Review Comments are ordered by ascending ID.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- sort: (one of created,updated)
- direction: (one of asc,desc)
Ignored without 'sort' parameter.
- since: (string)
Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single comment.
Edit a comment.
Delete a comment.
get /repos/{ownerId}/{repoId}/pulls/comments/{number}
Get a single comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/pulls/comments/{number}
Edit a comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"body": {
"type": "string"
}
},
"required": [ "body" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"_links": {
"properties": {
"self": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"html": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
},
"pull_request": {
"properties": {
"href": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z",
"_links": {
"self": {
"href": "https://api.github.com/octocat/Hello-World/pulls/comments/1"
},
"html": {
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
},
"pull_request": {
"href": "https://api.github.com/octocat/Hello-World/pulls/1"
}
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/pulls/comments/{number}
Delete a comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- number: required (integer)
Id of the comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List. When authenticating as an organization owner of an organization-owned repository, all organization owners are included in the list of collaborators. Otherwise, only users with access to the repository are returned in the collaborators list.
get /repos/{ownerId}/{repoId}/collaborators
List. When authenticating as an organization owner of an organization-owned repository, all organization owners are included in the list of collaborators. Otherwise, only users with access to the repository are returned in the collaborators list.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check if user is a collaborator
Add collaborator.
Remove collaborator.
get /repos/{ownerId}/{repoId}/collaborators/{user}
Check if user is a collaborator
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- user: required (string)
Login of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
User is a collaborator.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
User is not a collaborator.
put /repos/{ownerId}/{repoId}/collaborators/{user}
Add collaborator.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- user: required (string)
Login of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Collaborator added.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/collaborators/{user}
Remove collaborator.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- user: required (string)
Login of the user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Collaborator removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List commit comments for a repository. Comments are ordered by ascending ID.
get /repos/{ownerId}/{repoId}/comments
List commit comments for a repository. Comments are ordered by ascending ID.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"html_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"line": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
"url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"line": 14,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single commit comment.
Update a commit comment.
Delete a commit comment
get /repos/{ownerId}/{repoId}/comments/{commentId}
Get a single commit comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- commentId: required (integer)
Id of a comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"html_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"line": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
"url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"line": 14,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/comments/{commentId}
Update a commit comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- commentId: required (integer)
Id of a comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"body": {
"type": "string"
}
},
"required": [ "body" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"html_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"line": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
"url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"line": 14,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/comments/{commentId}
Delete a commit comment
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- commentId: required (integer)
Id of a comment.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List commits on a repository.
get /repos/{ownerId}/{repoId}/commits
List commits on a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- sha: (string)
Sha or branch to start listing commits from.
- path: (string)
Only commits containing this file path will be returned.
- author: (string)
GitHub login, name, or email by which to filter by commit author.
- since: (string)
ISO 8601 Date - Only commits after this date will be returned.
- until: (string)
ISO 8601 Date - Only commits before this date will be returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
},
"commit": {
"properties": {
"url": {
"type": "string"
},
"author": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
},
"author": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array"
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"commit": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"author": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"date": "2011-04-14T16:00:49Z"
},
"committer": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"date": "2011-04-14T16:00:49Z"
},
"message": "Fix all the bugs",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
},
"author": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"committer": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
]
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single commit.
get /repos/{ownerId}/{repoId}/commits/{shaCode}
Get a single commit.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (string)
SHA-1 code of the commit.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
},
"commit": {
"properties": {
"url": {
"type": "string"
},
"author": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"date": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
},
"author": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array"
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"commit": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"author": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"date": "2011-04-14T16:00:49Z"
},
"committer": {
"name": "Monalisa Octocat",
"email": "support@github.com",
"date": "2011-04-14T16:00:49Z"
},
"message": "Fix all the bugs",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
},
"author": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"committer": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
],
"stats": {
"additions": 104,
"deletions": 4,
"total": 108
},
"files": [
{
"filename": "file1.txt",
"additions": 10,
"deletions": 2,
"changes": 12,
"status": "modified",
"raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
"blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
"patch": "@@ -29,7 29,7 @@\n....."
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List comments for a single commitList comments for a single commit.
Create a commit comment.
get /repos/{ownerId}/{repoId}/commits/{shaCode}/comments
List comments for a single commitList comments for a single commit.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (string)
SHA-1 code of the commit.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"html_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"line": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
"url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"line": 14,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/commits/{shaCode}/comments
Create a commit comment.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- shaCode: required (string)
SHA-1 code of the commit.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"description": "SHA of the commit to comment on.",
"type": "string"
},
"body": {
"type": "string"
},
"path": {
"description": "Relative path of the file to comment on.",
"type": "string"
},
"position": {
"description": "Line index in the diff to comment on.",
"type": "integer"
},
"line": {
"description": "Deprecated - Use position parameter instead.",
"type": "string"
},
"number": {
"description": "Line number in the file to comment on. Defaults to null.",
"type": "string"
}
},
"required": [ "sha", "body" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"html_url": {
"type": "string"
},
"url": {
"type": "string"
},
"id": {
"type": "integer"
},
"body": {
"type": "string"
},
"path": {
"type": "string"
},
"position": {
"type": "integer"
},
"line": {
"type": "integer"
},
"commit_id": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
"url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
"id": 1,
"body": "Great stuff",
"path": "file1.txt",
"position": 4,
"line": 14,
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get contents. This method returns the contents of a file or directory in a repository. Files and symlinks support a custom media type for getting the raw content. Directories and submodules do not support custom media types. Note: This API supports files up to 1 megabyte in size. Here can be many outcomes. For details see "http://developer.github.com/v3/repos/contents/"
Create a file.
Delete a file. This method deletes a file in a repository.
get /repos/{ownerId}/{repoId}/contents/{path}
Get contents. This method returns the contents of a file or directory in a repository. Files and symlinks support a custom media type for getting the raw content. Directories and submodules do not support custom media types. Note: This API supports files up to 1 megabyte in size. Here can be many outcomes. For details see "http://developer.github.com/v3/repos/contents/"
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- path: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- path: (string)
The content path.
- ref: (string)
The String name of the Commit/Branch/Tag. Defaults to 'master'.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"encoding": {
"type": "string"
},
"size": {
"type": "integer"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"_links": {
"properties": {
"git": {
"type": "string"
},
"self": {
"type": "string"
},
"html": {
"type": "string"
}
},
"type": "object"
}
}
}
Example:
{
"type": "file",
"encoding": "base64",
"size": 5362,
"name": "README.md",
"path": "README.md",
"content": "encoded content ...",
"sha": "3d21ec53a331a6f037a91c368710b99387d012c1",
"url": "https://api.github.com/repos/pengwynn/octokit/contents/README.md",
"git_url": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"html_url": "https://github.com/pengwynn/octokit/blob/master/README.md",
"_links": {
"git": "https://api.github.com/repos/pengwynn/octokit/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"self": "https://api.github.com/repos/pengwynn/octokit/contents/README.md",
"html": "https://github.com/pengwynn/octokit/blob/master/README.md"
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
put /repos/{ownerId}/{repoId}/contents/{path}
Create a file.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- path: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"content": {
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"sha": {
"type": "string"
},
"size": {
"type": "integer"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"type": {
"type": "string"
},
"_links": {
"properties": {
"self": {
"type": "string"
},
"git": {
"type": "string"
},
"html": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"commit": {
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"author": {
"properties": {
"date": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"date": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
]
},
"type": "object"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"path": {
"description": "The content path.",
"type": "string"
},
"message": {
"description": "The commit message.",
"type": "string"
},
"content": {
"description": "The new file content, Base64 encoded.",
"type": "string"
},
"sha": {
"description": "Is included if we want to modify existing file. The blob SHA of the file being replaced.",
"type": "string"
},
"branch": {
"description": "The branch name. If not provided, uses the repository's default branch (usually master).",
"type": "string"
},
"author": {
"properties": {
"name": {
"description": "The name of the author of the commit.",
"type": "string"
},
"email": {
"description": "The email of the author of the commit",
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"description": "The name of the committer of the commit.",
"type": "string"
},
"email": {
"description": "The email of the committer of the commit.",
"type": "string"
}
},
"type": "object"
}
},
"required": [ "path", "message", "content", "branch" ]
}
Example:
{
"content": {
"name": "hello.txt",
"path": "notes/hello.txt",
"sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"size": 9,
"url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt",
"git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt"
}
},
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"committer": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/contents/{path}
Delete a file. This method deletes a file in a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- path: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"path": {
"description": "The content path.",
"type": "string"
},
"message": {
"description": "The commit message.",
"type": "string"
},
"content": {
"description": "The new file content, Base64 encoded.",
"type": "string"
},
"sha": {
"description": "The blob SHA of the file being removed.",
"type": "string"
},
"branch": {
"description": "The branch name. If not provided, uses the repository's default branch (usually master).",
"type": "string"
},
"author": {
"properties": {
"name": {
"description": "The name of the author of the commit.",
"type": "string"
},
"email": {
"description": "The email of the author of the commit",
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"description": "The name of the committer of the commit.",
"type": "string"
},
"email": {
"description": "The email of the committer of the commit.",
"type": "string"
}
},
"type": "object"
}
},
"required": [ "path", "message", "sha" ]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"content": {
"type": "string"
},
"commit": {
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"author": {
"properties": {
"date": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"date": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"type": "object"
}
]
},
"type": "object"
}
}
}
Example:
{
"content": null,
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"committer": {
"date": "2010-04-10T14:10:01-07:00",
"name": "Scott Chacon",
"email": "schacon@gmail.com"
},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get archive link. This method will return a 302 to a URL to download a tarball or zipball archive for a repository. Please make sure your HTTP framework is configured to follow redirects or you will need to use the Location header to make a second GET request. Note: For private repositories, these links are temporary and expire quickly.
get /repos/{ownerId}/{repoId}/{archive_format}/{path}
Get archive link. This method will return a 302 to a URL to download a tarball or zipball archive for a repository. Please make sure your HTTP framework is configured to follow redirects or you will need to use the Location header to make a second GET request. Note: For private repositories, these links are temporary and expire quickly.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- archive_format: required (one of tarball,zipball)
- path: required (string)
Valid Git reference, defaults to 'master'.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 302
Found.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List downloads for a repository.
Create a new download (Part 1: Create the resource). For part 2 see http://developer.github.com/v3/repos/downloads/#create-a-new-download-part-2-upload-file-to-s3
get /repos/{ownerId}/{repoId}/downloads
List downloads for a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"size": {
"type": "integer"
},
"download_count": {
"type": "integer"
},
"content_type": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/downloads/1",
"html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg",
"id": 1,
"name": "new_file.jpg",
"description": "Description of your download",
"size": 1024,
"download_count": 40,
"content_type": ".jpg"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/downloads
Create a new download (Part 1: Create the resource). For part 2 see http://developer.github.com/v3/repos/downloads/#create-a-new-download-part-2-upload-file-to-s3
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"size": {
"description": "Size of file in bytes.",
"type": "integer"
},
"description": {
"type": "string"
},
"content_type": {
"type": "string"
}
},
"required": [ "name", "size" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"size": {
"type": "integer"
},
"download_count": {
"type": "integer"
},
"content_type": {
"type": "string"
},
"policy": {
"type": "string"
},
"signature": {
"type": "string"
},
"bucket": {
"type": "string"
},
"accesskeyid": {
"type": "string"
},
"path": {
"type": "string"
},
"acl": {
"type": "string"
},
"expirationdate": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"prefix": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"redirect": {
"type": "boolean"
},
"s3_url": {
"type": "string"
}
}
}
Example:
{
"url": "https://api.github.com/repos/octocat/Hello-World/downloads/1",
"html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg",
"id": 1,
"name": "new_file.jpg",
"description": "Description of your download",
"size": 1024,
"download_count": 40,
"content_type": ".jpg",
"policy": "ewogICAg...",
"signature": "mwnFDC...",
"bucket": "github",
"accesskeyid": "1ABCDEFG...",
"path": "downloads/octocat/Hello-World/new_file.jpg",
"acl": "public-read",
"expirationdate": "2011-04-14T16:00:49Z",
"prefix": "downloads/octocat/Hello-World/",
"mime_type": "image/jpeg",
"redirect": false,
"s3_url": "https://github.s3.amazonaws.com/"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single download.
Delete a download.
get /repos/{ownerId}/{repoId}/downloads/{downloadId}
Get a single download.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- downloadId: required (integer)
Id of the download.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"size": {
"type": "integer"
},
"download_count": {
"type": "integer"
},
"content_type": {
"type": "string"
}
},
"type": "object"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/downloads/{downloadId}
Delete a download.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- downloadId: required (integer)
Id of the download.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List forks.
Create a fork. Forking a Repository happens asynchronously. Therefore, you may have to wait a short period before accessing the git objects. If this takes longer than 5 minutes, be sure to contact Support.
get /repos/{ownerId}/{repoId}/forks
List forks.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- sort: (one of newest,oldest,watchers - default: newest)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/forks
Create a fork. Forking a Repository happens asynchronously. Therefore, you may have to wait a short period before accessing the git objects. If this takes longer than 5 minutes, be sure to contact Support.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"organization": {
"description": "Organization login. The repository will be forked into this organization.",
"type": "string"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
}
}
Example:
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of keys.
Create a key.
get /repos/{ownerId}/{repoId}/keys
Get list of keys.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/keys
Create a key.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Example:
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a key
Edit a key.
Delete a key.
get /repos/{ownerId}/{repoId}/keys/{keyId}
Get a key
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- keyId: required (integer)
Id of a key.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Example:
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/keys/{keyId}
Edit a key.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- keyId: required (integer)
Id of a key.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Example:
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/keys/{keyId}
Delete a key.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- keyId: required (integer)
Id of a key.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get list of hooks.
Create a hook.
get /repos/{ownerId}/{repoId}/hooks
Get list of hooks.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"name": {
"type": "string"
},
"events": [
{
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"active": {
"type": "boolean"
},
"config": {
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
}
},
"type": "object"
},
"id": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/hooks/1",
"updated_at": "2011-09-06T20:39:23Z",
"created_at": "2011-09-06T17:26:27Z",
"name": "web",
"events": [
"push",
"pull_request"
],
"active": true,
"config": {
"url": "http://example.com",
"content_type": "json"
},
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/hooks
Create a hook.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"config": {
"description": "A Hash containing key/value pairs to provide settings for this hook. Modifying this will replace the entire config object. These settings vary between the services and are defined in the github-services repo. Booleans are stored internally as \"1\" for true, and \"0\" for false. Any JSON true/false values will be converted automatically.",
"type": "string"
},
"events": [
{
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"add_events": [
{
"description": "Determines a list of events to be added to the list of events that the Hook triggers for.",
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"remove_events": [
{
"description": "Determines a list of events to be removed from the list of events that the Hook triggers for.",
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"active": {
"description": "Determines whether the hook is actually triggered on pushes.",
"type": "boolean"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"name": {
"type": "string"
},
"events": [
{
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"active": {
"type": "boolean"
},
"config": {
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
}
},
"type": "object"
},
"id": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/hooks/1",
"updated_at": "2011-09-06T20:39:23Z",
"created_at": "2011-09-06T17:26:27Z",
"name": "web",
"events": [
"push",
"pull_request"
],
"active": true,
"config": {
"url": "http://example.com",
"content_type": "json"
},
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get single hook.
Edit a hook.
Delete a hook.
get /repos/{ownerId}/{repoId}/hooks/{hookId}
Get single hook.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- hookId: required (integer)
Id of the hook.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"name": {
"type": "string"
},
"events": [
{
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"active": {
"type": "boolean"
},
"config": {
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
}
},
"type": "object"
},
"id": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/hooks/1",
"updated_at": "2011-09-06T20:39:23Z",
"created_at": "2011-09-06T17:26:27Z",
"name": "web",
"events": [
"push",
"pull_request"
],
"active": true,
"config": {
"url": "http://example.com",
"content_type": "json"
},
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /repos/{ownerId}/{repoId}/hooks/{hookId}
Edit a hook.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- hookId: required (integer)
Id of the hook.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"config": {
"description": "A Hash containing key/value pairs to provide settings for this hook. Modifying this will replace the entire config object. These settings vary between the services and are defined in the github-services repo. Booleans are stored internally as \"1\" for true, and \"0\" for false. Any JSON true/false values will be converted automatically.",
"type": "string"
},
"events": [
{
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"add_events": [
{
"description": "Determines a list of events to be added to the list of events that the Hook triggers for.",
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"remove_events": [
{
"description": "Determines a list of events to be removed from the list of events that the Hook triggers for.",
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"active": {
"description": "Determines whether the hook is actually triggered on pushes.",
"type": "boolean"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"name": {
"type": "string"
},
"events": [
{
"enum": [
"push",
"issues",
"issue_comment",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"gollum",
"watch",
"download",
"fork",
"fork_apply",
"member",
"public",
"team_add",
"status"
]
}
],
"type": "array",
"active": {
"type": "boolean"
},
"config": {
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
}
},
"type": "object"
},
"id": {
"type": "integer"
}
}
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/hooks/1",
"updated_at": "2011-09-06T20:39:23Z",
"created_at": "2011-09-06T17:26:27Z",
"name": "web",
"events": [
"push",
"pull_request"
],
"active": true,
"config": {
"url": "http://example.com",
"content_type": "json"
},
"id": 1
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /repos/{ownerId}/{repoId}/hooks/{hookId}
Delete a hook.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- hookId: required (integer)
Id of the hook.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Test a push hook. This will trigger the hook with the latest push to the current repository if the hook is subscribed to push events. If the hook is not subscribed to push events, the server will respond with 204 but no test POST will be generated. Note: Previously /repos/:owner/:repo/hooks/:id/test
post /repos/{ownerId}/{repoId}/hooks/{hookId}/tests
Test a push hook. This will trigger the hook with the latest push to the current repository if the hook is subscribed to push events. If the hook is not subscribed to push events, the server will respond with 204 but no test POST will be generated. Note: Previously /repos/:owner/:repo/hooks/:id/test
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- hookId: required (integer)
Id of the hook.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Hook is triggered.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Perform a merge.
post /repos/{ownerId}/{repoId}/merges
Perform a merge.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"base": {
"description": "The name of the base branch that the head will be merged into.",
"type": "string"
},
"head": {
"description": "The head to merge. This can be a branch name or a commit SHA1.",
"type": "string"
},
"commit_message": {
"description": "Commit message to use for the merge commit. If omitted, a default message will be used.",
"type": "string"
}
},
"required": [ "base", "head" ]
}
HTTP status code 201
Successful Response (The resulting merge commit)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"sha": {
"type": "string"
},
"commit": {
"properties": {
"author": {
"properties": {
"name": {
"type": "string"
},
"date": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"name": {
"type": "string"
},
"date": {
"type": "string"
},
"email": {
"type": "string"
}
},
"type": "object"
},
"message": {
"type": "string"
},
"tree": {
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"url": {
"type": "string"
},
"comment_count": {
"type": "integer"
}
},
"type": "object"
},
"url": {
"type": "string"
},
"comments_url": {
"type": "string"
},
"author": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"followers_url": {
"type": "string"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string"
},
"organizations_url": {
"type": "string"
},
"repos_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"committer": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"followers_url": {
"type": "string"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string"
},
"organizations_url": {
"type": "string"
},
"repos_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"parents": [
{
"properties": {
"sha": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array"
}
}
Example:
{
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"merged": true,
"message": "Pull Request successfully merged"
}
HTTP status code 204
No-op response (base already contains the head, nothing to merge)
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Missing base response or missing head response
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"message": {
"description": "Error message",
"type": "string"
}
}
}
Example:
{
"message": "Base does not exist"
}
HTTP status code 409
Merge conflict response.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"message": {
"description": "Error message",
"type": "string"
}
}
}
Example:
{
"message": "Merge Conflict"
}
List Statuses for a specific Ref.
Create a Status.
get /repos/{ownerId}/{repoId}/statuses/{ref}
List Statuses for a specific Ref.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- ref: required (string)
Ref to list the statuses from. It can be a SHA, a branch name, or a tag name.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"state": {
"type": "string"
},
"target_url": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"created_at": "2012-07-20T01:19:13Z",
"updated_at": "2012-07-20T01:19:13Z",
"state": "success",
"target_url": "https://ci.example.com/1000/output",
"description": "Build has completed successfully",
"id": 1,
"url": "https://api.github.com/repos/octocat/example/statuses/1",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /repos/{ownerId}/{repoId}/statuses/{ref}
Create a Status.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
- ref: required (string)
Ref to list the statuses from. It can be a SHA, a branch name, or a tag name.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"state": {
"enum": [
"pending", "success", "error", "failure"
]
},
"target_url": {
"description": "Target url to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the ?source' of the Status.",
"type": "string"
},
"description": {
"description": "Short description of the status",
"type": "string"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"state": {
"type": "string"
},
"target_url": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
Example:
[
{
"created_at": "2012-07-20T01:19:13Z",
"updated_at": "2012-07-20T01:19:13Z",
"state": "success",
"target_url": "https://ci.example.com/1000/output",
"description": "Build has completed successfully",
"id": 1,
"url": "https://api.github.com/repos/octocat/example/statuses/1",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get contributors list with additions, deletions, and commit counts.
get /repos/{ownerId}/{repoId}/stats/contributors
Get contributors list with additions, deletions, and commit counts.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"author": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"total": {
"description": "The Total number of commits authored by the contributor.",
"type": "integer"
},
"weeks": [
{
"properties": {
"w": {
"description": "Start of the week.",
"type": "string"
},
"a": {
"description": "Number of additions.",
"type": "integer"
},
"d": {
"description": "Number of deletions.",
"type": "integer"
},
"c": {
"description": "Number of commits.",
"type": "integer"
}
},
"type": "object"
}
],
"type": "array"
}
]
}
Example:
[
{
"author": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"total": 135,
"weeks": [
{
"w": "1367712000",
"a": 6898,
"d": 77,
"c": 10
}
]
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get the last year of commit activity data. Returns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.
get /repos/{ownerId}/{repoId}/stats/commit_activity
Get the last year of commit activity data. Returns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"days": [
{
"type": "integer"
}
],
"type": "array",
"total": {
"type": "integer"
},
"week": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"days": [
0,
3,
26,
20,
39,
1,
0
],
"total": 89,
"week": 1336280400
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get the number of additions and deletions per week. Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
get /repos/{ownerId}/{repoId}/stats/code_frequency
Get the number of additions and deletions per week. Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"type": "integer"
}
]
}
Example:
[
[
1302998400,
1124,
-435
]
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get the weekly commit count for the repo owner and everyone else.
get /repos/{ownerId}/{repoId}/stats/participation
Get the weekly commit count for the repo owner and everyone else.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"all": [
{
"type": "integer"
}
],
"type": "array",
"owner": [
{
"type": "integer"
}
],
"type": "array"
}
}
Example:
{
"all": [
11,
21,
15,
2,
8,
1,
8,
23,
17,
21,
11,
10,
33,
91,
38,
34,
22,
23,
32,
3,
43,
87,
71,
18,
13,
5,
13,
16,
66,
27,
12,
45,
110,
117,
13,
8,
18,
9,
19,
26,
39,
12,
20,
31,
46,
91,
45,
10,
24,
9,
29,
7
],
"owner": [
3,
2,
3,
0,
2,
0,
5,
14,
7,
9,
1,
5,
0,
48,
19,
2,
0,
1,
10,
2,
23,
40,
35,
8,
8,
2,
10,
6,
30,
0,
2,
9,
53,
104,
3,
3,
10,
4,
7,
11,
21,
4,
4,
22,
26,
63,
11,
2,
14,
1,
10,
3
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get the number of commits per hour in each day. Each array contains the day number, hour number, and number of commits 0-6 Sunday - Saturday 0-23 Hour of day Number of commits
For example, [2, 14, 25] indicates that there were 25 total commits, during the 2.00pm hour on Tuesdays. All times are based on the time zone of individual commits.
get /repos/{ownerId}/{repoId}/stats/punch_card
Get the number of commits per hour in each day. Each array contains the day number, hour number, and number of commits 0-6 Sunday - Saturday 0-23 Hour of day Number of commits
For example, [2, 14, 25] indicates that there were 25 total commits, during the 2.00pm hour on Tuesdays. All times are based on the time zone of individual commits.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"": [
{
"type": "integer"
}
]
}
]
}
Example:
[
[
0,
0,
5
],
[
0,
1,
43
],
[
0,
2,
21
]
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/user
Get the authenticated user.
Update the authenticated user.
get /user
Get the authenticated user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"company": {
"type": "string"
},
"blog": {
"type": "string"
},
"location": {
"type": "string"
},
"email": {
"type": "string"
},
"hireable": {
"type": "boolean"
},
"bio": {
"type": "string"
},
"public_repos": {
"type": "integer"
},
"public_gists": {
"type": "integer"
},
"followers": {
"type": "integer"
},
"following": {
"type": "integer"
},
"html_url": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"type": {
"type": "string"
},
"total_private_repos": {
"type": "integer"
},
"owned_private_repos": {
"type": "integer"
},
"private_gists": {
"type": "integer"
},
"disk_usage": {
"type": "integer"
},
"collaborators": {
"type": "integer"
},
"plan": {
"properties": {
"name": {
"type": "string"
},
"space": {
"type": "integer"
},
"collaborators": {
"type": "integer"
},
"private_repos": {
"type": "integer"
}
},
"type": "object"
}
}
}
Example:
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "User",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"plan": {
"name": "Medium",
"space": 400,
"collaborators": 10,
"private_repos": 20
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /user
Update the authenticated user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"blog": {
"type": "string"
},
"company": {
"type": "string"
},
"location": {
"type": "string"
},
"hireable": {
"type": "boolean"
},
"bio": {
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"company": {
"type": "string"
},
"blog": {
"type": "string"
},
"location": {
"type": "string"
},
"email": {
"type": "string"
},
"hireable": {
"type": "boolean"
},
"bio": {
"type": "string"
},
"public_repos": {
"type": "integer"
},
"public_gists": {
"type": "integer"
},
"followers": {
"type": "integer"
},
"following": {
"type": "integer"
},
"html_url": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"type": {
"type": "string"
},
"total_private_repos": {
"type": "integer"
},
"owned_private_repos": {
"type": "integer"
},
"private_gists": {
"type": "integer"
},
"disk_usage": {
"type": "integer"
},
"collaborators": {
"type": "integer"
},
"plan": {
"properties": {
"name": {
"type": "string"
},
"space": {
"type": "integer"
},
"collaborators": {
"type": "integer"
},
"private_repos": {
"type": "integer"
}
},
"type": "object"
}
}
}
Example:
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "User",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"plan": {
"name": "Medium",
"space": 400,
"collaborators": 10,
"private_repos": 20
}
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List public and private organizations for the authenticated user.
get /user/orgs
List public and private organizations for the authenticated user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"avatar_url": {
"type": "string"
}
}
]
}
Example:
[
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"avatar_url": "https://github.com/images/error/octocat_happy.gif"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single user.
get /user/{userId}
Get a single user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"company": {
"type": "string"
},
"blog": {
"type": "string"
},
"location": {
"type": "string"
},
"email": {
"description": "Note: The returned email is the user's publicly visible email address (or null if the user has not specified a public email address in their profile).",
"type": "string"
},
"hireable": {
"type": "boolean"
},
"bio": {
"type": "string"
},
"public_repos": {
"type": "integer"
},
"public_gists": {
"type": "integer"
},
"followers": {
"type": "integer"
},
"following": {
"type": "integer"
},
"html_url": {
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"type": {
"type": "string"
}
}
}
Example:
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat",
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "User"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List events that a user has received.
get /user/{userId}/received_events
List events that a user has received.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List public events that a user has received.
get /user/{userId}/received_events/public
List public events that a user has received.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List all public organizations for a user.
get /user/{userId}/orgs
List all public organizations for a user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"avatar_url": {
"type": "string"
}
}
]
}
Example:
[
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"avatar_url": "https://github.com/images/error/octocat_happy.gif"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List events performed by a user. If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
get /user/{userId}/events
List events performed by a user. If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List public events performed by a user.
get /user/{userId}/events/public
List public events performed by a user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List events for an organization.
get /user/{userId}/events/orgs/{orgId}
List events for an organization.
URI Parameters
- userId: required (integer)
- orgId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List repositories being starred.
get /user/{userId}/starred
List repositories being starred.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- sort: (one of created,updated - default: created)
- direction: (one of asc,desc - default: desc)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List repositories being watched by a user.
get /user/{userId}/subscriptions
List repositories being watched by a user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "integer"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List email addresses for a user. In the final version of the API, this method will return an array of hashes with extended information for each email address indicating if the address has been verified and if it's the user's primary email address for GitHub. Until API v3 is finalized, use the application/vnd.github.v3 media type to get other response format.
Add email address(es). You can post a single email address or an array of addresses.
Delete email address(es). You can include a single email address or an array of addresses.
get /user/emails
List email addresses for a user. In the final version of the API, this method will return an array of hashes with extended information for each email address indicating if the address has been verified and if it's the user's primary email address for GitHub. Until API v3 is finalized, use the application/vnd.github.v3 media type to get other response format.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"type": "string"
}
]
}
Example:
[
"octocat@github.com",
"support@github.com"
]
Type: application/vnd.github.v3
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"properties": {
"email": {
"type": "string"
},
"verified": {
"type": "boolean"
},
"primary": {
"type": "boolean"
}
},
"type": "object"
}
]
}
Example:
[
{
"email": "octocat@github.com",
"verified": true,
"primary": true
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /user/emails
Add email address(es). You can post a single email address or an array of addresses.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /user/emails
Delete email address(es). You can include a single email address or an array of addresses.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"type": "string"
}
]
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List who the authenticated user is following.
get /user/following
List who the authenticated user is following.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check if you are following a user.
Follow a user. Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
Unfollow a user. Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
get /user/following/{userId}
Check if you are following a user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Response if you are following this user.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Response if you are not following this user.
put /user/following/{userId}
Follow a user. Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
You are now following the user.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /user/following/{userId}
Unfollow a user. Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
User unfollowed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List your public keys. Lists the current user's keys. Management of public keys via the API requires that you are authenticated through basic auth, or OAuth with the 'user' scope.
Create a public key.
get /user/keys
List your public keys. Lists the current user's keys. Management of public keys via the API requires that you are authenticated through basic auth, or OAuth with the 'user' scope.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /user/keys
Create a public key.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Example:
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single public key.
Update a public key.
Delete a public key.
get /user/keys/{keyId}
Get a single public key.
URI Parameters
- keyId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Example:
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
patch /user/keys/{keyId}
Update a public key.
URI Parameters
- keyId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"key": {
"type": "string"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
Example:
{
"id": 1,
"key": "ssh-rsa AAA...",
"url": "https://api.github.com/user/keys/1",
"title": "octocat@octomac"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /user/keys/{keyId}
Delete a public key.
URI Parameters
- keyId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Item removed.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List repositories being starred by the authenticated user.
get /user/starred
List repositories being starred by the authenticated user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- sort: (one of created,updated - default: created)
- direction: (one of asc,desc - default: desc)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check if you are starring a repository.
Star a repository.
Unstar a repository
get /user/starred/{ownerId}/{repoId}
Check if you are starring a repository.
URI Parameters
- ownerId: required (string)
- repoId: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
This repository is starred by you.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
This repository is not starred by you.
put /user/starred/{ownerId}/{repoId}
Star a repository.
URI Parameters
- ownerId: required (string)
- repoId: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Repository starred.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /user/starred/{ownerId}/{repoId}
Unstar a repository
URI Parameters
- ownerId: required (string)
- repoId: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Unstarred.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List repositories being watched by the authenticated user.
get /user/subscriptions
List repositories being watched by the authenticated user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "integer"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check if you are watching a repository.
Watch a repository.
Stop watching a repository
get /user/subscriptions/{ownerId}/{repoId}
Check if you are watching a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Repository is watched by you.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Repository is not watched by you.
put /user/subscriptions/{ownerId}/{repoId}
Watch a repository.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Repository is watched.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
delete /user/subscriptions/{ownerId}/{repoId}
Stop watching a repository
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Unwatched.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List issues. List all issues across owned and member repositories for the authenticated user.
get /user/issues
List issues. List all issues across owned and member repositories for the authenticated user.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- filter: required (one of assigned,created,mentioned,subscribed,all - default: all)
Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state: required (one of open,closed - default: open)
- labels: required (string)
String list of comma separated Label names. Example - bug,ui,@high.
- sort: required (one of created,updated,comments - default: created)
- direction: required (one of asc,desc - default: desc)
- since: (string)
Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only issues updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"issues": [
{
"properties": {
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"labels": [
{
"properties": {
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"color": {
"type": "string"
}
},
"type": "object"
}
],
"type": "array",
"assignee": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"milestone": {
"properties": {
"url": {
"type": "string"
},
"number": {
"type": "integer"
},
"state": {
"enum": [
"open",
"closed"
]
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"creator": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"open_issues": {
"type": "integer"
},
"closed_issues": {
"type": "integer"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"due_on": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"pull_request": {
"properties": {
"html_url": {
"type": "string"
},
"diff_url": {
"type": "string"
},
"patch_url": {
"type": "string"
}
},
"type": "object"
},
"closed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",
"body": "I'm having a problem with this.",
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"labels": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
"name": "bug",
"color": "f29513"
}
],
"assignee": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"milestone": {
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
"number": 1,
"state": "open",
"title": "v1.0",
"description": "",
"creator": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"open_issues": 4,
"closed_issues": 8,
"created_at": "2011-04-10T20:09:31Z",
"due_on": null
},
"comments": 0,
"pull_request": {
"html_url": "https://github.com/octocat/Hello-World/issues/1347",
"diff_url": "https://github.com/octocat/Hello-World/issues/1347.diff",
"patch_url": "https://github.com/octocat/Hello-World/issues/1347.patch"
},
"closed_at": null,
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List repositories for the authenticated user. Note that this does not include repositories owned by organizations which the user can access. You can list user organizations and list organization repositories separately.
Create a new repository for the authenticated user. OAuth users must supply repo scope.
get /user/repos
List repositories for the authenticated user. Note that this does not include repositories owned by organizations which the user can access. You can list user organizations and list organization repositories separately.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- type: (one of all,public,private,forks,sources,member - default: all)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /user/repos
Create a new repository for the authenticated user. OAuth users must supply repo scope.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"homepage": {
"type": "string"
},
"private": {
"description": "True to create a private repository, false to create a public one. Creating private repositories requires a paid GitHub account.",
"type": "boolean"
},
"has_issues": {
"description": "True to enable issues for this repository, false to disable them. Default is true.",
"type": "boolean"
},
"has_wiki": {
"description": "True to enable the wiki for this repository, false to disable it. Default is true.",
"type": "boolean"
},
"has_downloads": {
"description": "True to enable downloads for this repository, false to disable them. Default is true.",
"type": "boolean"
},
"team_id": {
"description": "The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization.",
"type": "integer"
},
"auto_init": {
"description": "True to create an initial commit with empty README. Default is false.",
"type": "boolean"
},
"gitignore_template": {
"description": "Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\" Ignored if auto_init parameter is not provided. ",
"type": "string"
}
},
"required": [ "name" ]
}
HTTP status code 201
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/users
Get all users. This provides a dump of every user, in the order that they signed up for GitHub. Note: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of users.
get /users
Get all users. This provides a dump of every user, in the order that they signed up for GitHub. Note: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of users.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- since: (integer)
The integer ID of the last User that you've seen.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List a user's followers.
get /users/{userId}
List a user's followers.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"list": [
{
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
}
]
}
Example:
[
{
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Check if one user follows another.
get /users/{userId}/following/{targetUserId}
Check if one user follows another.
URI Parameters
- userId: required (integer)
- targetUserId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 204
Response if user follows target user.
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
HTTP status code 404
Response if user does not follow target user.
List public keys for a user. Lists the verified public keys for a user. This is accessible by anyone.
get /users/{userId}/keys
List public keys for a user. Lists the verified public keys for a user. This is accessible by anyone.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"id": {
"type": "integer"
},
"key": {
"type": "string"
}
}
]
}
Example:
[
{
"id": 1,
"key": "ssh-rsa AAA..."
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List a user's gists.
get /users/{userId}/gists
List a user's gists.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- since: (string)
Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"gists": [
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"description": {
"type": "string"
},
"public": {
"type": "boolean"
},
"user": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"files": {
"properties": {
"ring.erl": {
"properties": {
"size": {
"type": "integer"
},
"filename": {
"type": "string"
},
"raw_url": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"comments": {
"type": "integer"
},
"comments_url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"git_pull_url": {
"type": "string"
},
"git_push_url": {
"type": "string"
},
"created_at": {
"type": "string"
}
}
}
]
}
Example:
[
{
"url": "https://api.github.com/gists/20c98223d9b59e1d48e5",
"id": "1",
"description": "description of gist",
"public": true,
"user": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"files": {
"ring.erl": {
"size": 932,
"filename": "ring.erl",
"raw_url": "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
}
},
"comments": 0,
"comments_url": "https://api.github.com/gists/19d18b30e8af75090307/comments/",
"html_url": "https://gist.github.com/1",
"git_pull_url": "git://gist.github.com/1.git",
"git_push_url": "git@gist.github.com:1.git",
"created_at": "2010-04-14T02:15:15Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List all public organizations for a user.
get /users/{userId}/orgs
List all public organizations for a user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"url": {
"type": "string"
},
"avatar_url": {
"type": "string"
}
}
]
}
Example:
[
{
"login": "github",
"id": 1,
"url": "https://api.github.com/orgs/github",
"avatar_url": "https://github.com/images/error/octocat_happy.gif"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
List public repositories for the specified user.
get /users/{userId}/repos
List public repositories for the specified user.
URI Parameters
- userId: required (integer)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Query Parameters
- type: (one of all,public,private,forks,sources,member - default: all)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"": [
{
"properties": {
"id": {
"type": "integer"
},
"owner": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
},
"full_name": {
"type": "string"
},
"description": {
"type": "string"
},
"private": {
"type": "boolean"
},
"fork": {
"type": "boolean"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"clone_url": {
"type": "string"
},
"git_url": {
"type": "string"
},
"ssh_url": {
"type": "string"
},
"svn_url": {
"type": "string"
},
"mirror_url": {
"type": "string"
},
"homepage": {
"type": "string"
},
"language": {
"type": "string"
},
"forks": {
"type": "integer"
},
"forks_count": {
"type": "integer"
},
"watchers": {
"type": "integer"
},
"watchers_count": {
"type": "integer"
},
"size": {
"type": "integer"
},
"master_branch": {
"type": "string"
},
"open_issues": {
"type": "integer"
},
"open_issues_count": {
"type": "integer"
},
"pushed_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"created_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
},
"updated_at": {
"description": "ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ",
"type": "string"
}
},
"type": "object"
}
]
}
}
Example:
[
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": false,
"fork": true,
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"clone_url": "https://github.com/octocat/Hello-World.git",
"git_url": "git://github.com/octocat/Hello-World.git",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"mirror_url": "git://git.example.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"watchers": 80,
"watchers_count": 80,
"size": 108,
"master_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z"
}
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/gitignore/templates
Listing available templates. List all templates available to pass as an option when creating a repository.
get /gitignore/templates
Listing available templates. List all templates available to pass as an option when creating a repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"": [
{
"type": "string"
}
]
}
Example:
[
"Actionscript",
"Android",
"AppceleratorTitanium",
"Autotools",
"Bancha",
"C",
"C "
]
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
Get a single template.
get /gitignore/templates/{language}
Get a single template.
URI Parameters
- language: required (string)
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"source": {
"type": "string"
}
}
}
Example:
{
"name": "C",
"source": "# Object files\n*.o\n\n# Libraries\n*.lib\n*.a\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n\n# Executables\n*.exe\n*.out\n*.app\n"
}
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/markdown
post /markdown
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"text": {
"description": "The Markdown text to render",
"type": "string"
},
"mode": {
"enum": [
"markdown",
"gfm"
]
},
"context": {
"description": "The repository context, only taken into account when rendering as gfm.",
"type": "string"
}
},
"required": [
"text"
]
}
HTTP status code 200
Body
Type: text/html
Example:
<p>Hello world <a href="http://github.com/github/linguist/issues/1" class="issue-link" title="This is a simple issue">github/linguist#1</a> <strong>cool</strong>, and <a href="http://github.com/github/gollum/issues/1" class="issue-link" title="This is another issue">#1</a>!</p>
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
post /markdown/raw
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
Body
Type: text/plain
Example:
<p>Hello world github/linguist#1 <strong>cool</strong>, and #1!</p>
HTTP status code 200
Body
Type: text/html
Example:
<p>Hello world github/linguist#1 <strong>cool</strong>, and #1!</p>
HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.
/networks/{ownerId}/{repoId}/events
List public events for a network of repositories.
get /networks/{ownerId}/{repoId}/events
List public events for a network of repositories.
URI Parameters
- ownerId: required (integer)
Id of the owner.
- repoId: required (integer)
Id of repository.
Headers
- X-GitHub-Media-Type: (string)
You can check the current version of media type in responses.
- Accept: (string)
Is used to set specified media type.
- X-RateLimit-Limit: (integer)
- X-RateLimit-Remaining: (integer)
- X-RateLimit-Reset: (integer)
- X-GitHub-Request-Id: (integer)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"properties": [
{
"properties": {
"type": {
"type": "string"
},
"public": {
"type": "boolean"
},
"payload": {
"properties": {},
"type": "object"
},
"repo": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"actor": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"org": {
"properties": {
"login": {
"type": "string"
},
"id": {
"type": "integer"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"created_at": {
"type": "timestamp"
},
"id": {
"type": "integer"
}
},
"type": "object"
}
]
}
Example:
[
{
"type": "Event",
"public": true,
"payload": {
},
"repo": {
"id": 3,
"name": "octocat/Hello-World",
"url": "https://api.github.com/repos/octocat/Hello-World"
},
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"org": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
},
"created_at": "2011-09-06T17:26:27Z",
"id": "12345"
}
]HTTP status code 403
API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.