## GitHub API

Base url https://api.github.com/

Version v3

### Security

#### oauth_2_0

OAuth2 is a protocol that lets external apps request authorization to private details in a user's GitHub account without getting their password. This is preferred over Basic Authentication because tokens can be limited to specific types of data, and can be revoked by users at any time.

## oauth_2_0

#### Request

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  404

  Unauthorized

- #### Settings

- Authorization Uri: https://github.com/login/oauth/authorize
- Access Token Uri: https://github.com/login/oauth/access_token
- Authorization Grants
  - code
- Scopes
  - user
  - user:email
  - user:follow
  - public_repo
  - repo
  - repo:status
  - delete_repo
  - notifications
  - gist

### Resources

URl: /search

#### search

URl: /search/repositories
GET

#### search repositories

GET
/search/repositories
Description
Search repositories.

#### Request

##### Query parameters

- q (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 (string )
  If not provided, results are sorted by best match.
- order (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "total_count": { "type": "integer" }, "items": { "0": { "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" } }

URl: /search/code
GET

#### search code

GET
/search/code
Description
Search code.

#### Request

##### Query parameters

- q (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 (string )
  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 (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "total_count": { "type": "integer" }, "items": { "0": { "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" } }

URl: /search/users
GET

#### search users

GET
/search/users
Description
Search users.

#### Request

##### Query parameters

- q (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 (string )
  If not provided, results are sorted by best match.
- order (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "total_count": { "type": "integer" }, "items": { "0": { "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" } }

URl: /events
GET

#### events

GET
/events
Description
List public events.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /feeds
GET

#### feeds

GET
/feeds
Description
List Feeds. GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticating user.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } }

  ###### 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" } } } } }

URl: /meta
GET

#### meta

GET
/meta
Description
This gives some information about GitHub.com, the service.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "hooks": [ "127.0.0.1/32" ], "git": [ "127.0.0.1/32" ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "hooks": { "0": { "description": "An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from.", "type": "string" } }, "type": "array", "git": { "0": { "description": "An Array of IP addresses in CIDR format specifying the Git servers at GitHub.", "type": "string" } } } }

URl: /rate_limit
GET

#### rate_limit

GET
/rate_limit
Description
Get your current rate limit status Note: Accessing this endpoint does not count against your rate limit.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "rate": { "limit": 5000, "remaining": 4999, "reset": 1372700873 } }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "rate": { "properties": { "limit": { "type": "integer" }, "remaining": { "type": "integer" }, "reset": { "type": "integer" } } } } }

URl: /issues
GET

#### issues

GET
/issues
Description
List issues. List all issues across all the authenticated user's visible repositories.

#### Request

##### Query parameters

- filter (string )
  Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state (string )
- labels (string )
  String list of comma separated Label names. Example - bug,ui,@high.
- sort (string )
- direction (string )
- 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.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "issues": { "0": { "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /notifications
GET
PUT

#### notifications

GET
/notifications
Description
List your notifications. List all notifications for the current user, grouped by repository.

#### Request

##### 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".

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

PUT
/notifications
Description
Mark as read. Marking a notification as "read" removes it from the default view on GitHub.com.

#### Request

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  205

  Marked as read.

URl: /notifications/threads/{id}
GET
PATCH

#### notifications threads {id}

GET
/notifications/threads/{id}
Description
View a single thread.

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

PATCH
/notifications/threads/{id}
Description

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

- #### Response

- ##### Http Status code
  205

  Thread marked as read.

URl: /notifications/threads/{id}/subscription
GET
PUT
DELETE

#### notifications threads {id} subscription

GET
/notifications/threads/{id}/subscription
Description
Get a Thread Subscription.

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

PUT
/notifications/threads/{id}/subscription
Description
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).

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

DELETE
/notifications/threads/{id}/subscription
Description
Delete a Thread Subscription.

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /gists
GET
POST

#### gists

GET
/gists
Description
List the authenticated user's gists or if called anonymously, this will return all public gists.
Secured by oauth_2_0

#### Request

##### Query parameters

- since (string )
  Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "gists": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

POST
/gists
Description
Create a gist.
Secured by oauth_2_0

#### Request

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "public", "1": "files", "2": "content" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } ] }

  ###### 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": { "0": { "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": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

URl: /gists/public
GET

#### gists public

GET
/gists/public
Description
List all public gists.
Secured by oauth_2_0

#### Request

##### Query parameters

- since (string )
  Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "gists": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

URl: /gists/starred
GET

#### gists starred

GET
/gists/starred
Description
List the authenticated user's starred gists.
Secured by oauth_2_0

#### Request

##### Query parameters

- since (string )
  Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned.
- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "gists": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

URl: /gists/{id}
GET
PATCH
DELETE

#### gists {id}

GET
/gists/{id}
Description
Get a single gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] }

  ###### 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": { "0": { "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": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

PATCH
/gists/{id}
Description
Edit a gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- Content-Type: application/json

- ##### Body

- ###### 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" } } } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] }

  ###### 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": { "0": { "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": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

DELETE
/gists/{id}
Description
Delete a gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  204

  Item removed.

- ##### Http Status code
  404

  Unauthorized

URl: /gists/{id}/star
GET
PUT
DELETE

#### gists {id} star

GET
/gists/{id}/star
Description
Check if a gist is starred.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:
- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Exists.

- ##### Http Status code
  404

  Unauthorized

PUT
/gists/{id}/star
Description
Star a gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:
- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Starred.

- ##### Http Status code
  404

  Unauthorized

DELETE
/gists/{id}/star
Description
Unstar a gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:
- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Item removed.

- ##### Http Status code
  404

  Unauthorized

URl: /gists/{id}/forks
POST

#### gists {id} forks

POST
/gists/{id}/forks
Description
Fork a gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:
- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Exists.

- ##### Http Status code
  404

  Unauthorized

URl: /gists/{id}/comments
GET
POST

#### gists {id} comments

GET
/gists/{id}/comments
Description
List comments on a gist.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "comments": { "0": { "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" } } }

- ##### Http Status code
  404

  Unauthorized

POST
/gists/{id}/comments
Description
Create a comment
Secured by oauth_2_0

#### Request

##### Uri Parameters

- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "body": { "type": "string" } }, "required": { "0": "body" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" }

  ###### 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
  404

  Unauthorized

URl: /gists/{id}/comments/{commentId}
GET
PATCH
DELETE

#### gists {id} comments {commentId}

GET
/gists/{id}/comments/{commentId}
Description
Get a single comment.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- commentId (integer )
  Id of the comment.
- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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
  404

  Unauthorized

PATCH
/gists/{id}/comments/{commentId}
Description
Edit a comment.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- commentId (integer )
  Id of the comment.
- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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
  404

  Unauthorized

DELETE
/gists/{id}/comments/{commentId}
Description
Delete a comment.
Secured by oauth_2_0

#### Request

##### Uri Parameters

- commentId (integer )
  Id of the comment.
- id (integer )
  Id of a thread.

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  204

  Item removed.

- ##### Http Status code
  404

  Unauthorized

URl: /orgs/{orgId}
GET
PATCH

#### orgs {orgId}

GET
/orgs/{orgId}
Description
Get an Organization.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

PATCH
/orgs/{orgId}
Description
Edit an Organization.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

URl: /orgs/{orgId}/events
GET

#### orgs {orgId} events

GET
/orgs/{orgId}/events
Description
List public events for an organization.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /orgs/{orgId}/issues
GET

#### orgs {orgId} issues

GET
/orgs/{orgId}/issues
Description
List issues. List all issues for a given organization for the authenticated user.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

##### Query parameters

- filter (string )
  Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state (string )
- labels (string )
  String list of comma separated Label names. Example - bug,ui,@high.
- sort (string )
- direction (string )
- 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.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "issues": { "0": { "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /orgs/{orgId}/members
GET

#### orgs {orgId} members

GET
/orgs/{orgId}/members
Description
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.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

- ##### Http Status code
  302

  Response if requester is not an organization member.

URl: /orgs/{orgId}/members/{userId}
DELETE

#### orgs {orgId} members {userId}

DELETE
/orgs/{orgId}/members/{userId}
Description
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.

#### Request

##### Uri Parameters

- userId (integer )
  Id of the user.
- orgId (integer )
  Id of organisation.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /orgs/{orgId}/public_members
GET

#### orgs {orgId} public_members

GET
/orgs/{orgId}/public_members
Description
Public members list. Members of an organization can choose to have their membership publicized or not.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /orgs/{orgId}/public_members/{userId}
GET
PUT
DELETE

#### orgs {orgId} public_members {userId}

GET
/orgs/{orgId}/public_members/{userId}
Description
Check public membership.

#### Request

##### Uri Parameters

- userId (integer )
  Id of the user.
- orgId (integer )
  Id of organisation.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  User is a public member.

- ##### Http Status code
  404

  User is not a public member.

PUT
/orgs/{orgId}/public_members/{userId}
Description
Publicize a user's membership.

#### Request

##### Uri Parameters

- userId (integer )
  Id of the user.
- orgId (integer )
  Id of organisation.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Publicized.

DELETE
/orgs/{orgId}/public_members/{userId}
Description
Conceal a user's membership.

#### Request

##### Uri Parameters

- userId (integer )
  Id of the user.
- orgId (integer )
  Id of organisation.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Concealed.

URl: /orgs/{orgId}/teams
GET
POST

#### orgs {orgId} teams

GET
/orgs/{orgId}/teams
Description
List teams.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/teams/1", "name": "Owners", "id": 1 } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "id": { "type": "integer" } }, "type": "object" } } }

POST
/orgs/{orgId}/teams
Description
Create team. In order to create a team, the authenticated user must be an owner of orgId.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "name": { "type": "string" }, "repo_names": { "0": { "type": "string" } }, "type": "array", "permission": { "enum": { "0": "pull", "1": "push", "2": "admin" } } }, "required": { "0": "name" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/teams/1", "name": "Owners", "id": 1 } ]

  ###### 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" } } }

URl: /orgs/{orgId}/repos
GET
POST

#### orgs {orgId} repos

GET
/orgs/{orgId}/repos
Description
List repositories for the specified org.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

##### Query parameters

- type (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "_empty_": { "0": { "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" } } } }

POST
/orgs/{orgId}/repos
Description
Create a new repository for the authenticated user. OAuth users must supply repo scope.

#### Request

##### Uri Parameters

- orgId (integer )
  Id of organisation.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "_empty_": { "0": { "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" } } } }

URl: /teams/{teamsId}
GET
PATCH
DELETE

#### teams {teamsId}

GET
/teams/{teamsId}
Description
Get team.

#### Request

##### Uri Parameters

- teamsId (integer )
  Id of a team.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/teams/1", "name": "Owners", "id": 1 } ]

  ###### 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" } } }

PATCH
/teams/{teamsId}
Description
Edit team. In order to edit a team, the authenticated user must be an owner of the org that the team is associated with.

#### Request

##### Uri Parameters

- teamsId (integer )
  Id of a team.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "name": { "type": "string" }, "permission": { "values": { "0": "pull", "1": "push", "2": "admin" } } }, "required": { "0": "name" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/teams/1", "name": "Owners", "id": 1 } ]

  ###### 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" } } }

DELETE
/teams/{teamsId}
Description
Delete team. In order to delete a team, the authenticated user must be an owner of the org that the team is associated with.

#### Request

##### Uri Parameters

- teamsId (integer )
  Id of a team.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /teams/{teamsId}/members
GET

#### teams {teamsId} members

GET
/teams/{teamsId}/members
Description
List team members. In order to list members in a team, the authenticated user must be a member of the team.

#### Request

##### Uri Parameters

- teamsId (integer )
  Id of a team.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /teams/{teamsId}/members/{userId}
GET
PUT
DELETE

#### teams {teamsId} members {userId}

GET
/teams/{teamsId}/members/{userId}
Description
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.

#### Request

##### Uri Parameters

- userId (integer )
  Id of a member.
- teamsId (integer )
  Id of a team.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  User is a member.

- ##### Http Status code
  404

  User is not a member.

PUT
/teams/{teamsId}/members/{userId}
Description
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.

#### Request

##### Uri Parameters

- userId (integer )
  Id of a member.
- teamsId (integer )
  Id of a team.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Team member added.

- ##### Http Status code
  422

  If you attempt to add an organization to a team, you will get this.
- Content-Type: application/json

- ###### Example

  { "message": "Validation Failed", "errors": [ { "code": "org", "field": "user", "resource": "TeamMember" } ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "message": { "type": "string" }, "errors": { "0": { "properties": { "code": { "type": "string" }, "field": { "type": "string" }, "resource": { "type": "string" } }, "type": "object" } }, "type": "object" } }

DELETE
/teams/{teamsId}/members/{userId}
Description
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.

#### Request

##### Uri Parameters

- userId (integer )
  Id of a member.
- teamsId (integer )
  Id of a team.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Team member removed.

URl: /repositories
GET

#### repositories

GET
/repositories
Description
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.
Secured by null
Secured by oauth_2_0

#### Request

##### Query parameters

- since (string )
  The integer ID of the last Repository that you've seen.
- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

- ##### Http Status code
  404

  Unauthorized

URl: /repos/{ownerId}/{repoId}
GET
PATCH
DELETE

#### repos {ownerId} {repoId}

GET
/repos/{ownerId}/{repoId}
Description
Get repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### 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": { "type": "string" }, "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" }, "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" } } }

PATCH
/repos/{ownerId}/{repoId}
Description
Edit repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### 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": { "type": "string" }, "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" }, "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" } } }

DELETE
/repos/{ownerId}/{repoId}
Description
Delete a Repository. Deleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/events
GET

#### repos {ownerId} {repoId} events

GET
/repos/{ownerId}/{repoId}/events
Description
Get list of repository events.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/languages
GET

#### repos {ownerId} {repoId} languages

GET
/repos/{ownerId}/{repoId}/languages
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "C": 78769, "Python": 7769 }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "language": { "type": "string" }, "count": { "type": "string" } } }

URl: /repos/{ownerId}/{repoId}/git

#### repos {ownerId} {repoId} git

URl: /repos/{ownerId}/{repoId}/git/blobs
POST

#### repos {ownerId} {repoId} git blobs

POST
/repos/{ownerId}/{repoId}/git/blobs
Description
Create a Blob.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "content": { "type": "string" }, "encoding": { "enum": { "0": "utf-8", "1": "base64" } }, "sha": { "type": "string" }, "size": { "type": "integer" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  { "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "sha": { "type": "string" } } }

URl: /repos/{ownerId}/{repoId}/git/blobs/{shaCode}
GET

#### repos {ownerId} {repoId} git blobs {shaCode}

GET
/repos/{ownerId}/{repoId}/git/blobs/{shaCode}
Description
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.

#### Request

##### Uri Parameters

- shaCode (string )
  SHA-1 code.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "content": "Content of the blob", "encoding": "utf-8", "sha": "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15", "size": 100 }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "content": { "type": "string" }, "encoding": { "enum": { "0": "utf-8", "1": "base64" } }, "sha": { "type": "string" }, "size": { "type": "integer" } } }

URl: /repos/{ownerId}/{repoId}/git/commits
POST

#### repos {ownerId} {repoId} git commits

POST
/repos/{ownerId}/{repoId}/git/commits
Description
Create a Commit.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": { "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": { "0": "message", "1": "tree", "2": "parents" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" }

  ###### Schema

  { "_empty_": "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": { "0": { "type": "string" } }, "tree": { "type": "string" } } }

URl: /repos/{ownerId}/{repoId}/git/commits/{shaCode}
GET

#### repos {ownerId} {repoId} git commits {shaCode}

GET
/repos/{ownerId}/{repoId}/git/commits/{shaCode}
Description
Get a Commit.

#### Request

##### Uri Parameters

- shaCode (string )
  SHA-1 code.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] }

  ###### 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": { "0": { "properties": { "url": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" } }, "type": "array" } }

URl: /repos/{ownerId}/{repoId}/git/refs
GET
POST

#### repos {ownerId} {repoId} git refs

GET
/repos/{ownerId}/{repoId}/git/refs
Description
Get all References

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "references": { "0": { "properties": { "ref": { "type": "string" }, "url": { "type": "string" }, "object": { "properties": { "type": { "type": "string" }, "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" } } }

POST
/repos/{ownerId}/{repoId}/git/refs
Description
Create a Reference

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "ref", "1": "sha" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/git/refs/{heads}
GET

#### repos {ownerId} {repoId} git refs {heads}

GET
/repos/{ownerId}/{repoId}/git/refs/{heads}
Description
Get list of subdirectories.

#### Request

##### Uri Parameters

- heads (string )
  Subfolder of path to the branch.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "name": { "type": "string" }, "commit": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "zipball_url": { "type": "string" }, "tarball_url": { "type": "string" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} git refs {heads} {branch}

GET
/repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
Description
Get a Reference.

#### Request

##### Uri Parameters

- branch (string )
  Path to the branch.
- heads (string )
  Subfolder of path to the branch.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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" } } }

PATCH
/repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
Description
Update a Reference

#### Request

##### Uri Parameters

- branch (string )
  Path to the branch.
- heads (string )
  Subfolder of path to the branch.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "sha", "1": "force" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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" } } }

DELETE
/repos/{ownerId}/{repoId}/git/refs/{heads}/{branch}
Description
Delete a Reference.

#### Request

##### Uri Parameters

- branch (string )
  Path to the branch.
- heads (string )
  Subfolder of path to the branch.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/git/tags
POST

#### repos {ownerId} {repoId} git tags

POST
/repos/{ownerId}/{repoId}/git/tags
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } }

  ###### 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": { "0": "tag", "1": "message", "2": "object", "3": "type", "4": "tagger" } }

URl: /repos/{ownerId}/{repoId}/git/tags/{shaCode}
GET

#### repos {ownerId} {repoId} git tags {shaCode}

GET
/repos/{ownerId}/{repoId}/git/tags/{shaCode}
Description
Get a Tag.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/git/trees
POST

#### repos {ownerId} {repoId} git trees

POST
/repos/{ownerId}/{repoId}/git/trees
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "sha": { "type": "string" }, "url": { "type": "string" }, "tree": { "0": { "path": { "type": "string" }, "mode": { "type": "string" }, "type": { "type": "string" }, "size": { "type": "integer" }, "sha": { "type": "string" }, "url": { "type": "string" } } }, "type": "array" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "base_tree": { "type": "string" }, "tree": { "0": { "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": { "0": "100644", "1": "100755", "2": "040000", "3": "160000", "4": "120000" } }, "type": { "type": "string", "enum": { "0": "blob", "1": "tree", "2": "commit" } }, "oneOf": { "0": { "sha": { "description": "SHA1 checksum ID of the object in the tree.", "type": "string" } }, "1": { "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": { "0": "tree" } }

URl: /repos/{ownerId}/{repoId}/git/trees/{shaCode}
GET

#### repos {ownerId} {repoId} git trees {shaCode}

GET
/repos/{ownerId}/{repoId}/git/trees/{shaCode}
Description
Get a Tree.

#### Request

##### Uri Parameters

- shaCode (integer )
  Id of the owner.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- recursive (integer )
  Get a Tree Recursively. (0 or 1)

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "sha": { "type": "string" }, "url": { "type": "string" }, "tree": { "0": { "path": { "type": "string" }, "mode": { "type": "string" }, "type": { "type": "string" }, "size": { "type": "integer" }, "sha": { "type": "string" }, "url": { "type": "string" } } }, "type": "array" } }

URl: /repos/{ownerId}/{repoId}/readme
GET

#### repos {ownerId} {repoId} readme

GET
/repos/{ownerId}/{repoId}/readme
Description
Get the README. This method returns the preferred README for a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- ref (string )
  The String name of the Commit/Branch/Tag. Defaults to master.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/stargazers
GET

#### repos {ownerId} {repoId} stargazers

GET
/repos/{ownerId}/{repoId}/stargazers
Description
List Stargazers.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/subscribers
GET

#### repos {ownerId} {repoId} subscribers

GET
/repos/{ownerId}/{repoId}/subscribers
Description
List watchers.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/tags
GET

#### repos {ownerId} {repoId} tags

GET
/repos/{ownerId}/{repoId}/tags
Description
Get list of tags.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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": { "0": "tag", "1": "message", "2": "object", "3": "type", "4": "tagger" } }

URl: /repos/{ownerId}/{repoId}/teams
GET

#### repos {ownerId} {repoId} teams

GET
/repos/{ownerId}/{repoId}/teams
Description
Get list of teams

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/teams/1", "name": "Owners", "id": 1 } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "id": { "type": "integer" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/watchers
GET

#### repos {ownerId} {repoId} watchers

GET
/repos/{ownerId}/{repoId}/watchers
Description
List Stargazers. New implementation.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/contributors
GET

#### repos {ownerId} {repoId} contributors

GET
/repos/{ownerId}/{repoId}/contributors
Description
Get list of contributors.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- anon (string )
  Set to 1 or true to include anonymous contributors in results.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" }, "contributions": { "type": "integer" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/branches
GET

#### repos {ownerId} {repoId} branches

GET
/repos/{ownerId}/{repoId}/branches
Description
Get list of branches

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "name": "master", "commit": { "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", "url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "name": { "type": "string" }, "commit": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/branches/{branchId}
GET

#### repos {ownerId} {repoId} branches {branchId}

GET
/repos/{ownerId}/{repoId}/branches/{branchId}
Description
Get Branch

#### Request

##### Uri Parameters

- branchId (integer )
  Id of the branch.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/issues
GET
POST

#### repos {ownerId} {repoId} issues

GET
/repos/{ownerId}/{repoId}/issues
Description
List issues for a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- filter (string )
  Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state (string )
- labels (string )
  String list of comma separated Label names. Example - bug,ui,@high.
- sort (string )
- direction (string )
- 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.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "issues": { "0": { "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

POST
/repos/{ownerId}/{repoId}/issues
Description
Create an issue. Any user with pull access to a repository can create an issue.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": { "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": { "0": "title" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /repos/{ownerId}/{repoId}/issues/events
GET

#### repos {ownerId} {repoId} issues events

GET
/repos/{ownerId}/{repoId}/issues/events
Description
List issue events for a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/issues/events/{eventId}
GET

#### repos {ownerId} {repoId} issues events {eventId}

GET
/repos/{ownerId}/{repoId}/issues/events/{eventId}
Description
Get a single event.

#### Request

##### Uri Parameters

- eventId (integer )
  Id of the event.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } }

URl: /repos/{ownerId}/{repoId}/issues/{number}
GET
PATCH

#### repos {ownerId} {repoId} issues {number}

GET
/repos/{ownerId}/{repoId}/issues/{number}
Description
Get a single issue

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

PATCH
/repos/{ownerId}/{repoId}/issues/{number}
Description
Edit an issue. Issue owners and users with push access can edit an issue.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /repos/{ownerId}/{repoId}/issues/{number}/comments
GET
POST

#### repos {ownerId} {repoId} issues {number} comments

GET
/repos/{ownerId}/{repoId}/issues/{number}/comments
Description
List comments on an issue.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

POST
/repos/{ownerId}/{repoId}/issues/{number}/comments
Description
Create a comment.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "body": { "type": "string" } }, "required": { "0": "body" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/issues/{number}/events
GET

#### repos {ownerId} {repoId} issues {number} events

GET
/repos/{ownerId}/{repoId}/issues/{number}/events
Description
List issue events for a repository.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/issues/{number}/events/{eventId}
GET

#### repos {ownerId} {repoId} issues {number} events {eventId}

GET
/repos/{ownerId}/{repoId}/issues/{number}/events/{eventId}
Description
Get a single event.

#### Request

##### Uri Parameters

- eventId (integer )
  Id of the event.
- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } }

URl: /repos/{ownerId}/{repoId}/issues/{number}/labels
GET
POST
PUT
DELETE

#### repos {ownerId} {repoId} issues {number} labels

GET
/repos/{ownerId}/{repoId}/issues/{number}/labels
Description
List labels on an issue.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string", "maxLength": 6, "minLength": 6 } }, "type": "object" } } }

POST
/repos/{ownerId}/{repoId}/issues/{number}/labels
Description
Add labels to an issue.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name", "1": "color" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" }

  ###### 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 } } }

PUT
/repos/{ownerId}/{repoId}/issues/{number}/labels
Description
Replace all labels for an issue. Sending an empty array ([]) will remove all Labels from the Issue.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name", "1": "color" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" }

  ###### 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 } } }

DELETE
/repos/{ownerId}/{repoId}/issues/{number}/labels
Description
Remove all labels from an issue.

#### Request

##### Uri Parameters

- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

URl: /repos/{ownerId}/{repoId}/issues/{number}/labels/{name}
DELETE

#### repos {ownerId} {repoId} issues {number} labels {name}

DELETE
/repos/{ownerId}/{repoId}/issues/{number}/labels/{name}
Description
Remove a label from an issue.

#### Request

##### Uri Parameters

- name (string )
  Name of the label.
- number (integer )
  Id of the issue.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/issues/comments
GET

#### repos {ownerId} {repoId} issues comments

GET
/repos/{ownerId}/{repoId}/issues/comments
Description
List comments in a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- sort (string )
- direction (string )
  Ignored without sort parameter.
- since (string )
  Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/issues/comments/{commentId}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} issues comments {commentId}

GET
/repos/{ownerId}/{repoId}/issues/comments/{commentId}
Description
Get a single comment.

#### Request

##### Uri Parameters

- commentId (integer )
  Id of the comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

PATCH
/repos/{ownerId}/{repoId}/issues/comments/{commentId}
Description
Edit a comment.

#### Request

##### Uri Parameters

- commentId (integer )
  Id of the comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "body": { "type": "string" } }, "required": { "0": "body" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

DELETE
/repos/{ownerId}/{repoId}/issues/comments/{commentId}
Description
Delete a comment.

#### Request

##### Uri Parameters

- commentId (integer )
  Id of the comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/notifications
GET
PUT

#### repos {ownerId} {repoId} notifications

GET
/repos/{ownerId}/{repoId}/notifications
Description
List your notifications in a repository List all notifications for the current user.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### 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".

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

PUT
/repos/{ownerId}/{repoId}/notifications
Description
Mark notifications as read in a repository. Marking all notifications in a repository as "read" removes them from the default view on GitHub.com.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  205

  Marked as read.

URl: /repos/{ownerId}/{repoId}/subscription
GET
PUT
DELETE

#### repos {ownerId} {repoId} subscription

GET
/repos/{ownerId}/{repoId}/subscription
Description
Get a Repository Subscription.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

PUT
/repos/{ownerId}/{repoId}/subscription
Description
Set a Repository Subscription

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "subscribed", "1": "ignored" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

DELETE
/repos/{ownerId}/{repoId}/subscription
Description
Delete a Repository Subscription.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

URl: /repos/{ownerId}/{repoId}/assignees
GET

#### repos {ownerId} {repoId} assignees

GET
/repos/{ownerId}/{repoId}/assignees
Description
List assignees. This call lists all the available assignees (owner collaborators) to which issues may be assigned.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "integer" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/assignees/{assignee}
GET

#### repos {ownerId} {repoId} assignees {assignee}

GET
/repos/{ownerId}/{repoId}/assignees/{assignee}
Description
Check assignee. You may also check to see if a particular user is an assignee for a repository.

#### Request

##### Uri Parameters

- assignee (string )
  Login of the assignee.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  User is an assignee.

- ##### Http Status code
  404

  User isn't an assignee.

URl: /repos/{ownerId}/{repoId}/labels
GET
POST

#### repos {ownerId} {repoId} labels

GET
/repos/{ownerId}/{repoId}/labels
Description
List all labels for this repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string", "maxLength": 6, "minLength": 6 } }, "type": "object" } } }

POST
/repos/{ownerId}/{repoId}/labels
Description
Create a label.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name", "1": "color" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" }

  ###### 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 } } }

URl: /repos/{ownerId}/{repoId}/labels/{name}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} labels {name}

GET
/repos/{ownerId}/{repoId}/labels/{name}
Description
Get a single label.

#### Request

##### Uri Parameters

- name (string )
  Name of the label.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" }

  ###### 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 } } }

PATCH
/repos/{ownerId}/{repoId}/labels/{name}
Description
Update a label.

#### Request

##### Uri Parameters

- name (string )
  Name of the label.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name", "1": "color" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" }

  ###### 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 } } }

DELETE
/repos/{ownerId}/{repoId}/labels/{name}
Description
Delete a label.

#### Request

##### Uri Parameters

- name (string )
  Name of the label.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/milestones
GET
POST

#### repos {ownerId} {repoId} milestones

GET
/repos/{ownerId}/{repoId}/milestones
Description
List milestones for a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- state (string )
- sort (string )
- direction (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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" } } }

POST
/repos/{ownerId}/{repoId}/milestones
Description
Create a milestone.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "title": { "type": "string" }, "state": { "enum": { "0": "open", "1": "closed" } }, "description": { "type": "string" }, "due_on": { "description": "ISO 8601 time.", "type": "string" } }, "required": { "0": "title" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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 }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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" } } }

URl: /repos/{ownerId}/{repoId}/milestones/{number}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} milestones {number}

GET
/repos/{ownerId}/{repoId}/milestones/{number}
Description
Get a single milestone.

#### Request

##### Uri Parameters

- number (integer )
  Id of the milestone.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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" } } }

PATCH
/repos/{ownerId}/{repoId}/milestones/{number}
Description
Update a milestone.

#### Request

##### Uri Parameters

- number (integer )
  Id of the milestone.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "number": { "type": "integer" }, "title": { "type": "string" }, "state": { "enum": { "0": "open", "1": "closed" } }, "description": { "type": "string" }, "due_on": { "description": "ISO 8601 time.", "type": "string" } }, "required": { "0": "number" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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" } } }

DELETE
/repos/{ownerId}/{repoId}/milestones/{number}
Description
Delete a milestone.

#### Request

##### Uri Parameters

- number (integer )
  Id of the milestone.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/milestones/{number}/labels
GET

#### repos {ownerId} {repoId} milestones {number} labels

GET
/repos/{ownerId}/{repoId}/milestones/{number}/labels
Description
Get labels for every issue in a milestone.

#### Request

##### Uri Parameters

- number (integer )
  Id of the milestone.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug", "name": "bug", "color": "f29513" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string", "maxLength": 6, "minLength": 6 } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/pulls
GET
POST

#### repos {ownerId} {repoId} pulls

GET
/repos/{ownerId}/{repoId}/pulls
Description
List pull requests.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- state (string )
  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.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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": { "0": "open", "1": "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" } } }

POST
/repos/{ownerId}/{repoId}/pulls
Description
Create a pull request.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /repos/{ownerId}/{repoId}/pulls/{number}
GET
PATCH

#### repos {ownerId} {repoId} pulls {number}

GET
/repos/{ownerId}/{repoId}/pulls/{number}
Description
Get a single pull request.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### 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": { "0": "open", "1": "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" } } }

PATCH
/repos/{ownerId}/{repoId}/pulls/{number}
Description
Update a pull request.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "title": { "type": "string" }, "body": { "type": "string" }, "state": { "enum": { "0": "open", "1": "closed" } } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 }

  ###### 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": { "type": "string" }, "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" }, "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" } } }

URl: /repos/{ownerId}/{repoId}/pulls/{number}/files
GET

#### repos {ownerId} {repoId} pulls {number} files

GET
/repos/{ownerId}/{repoId}/pulls/{number}/files
Description
List pull requests files.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /repos/{ownerId}/{repoId}/pulls/{number}/commits
GET

#### repos {ownerId} {repoId} pulls {number} commits

GET
/repos/{ownerId}/{repoId}/pulls/{number}/commits
Description
List commits on a pull request.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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": { "0": { "properties": { "url": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" } }, "type": "array" }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/pulls/{number}/merge
GET
PUT

#### repos {ownerId} {repoId} pulls {number} merge

GET
/repos/{ownerId}/{repoId}/pulls/{number}/merge
Description
Get if a pull request has been merged.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Pull request has been merged.

- ##### Http Status code
  404

  Pull request has not been merged.

PUT
/repos/{ownerId}/{repoId}/pulls/{number}/merge
Description
Merge a pull request (Merge Button™)

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  200

  Response if merge was successful.
- Content-Type: application/json

- ###### Example

  { "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", "merged": true, "message": "Pull Request successfully merged" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "sha": { "type": "string" }, "merged": { "type": "boolean" }, "message": { "type": "string" } } }

- ##### Http Status code
  405

  Response if merge cannot be performed.
- Content-Type: application/json

- ###### Example

  { "sha": null, "merged": false, "message": "Failure reason" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "sha": { "type": "string" }, "merged": { "type": "boolean" }, "message": { "type": "string" } } }

URl: /repos/{ownerId}/{repoId}/pulls/{number}/comments
GET
POST

#### repos {ownerId} {repoId} pulls {number} comments

GET
/repos/{ownerId}/{repoId}/pulls/{number}/comments
Description
List comments on a pull request.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } }

  ###### 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" } } }

POST
/repos/{ownerId}/{repoId}/pulls/{number}/comments
Description
Create a comment. 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.

#### Request

##### Uri Parameters

- number (integer )
  Id of a pull.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "body", "1": "commit_id", "2": "path", "3": "position" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } } }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/pulls/comments
GET

#### repos {ownerId} {repoId} pulls comments

GET
/repos/{ownerId}/{repoId}/pulls/comments
Description
List comments in a repository. By default, Review Comments are ordered by ascending ID.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- sort (string )
- direction (string )
  Ignored without 'sort' parameter.
- since (string )
  Timestamp in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/pulls/comments/{number}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} pulls comments {number}

GET
/repos/{ownerId}/{repoId}/pulls/comments/{number}
Description
Get a single comment.

#### Request

##### Uri Parameters

- number (integer )
  Id of the comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } }

  ###### 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" } } }

PATCH
/repos/{ownerId}/{repoId}/pulls/comments/{number}
Description
Edit a comment.

#### Request

##### Uri Parameters

- number (integer )
  Id of the comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "body": { "type": "string" } }, "required": { "0": "body" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } }

  ###### 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" } } }

DELETE
/repos/{ownerId}/{repoId}/pulls/comments/{number}
Description
Delete a comment.

#### Request

##### Uri Parameters

- number (integer )
  Id of the comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/collaborators
GET

#### repos {ownerId} {repoId} collaborators

GET
/repos/{ownerId}/{repoId}/collaborators
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/collaborators/{user}
GET
PUT
DELETE

#### repos {ownerId} {repoId} collaborators {user}

GET
/repos/{ownerId}/{repoId}/collaborators/{user}
Description
Check if user is a collaborator

#### Request

##### Uri Parameters

- user (string )
  Login of the user.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  User is a collaborator.

- ##### Http Status code
  404

  User is not a collaborator.

PUT
/repos/{ownerId}/{repoId}/collaborators/{user}
Description
Add collaborator.

#### Request

##### Uri Parameters

- user (string )
  Login of the user.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Collaborator added.

DELETE
/repos/{ownerId}/{repoId}/collaborators/{user}
Description
Remove collaborator.

#### Request

##### Uri Parameters

- user (string )
  Login of the user.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Collaborator removed.

URl: /repos/{ownerId}/{repoId}/comments
GET

#### repos {ownerId} {repoId} comments

GET
/repos/{ownerId}/{repoId}/comments
Description
List commit comments for a repository. Comments are ordered by ascending ID.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/comments/{commentId}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} comments {commentId}

GET
/repos/{ownerId}/{repoId}/comments/{commentId}
Description
Get a single commit comment.

#### Request

##### Uri Parameters

- commentId (integer )
  Id of a comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

PATCH
/repos/{ownerId}/{repoId}/comments/{commentId}
Description
Update a commit comment.

#### Request

##### Uri Parameters

- commentId (integer )
  Id of a comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "body": { "type": "string" } }, "required": { "0": "body" } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

DELETE
/repos/{ownerId}/{repoId}/comments/{commentId}
Description
Delete a commit comment

#### Request

##### Uri Parameters

- commentId (integer )
  Id of a comment.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/commits
GET

#### repos {ownerId} {repoId} commits

GET
/repos/{ownerId}/{repoId}/commits
Description
List commits on a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### 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.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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": { "0": { "properties": { "url": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" } }, "type": "array" }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/commits/{shaCode}
GET

#### repos {ownerId} {repoId} commits {shaCode}

GET
/repos/{ownerId}/{repoId}/commits/{shaCode}
Description
Get a single commit.

#### Request

##### Uri Parameters

- shaCode (string )
  SHA-1 code of the commit.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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....." } ] }

  ###### 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": { "0": { "properties": { "url": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" } }, "type": "array" } }

URl: /repos/{ownerId}/{repoId}/commits/{shaCode}/comments
GET
POST

#### repos {ownerId} {repoId} commits {shaCode} comments

GET
/repos/{ownerId}/{repoId}/commits/{shaCode}/comments
Description
List comments for a single commitList comments for a single commit.

#### Request

##### Uri Parameters

- shaCode (string )
  SHA-1 code of the commit.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

POST
/repos/{ownerId}/{repoId}/commits/{shaCode}/comments
Description
Create a commit comment.

#### Request

##### Uri Parameters

- shaCode (string )
  SHA-1 code of the commit.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "sha", "1": "body" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/contents/{path}
GET
PUT
DELETE

#### repos {ownerId} {repoId} contents {path}

GET
/repos/{ownerId}/{repoId}/contents/{path}
Description
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/"

#### Request

##### Uri Parameters

- path (string )
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- path (string )
  The content path.
- ref (string )
  The String name of the Commit/Branch/Tag. Defaults to 'master'.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } }

  ###### 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" } } }

PUT
/repos/{ownerId}/{repoId}/contents/{path}
Description
Create a file.

#### Request

##### Uri Parameters

- path (string )
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": { "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" } } }, "type": "object" } } }

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] } }

  ###### 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": { "0": "path", "1": "message", "2": "content", "3": "branch" } }

DELETE
/repos/{ownerId}/{repoId}/contents/{path}
Description
Delete a file. This method deletes a file in a repository.

#### Request

##### Uri Parameters

- path (string )
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "path", "1": "message", "2": "sha" } }

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ] } }

  ###### 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": { "0": { "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "sha": { "type": "string" } }, "type": "object" } } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/{archive_format}/{path}
GET

#### repos {ownerId} {repoId} {archive_format} {path}

GET
/repos/{ownerId}/{repoId}/{archive_format}/{path}
Description
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.

#### Request

##### Uri Parameters

- archive_format (string )
- path (string )
  Valid Git reference, defaults to 'master'.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  302

  Found.

URl: /repos/{ownerId}/{repoId}/downloads
GET
POST

#### repos {ownerId} {repoId} downloads

GET
/repos/{ownerId}/{repoId}/downloads
Description
List downloads for a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

POST
/repos/{ownerId}/{repoId}/downloads
Description
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

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name", "1": "size" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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/" }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/downloads/{downloadId}
GET
DELETE

#### repos {ownerId} {repoId} downloads {downloadId}

GET
/repos/{ownerId}/{repoId}/downloads/{downloadId}
Description
Get a single download.

#### Request

##### Uri Parameters

- downloadId (integer )
  Id of the download.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

DELETE
/repos/{ownerId}/{repoId}/downloads/{downloadId}
Description
Delete a download.

#### Request

##### Uri Parameters

- downloadId (integer )
  Id of the download.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/forks
GET
POST

#### repos {ownerId} {repoId} forks

GET
/repos/{ownerId}/{repoId}/forks
Description
List forks.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Query parameters

- sort (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

POST
/repos/{ownerId}/{repoId}/forks
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

URl: /repos/{ownerId}/{repoId}/keys
GET
POST

#### repos {ownerId} {repoId} keys

GET
/repos/{ownerId}/{repoId}/keys
Description
Get list of keys.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } }, "type": "object" } } }

POST
/repos/{ownerId}/{repoId}/keys
Description
Create a key.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "title": { "type": "string" }, "key": { "type": "string" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } } }

URl: /repos/{ownerId}/{repoId}/keys/{keyId}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} keys {keyId}

GET
/repos/{ownerId}/{repoId}/keys/{keyId}
Description
Get a key

#### Request

##### Uri Parameters

- keyId (integer )
  Id of a key.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } } }

PATCH
/repos/{ownerId}/{repoId}/keys/{keyId}
Description
Edit a key.

#### Request

##### Uri Parameters

- keyId (integer )
  Id of a key.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "title": { "type": "string" }, "key": { "type": "string" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } } }

DELETE
/repos/{ownerId}/{repoId}/keys/{keyId}
Description
Delete a key.

#### Request

##### Uri Parameters

- keyId (integer )
  Id of a key.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/hooks
GET
POST

#### repos {ownerId} {repoId} hooks

GET
/repos/{ownerId}/{repoId}/hooks
Description
Get list of hooks.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ]

  ###### 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": { "0": { "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "type": "array", "active": { "type": "boolean" }, "config": { "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "type": "object" }, "id": { "type": "integer" } } }

POST
/repos/{ownerId}/{repoId}/hooks
Description
Create a hook.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": { "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "type": "array", "add_events": { "0": { "description": "Determines a list of events to be added to the list of events that the Hook triggers for.", "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "remove_events": { "0": { "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.", "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "active": { "description": "Determines whether the hook is actually triggered on pushes.", "type": "boolean" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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 } ]

  ###### 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": { "0": { "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "type": "array", "active": { "type": "boolean" }, "config": { "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "type": "object" }, "id": { "type": "integer" } } }

URl: /repos/{ownerId}/{repoId}/hooks/{hookId}
GET
PATCH
DELETE

#### repos {ownerId} {repoId} hooks {hookId}

GET
/repos/{ownerId}/{repoId}/hooks/{hookId}
Description
Get single hook.

#### Request

##### Uri Parameters

- hookId (integer )
  Id of the hook.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ]

  ###### 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": { "0": { "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "type": "array", "active": { "type": "boolean" }, "config": { "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "type": "object" }, "id": { "type": "integer" } } }

PATCH
/repos/{ownerId}/{repoId}/hooks/{hookId}
Description
Edit a hook.

#### Request

##### Uri Parameters

- hookId (integer )
  Id of the hook.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": { "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "type": "array", "add_events": { "0": { "description": "Determines a list of events to be added to the list of events that the Hook triggers for.", "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "remove_events": { "0": { "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.", "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "active": { "description": "Determines whether the hook is actually triggered on pushes.", "type": "boolean" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ]

  ###### 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": { "0": { "enum": { "0": "push", "1": "issues", "2": "issue_comment", "3": "commit_comment", "4": "pull_request", "5": "pull_request_review_comment", "6": "gollum", "7": "watch", "8": "download", "9": "fork", "10": "fork_apply", "11": "member", "12": "public", "13": "team_add", "14": "status" } } }, "type": "array", "active": { "type": "boolean" }, "config": { "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "type": "object" }, "id": { "type": "integer" } } }

DELETE
/repos/{ownerId}/{repoId}/hooks/{hookId}
Description
Delete a hook.

#### Request

##### Uri Parameters

- hookId (integer )
  Id of the hook.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /repos/{ownerId}/{repoId}/hooks/{hookId}/tests
POST

#### repos {ownerId} {repoId} hooks {hookId} tests

POST
/repos/{ownerId}/{repoId}/hooks/{hookId}/tests
Description
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

#### Request

##### Uri Parameters

- hookId (integer )
  Id of the hook.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Hook is triggered.

URl: /repos/{ownerId}/{repoId}/merges
POST

#### repos {ownerId} {repoId} merges

POST
/repos/{ownerId}/{repoId}/merges
Description
Perform a merge.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "base", "1": "head" } }

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  201

  Successful Response (The resulting merge commit)
- Content-Type: application/json

- ###### Example

  { "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", "merged": true, "message": "Pull Request successfully merged" }

  ###### 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": { "0": { "properties": { "sha": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } }, "type": "array" } }

- ##### Http Status code
  204

  No-op response (base already contains the head, nothing to merge)

- ##### Http Status code
  409

  Merge conflict response.
- Content-Type: application/json

- ###### Example

  { "message": "Merge Conflict" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "message": { "description": "Error message", "type": "string" } } }

- ##### Http Status code
  404

  Missing base response or missing head response
- Content-Type: application/json

- ###### Example

  { "message": "Base does not exist" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "message": { "description": "Error message", "type": "string" } } }

URl: /repos/{ownerId}/{repoId}/statuses/{ref}
GET
POST

#### repos {ownerId} {repoId} statuses {ref}

GET
/repos/{ownerId}/{repoId}/statuses/{ref}
Description
List Statuses for a specific Ref.

#### Request

##### Uri Parameters

- ref (string )
  Ref to list the statuses from. It can be a SHA, a branch name, or a tag name.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

POST
/repos/{ownerId}/{repoId}/statuses/{ref}
Description
Create a Status.

#### Request

##### Uri Parameters

- ref (string )
  Ref to list the statuses from. It can be a SHA, a branch name, or a tag name.
- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "state": { "enum": { "0": "pending", "1": "success", "2": "error", "3": "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" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/stats

#### repos {ownerId} {repoId} stats

URl: /repos/{ownerId}/{repoId}/stats/contributors
GET

#### repos {ownerId} {repoId} stats contributors

GET
/repos/{ownerId}/{repoId}/stats/contributors
Description
Get contributors list with additions, deletions, and commit counts.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } ] } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "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": { "0": { "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" } } }

URl: /repos/{ownerId}/{repoId}/stats/commit_activity
GET

#### repos {ownerId} {repoId} stats commit_activity

GET
/repos/{ownerId}/{repoId}/stats/commit_activity
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "days": [ 0, 3, 26, 20, 39, 1, 0 ], "total": 89, "week": 1336280400 } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "days": { "0": { "type": "integer" } }, "type": "array", "total": { "type": "integer" }, "week": { "type": "integer" } }, "type": "object" } } }

URl: /repos/{ownerId}/{repoId}/stats/code_frequency
GET

#### repos {ownerId} {repoId} stats code_frequency

GET
/repos/{ownerId}/{repoId}/stats/code_frequency
Description
Get the number of additions and deletions per week. Returns a weekly aggregate of the number of additions and deletions pushed to a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ [ 1302998400, 1124, -435 ] ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "type": "integer" } } }

URl: /repos/{ownerId}/{repoId}/stats/participation
GET

#### repos {ownerId} {repoId} stats participation

GET
/repos/{ownerId}/{repoId}/stats/participation
Description
Get the weekly commit count for the repo owner and everyone else.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 ] }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "all": { "0": { "type": "integer" } }, "type": "array", "owner": { "0": { "type": "integer" } } } }

URl: /repos/{ownerId}/{repoId}/stats/punch_card
GET

#### repos {ownerId} {repoId} stats punch_card

GET
/repos/{ownerId}/{repoId}/stats/punch_card
Description
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.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ [ 0, 0, 5 ], [ 0, 1, 43 ], [ 0, 2, 21 ] ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "_empty_": { "0": { "type": "integer" } } } } }

URl: /user
GET
PATCH

#### user

GET
/user
Description
Get the authenticated user.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } }

  ###### 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" } } }

PATCH
/user
Description
Update the authenticated user.

#### Request

- Content-Type: application/json

- ##### Body

- ###### 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" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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 } }

  ###### 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" } } }

URl: /user/orgs
GET

#### user orgs

GET
/user/orgs
Description
List public and private organizations for the authenticated user.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "login": "github", "id": 1, "url": "https://api.github.com/orgs/github", "avatar_url": "https://github.com/images/error/octocat_happy.gif" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "login": { "type": "string" }, "id": { "type": "integer" }, "url": { "type": "string" }, "avatar_url": { "type": "string" } } } }

URl: /user/{userId}
GET

#### user {userId}

GET
/user/{userId}
Description
Get a single user.
Secured by oauth_2_0
Secured by null

#### Request

##### Uri Parameters

- userId (integer )

##### Query parameters

- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### 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" } } }

- ##### Http Status code
  404

  Unauthorized

URl: /user/{userId}/received_events
GET

#### user {userId} received_events

GET
/user/{userId}/received_events
Description
List events that a user has received.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/{userId}/received_events/public
GET

#### user {userId} received_events public

GET
/user/{userId}/received_events/public
Description
List public events that a user has received.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/{userId}/orgs
GET

#### user {userId} orgs

GET
/user/{userId}/orgs
Description
List all public organizations for a user.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "login": "github", "id": 1, "url": "https://api.github.com/orgs/github", "avatar_url": "https://github.com/images/error/octocat_happy.gif" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "login": { "type": "string" }, "id": { "type": "integer" }, "url": { "type": "string" }, "avatar_url": { "type": "string" } } } }

URl: /user/{userId}/events
GET

#### user {userId} events

GET
/user/{userId}/events
Description
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.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/{userId}/events/public
GET

#### user {userId} events public

GET
/user/{userId}/events/public
Description
List public events performed by a user.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/{userId}/events/orgs/{orgId}
GET

#### user {userId} events orgs {orgId}

GET
/user/{userId}/events/orgs/{orgId}
Description
List events for an organization.

#### Request

##### Uri Parameters

- orgId (integer )
- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/{userId}/starred
GET

#### user {userId} starred

GET
/user/{userId}/starred
Description
List repositories being starred.

#### Request

##### Uri Parameters

- userId (integer )

##### Query parameters

- sort (string )
- direction (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "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" } } }

URl: /user/{userId}/subscriptions
GET

#### user {userId} subscriptions

GET
/user/{userId}/subscriptions
Description
List repositories being watched by a user.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/emails
GET
POST
DELETE

#### user emails

GET
/user/emails
Description
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.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ "octocat@github.com", "support@github.com" ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "type": "string" } } }

POST
/user/emails
Description
Add email address(es). You can post a single email address or an array of addresses.

#### Request

- #### Response

DELETE
/user/emails
Description
Delete email address(es). You can include a single email address or an array of addresses.

#### Request

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "type": "string" } } }

- #### Response

URl: /user/following
GET

#### user following

GET
/user/following
Description
List who the authenticated user is following.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /user/following/{userId}
GET
PUT
DELETE

#### user following {userId}

GET
/user/following/{userId}
Description
Check if you are following a user.

#### Request

##### Uri Parameters

- userId (integer )

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Response if you are following this user.

- ##### Http Status code
  404

  Response if you are not following this user.

PUT
/user/following/{userId}
Description
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.

#### Request

##### Uri Parameters

- userId (integer )

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  You are now following the user.

DELETE
/user/following/{userId}
Description
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.

#### Request

##### Uri Parameters

- userId (integer )

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  User unfollowed.

URl: /user/keys
GET
POST

#### user keys

GET
/user/keys
Description
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.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } }, "type": "object" } } }

POST
/user/keys
Description
Create a public key.

#### Request

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "title": { "type": "string" }, "key": { "type": "string" } } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### Example

  { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } } }

URl: /user/keys/{keyId}
GET
PATCH
DELETE

#### user keys {keyId}

GET
/user/keys/{keyId}
Description
Get a single public key.

#### Request

##### Uri Parameters

- keyId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } } }

PATCH
/user/keys/{keyId}
Description
Update a public key.

#### Request

##### Uri Parameters

- keyId (integer )

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "title": { "type": "string" }, "key": { "type": "string" } } }

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  { "id": 1, "key": "ssh-rsa AAA...", "url": "https://api.github.com/user/keys/1", "title": "octocat@octomac" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "url": { "type": "string" }, "title": { "type": "string" } } }

DELETE
/user/keys/{keyId}
Description
Delete a public key.

#### Request

##### Uri Parameters

- keyId (integer )

- #### Response

- ##### Http Status code
  204

  Item removed.

URl: /user/starred
GET

#### user starred

GET
/user/starred
Description
List repositories being starred by the authenticated user.

#### Request

##### Query parameters

- sort (string )
- direction (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "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" } } }

URl: /user/starred/{ownerId}/{repoId}
GET
PUT
DELETE

#### user starred {ownerId} {repoId}

GET
/user/starred/{ownerId}/{repoId}
Description
Check if you are starring a repository.

#### Request

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  This repository is starred by you.

- ##### Http Status code
  404

  This repository is not starred by you.

PUT
/user/starred/{ownerId}/{repoId}
Description
Star a repository.

#### Request

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Repository starred.

DELETE
/user/starred/{ownerId}/{repoId}
Description
Unstar a repository

#### Request

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Unstarred.

URl: /user/subscriptions
GET

#### user subscriptions

GET
/user/subscriptions
Description
List repositories being watched by the authenticated user.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }

URl: /user/subscriptions/{ownerId}/{repoId}
GET
PUT
DELETE

#### user subscriptions {ownerId} {repoId}

GET
/user/subscriptions/{ownerId}/{repoId}
Description
Check if you are watching a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Repository is watched by you.

- ##### Http Status code
  404

  Repository is not watched by you.

PUT
/user/subscriptions/{ownerId}/{repoId}
Description
Watch a repository.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Repository is watched.

DELETE
/user/subscriptions/{ownerId}/{repoId}
Description
Stop watching a repository

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Unwatched.

URl: /user/issues
GET

#### user issues

GET
/user/issues
Description
List issues. List all issues across owned and member repositories for the authenticated user.

#### Request

##### Query parameters

- filter (string )
  Issues assigned to you / created by you / mentioning you / you're subscribed to updates for / All issues the authenticated user can see
- state (string )
- labels (string )
  String list of comma separated Label names. Example - bug,ui,@high.
- sort (string )
- direction (string )
- 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.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "issues": { "0": { "properties": { "url": { "type": "string" }, "html_url": { "type": "string" }, "number": { "type": "integer" }, "state": { "enum": { "0": "open", "1": "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": { "0": { "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": { "0": "open", "1": "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" } } }

URl: /user/repos
GET
POST

#### user repos

GET
/user/repos
Description
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.

#### Request

##### Query parameters

- type (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "_empty_": { "0": { "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" } } } }

POST
/user/repos
Description
Create a new repository for the authenticated user. OAuth users must supply repo scope.

#### Request

- Content-Type: application/json

- ##### Body

- ###### 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": { "0": "name" } }

- #### Response

- ##### Http Status code
  201

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "_empty_": { "0": { "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" } } } }

URl: /users
GET

#### users

GET
/users
Description
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.

#### Request

##### Query parameters

- since (integer )
  The integer ID of the last User that you've seen.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /users/{userId}
GET

#### users {userId}

GET
/users/{userId}
Description
List a user's followers.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "list": { "0": { "properties": { "login": { "type": "string" }, "id": { "type": "integer" }, "avatar_url": { "type": "string" }, "gravatar_id": { "type": "string" }, "url": { "type": "string" } }, "type": "object" } } }

URl: /users/{userId}/following/{targetUserId}
GET

#### users {userId} following {targetUserId}

GET
/users/{userId}/following/{targetUserId}
Description
Check if one user follows another.

#### Request

##### Uri Parameters

- targetUserId (integer )
- userId (integer )

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  204

  Response if user follows target user.

- ##### Http Status code
  404

  Response if user does not follow target user.

URl: /users/{userId}/keys
GET

#### users {userId} keys

GET
/users/{userId}/keys
Description
List public keys for a user. Lists the verified public keys for a user. This is accessible by anyone.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "id": 1, "key": "ssh-rsa AAA..." } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "id": { "type": "integer" }, "key": { "type": "string" } } } }

URl: /users/{userId}/gists
GET

#### users {userId} gists

GET
/users/{userId}/gists
Description
List a user's gists.
Secured by null
Secured by oauth_2_0

#### Request

##### Uri Parameters

- userId (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.
- access_token (string )
  Used to send a valid OAuth 2 access token. Do not use together with the "Authorization" header

##### Headers

- Authorization: Used to send a valid OAuth 2 access token. Do not use together with the "access_token" query string parameter.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "gists": { "0": { "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" } } } } }

- ##### Http Status code
  404

  Unauthorized

URl: /users/{userId}/orgs
GET

#### users {userId} orgs

GET
/users/{userId}/orgs
Description
List all public organizations for a user.

#### Request

##### Uri Parameters

- userId (integer )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ { "login": "github", "id": 1, "url": "https://api.github.com/orgs/github", "avatar_url": "https://github.com/images/error/octocat_happy.gif" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "login": { "type": "string" }, "id": { "type": "integer" }, "url": { "type": "string" }, "avatar_url": { "type": "string" } } } }

URl: /users/{userId}/repos
GET

#### users {userId} repos

GET
/users/{userId}/repos
Description
List public repositories for the specified user.

#### Request

##### Uri Parameters

- userId (integer )

##### Query parameters

- type (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "_empty_": { "0": { "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" } } } }

URl: /gitignore/templates
GET

#### gitignore templates

GET
/gitignore/templates
Description
Listing available templates. List all templates available to pass as an option when creating a repository.

#### Request

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### Example

  [ "Actionscript", "Android", "AppceleratorTitanium", "Autotools", "Bancha", "C", "C " ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "_empty_": { "0": { "type": "string" } } }

URl: /gitignore/templates/{language}
GET

#### gitignore templates {language}

GET
/gitignore/templates/{language}
Description
Get a single template.

#### Request

##### Uri Parameters

- language (string )

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" }

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "name": { "type": "string" }, "source": { "type": "string" } } }

URl: /markdown
POST

#### markdown

POST
/markdown
Description

#### Request

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- Content-Type: application/json

- ##### Body

- ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "text": { "description": "The Markdown text to render", "type": "string" }, "mode": { "enum": { "0": "markdown", "1": "gfm" } }, "context": { "description": "The repository context, only taken into account when rendering as gfm.", "type": "string" } }, "required": { "0": "text" } }

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  200

- Content-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>

URl: /markdown/raw
POST

#### markdown raw

POST
/markdown/raw
Description

#### Request

##### Headers

- X-GitHub-Media-Type: You can check the current version of media type in responses.
- Accept: Is used to set specified media type.
- X-RateLimit-Limit:
- X-RateLimit-Remaining:
- X-RateLimit-Reset:
- X-GitHub-Request-Id:

- Content-Type: text/plain

- ##### Body

- ###### Example

  <p>Hello world github/linguist#1 <strong>cool</strong>, and #1!</p>

- #### Response

- ##### Http Status code
  403

  API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting for details.

- ##### Http Status code
  200

- Content-Type: text/html

- ###### Example

  <p>Hello world github/linguist#1 <strong>cool</strong>, and #1!</p>

URl: /networks/{ownerId}/{repoId}/events
GET

#### networks {ownerId} {repoId} events

GET
/networks/{ownerId}/{repoId}/events
Description
List public events for a network of repositories.

#### Request

##### Uri Parameters

- ownerId (integer )
  Id of the owner.
- repoId (integer )
  Id of repository.

- #### Response

- ##### Http Status code
  200

- Content-Type: application/json

- ###### 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" } ]

  ###### Schema

  { "$schema": "http://json-schema.org/draft-03/schema", "type": "array", "properties": { "0": { "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" } } }