Skip to content

Instantly share code, notes, and snippets.

@spicyjack
Created November 28, 2016 21:45
Show Gist options
  • Select an option

  • Save spicyjack/1c916dde13d6da71442689714c0e0442 to your computer and use it in GitHub Desktop.

Select an option

Save spicyjack/1c916dde13d6da71442689714c0e0442 to your computer and use it in GitHub Desktop.

Revisions

  1. spicyjack created this gist Nov 28, 2016.
    620 changes: 620 additions & 0 deletions Git Services API Codex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,620 @@
    # API Codex #

    ## API Document URLs ##
    - _BitBucket_
    - https://developer.atlassian.com/bitbucket/api/2/reference/resource/
    - https://confluence.atlassian.com/bitbucket/use-the-bitbucket-rest-apis-222724129.html
    - _GitHub_
    - https://developer.github.com/v3/
    - _GitLab_
    - http://docs.gitlab.com/ce/api/README.html
    - _JIRA_
    - https://docs.atlassian.com/jira/REST/cloud/
    - _Trac_
    - http://trac.edgewall.org/wiki/TracDev/ApiDocs
    - https://trac-hacks.org/wiki/XmlRpcPlugin
    - _Phabricator_
    - https://secure.phabricator.com/book/phabricator/


    ## Base API URLs ##
    - _BitBucket_
    - https://api.bitbucket.org
    - _GitHub_
    - https://api.github.com
    - _GitLab_
    - https://gitlab.example.com/api/v3
    - _JIRA_
    - _Trac_
    - _Phaboulous_


    ## Users ##
    List all public users in the system
    - Bitbucket
    - No available API request
    - GitHub
    - `GET /users`
    - https://developer.github.com/v3/users/#get-all-users
    - GitLab
    - `GET /users`
    - http://docs.gitlab.com/ce/api/users.html#for-normal-users
    - http://docs.gitlab.com/ce/api/users.html#for-admins


    Create new user
    - Bitbucket
    - No available API request (must create users through the web interface)
    - Web: https://bitbucket.org/account/signup/
    - GitHub
    - No available API request (must create users through the web interface)
    - Web: https://github.com/join
    - GitLab
    - `POST /users`
    - http://docs.gitlab.com/ce/api/users.html#user-creation
    - Web: https://gitlab.com/users/sign_in (calls `POST /users`)


    Retrieve info about a given user
    - Bitbucket
    - `GET /2.0/users/{username}`
    - http://tinyurl.com/nwdmp8x
    - Web: https://bitbucket.org/:user
    - GitHub
    - `GET /users/:username` (no authentication required)
    - https://developer.github.com/v3/users/#get-a-single-user
    - `GET /user` (currently authenticated user only)
    - https://developer.github.com/v3/users/#get-the-authenticated-user
    - Web: https://github.com/:user
    - GitLab
    - `GET /users/:id`
    - http://docs.gitlab.com/ce/api/users.html#for-user
    - Web: https://gitlab.com/:user


    Update info about an existing user
    - Bitbucket
    - No available API request (must modify users through the web interface)
    - Web: https://bitbucket.org/account/user/:user
    - GitHub
    - `PATCH /user` (only for the currently logged in user)
    - https://developer.github.com/v3/users/#update-the-authenticated-user
    - Web: https://github.com/settings/profile
    - GitLab
    - `PUT /users/:id` (administrators only)
    - http://docs.gitlab.com/ce/api/users.html#user-modification
    - Web: https://gitlab.com/profile


    Delete existing user
    - Bitbucket
    - No available API request (must delete users through the web interface)
    - Web: https://bitbucket.org/account/user/:user/delete/
    - GitHub
    - No available API request (must delete users through the web interface)
    - Web: https://github.com/settings/admin
    - GitLab
    - `DELETE /users/:id`
    - http://docs.gitlab.com/ce/api/users.html#user-deletion
    - Web: https://gitlab.com/profile/account


    ## Groups ##
    Retrieve all public groups in the system
    - Bitbucket
    - No available API request (no way to list groups that you don't belong to)
    - GitHub
    - `GET /organizations`
    - https://developer.github.com/v3/orgs/#list-all-organizations
    - GitLab
    - `GET /groups` (with `all_available` parameter)
    - http://docs.gitlab.com/ce/api/groups.html
    - Web: https://gitlab.com/explore/groups
    - "A group is a collection of several projects"


    List all of the users in a given group
    - Bitbucket
    - `GET /2.0/teams/{username}/members`
    - http://tinyurl.com/nakza55
    - It's not clear if you have to be a member of the team in order to get a
    list of members for that team
    - GitHub
    - `GET /orgs/:org/members`
    - https://developer.github.com/v3/orgs/members/#members-list
    - GitLab
    - `GET /groups/:id/members`
    - `GET /projects/:id/members`
    - http://docs.gitlab.com/ce/api/members.html


    Create new group
    - Bitbucket
    - No available API request (must create groups through the web interface)
    - Web: https://bitbucket.org/account/create-team/
    - GitHub
    - No available API request (must create organizations through the web
    interface)
    - Web: https://github.com/organizations/new
    - GitLab
    - `POST /groups` (requires paramters such as `name`, `path`, etc)
    - http://docs.gitlab.com/ce/api/groups.html
    - Web: https://gitlab.com/groups/new


    Retrieve info about a given group
    - Bitbucket
    - No available API request (must view group info through the web interface)
    - GitHub
    - `GET /orgs/:org`
    - https://developer.github.com/v3/orgs/#get-an-organization
    - GitLab
    - `GET /groups/:id`
    - http://docs.gitlab.com/ce/api/groups.html


    Delete existing group
    - Bitbucket
    - No available API request (must view group info through the web interface)
    - GitHub
    - No available API request (must delete organizations through the web
    interface)
    - GitLab
    - `DELETE /groups/:id`
    - http://docs.gitlab.com/ce/api/groups.html


    Update existing group info
    - Bitbucket
    - No available API request (must update group info through the web
    interface)
    - GitHub
    - `PATCH /orgs/:org`
    - https://developer.github.com/v3/orgs/#edit-an-organization
    - GitLab
    - `PUT /groups/:id`
    - http://docs.gitlab.com/ce/api/groups.html


    Get a user(s) of a group
    - Bitbucket
    - No available API request (must get users of a group info through the web
    interface)
    - GitHub
    - `GET /orgs/:org/members`
    - https://developer.github.com/v3/orgs/members/#members-list
    - GitLab
    - `GET /groups/:id/members`
    - http://docs.gitlab.com/ce/api/members.html


    Add user(s) to group
    - Bitbucket
    - No available API request (must add users to a group through the web
    interface)
    - GitHub
    - `PUT /teams/:id/memberships/:username`
    - https://developer.github.com/v3/orgs/teams/#add-team-membership
    - `PUT /orgs/:org/memberships/:username`
    - http://tinyurl.com/hsd8j5y
    - GitLab
    - `POST /groups/:id/members`
    - http://docs.gitlab.com/ce/api/members.html


    Remove user(s) from group
    - Bitbucket
    - No available API request (must delete users from a group through the web
    interface)
    - GitHub
    - `DELETE /orgs/:org/members/:username`
    - https://developer.github.com/v3/orgs/members/#remove-a-member
    - GitLab
    - `DELETE /groups/:id/members/:user_id`
    - http://docs.gitlab.com/ce/api/members.html


    ## Projects ##
    List all public projects
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitHub doesn't currently have the concept of a "project"
    - GitLab
    - `GET /projects/all` (admin only)


    List projects owned by a specific group
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitHub doesn't currently have the concept of a "project"
    - GitLab
    - `GET /groups/:id/projects`
    - http://docs.gitlab.com/ce/api/groups.html


    List projects owned by a specific user
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitHub doesn't currently have the concept of a "project"
    - GitLab
    - `GET /groups/:id/projects`
    - http://docs.gitlab.com/ce/api/groups.html


    Create new project
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitLab
    ­ `POST /projects` (with project `name`, `path`, etc.)
    - http://docs.gitlab.com/ce/api/projects.html


    Retrieve info about a given project
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitHub doesn't currently have the concept of a "project"
    - GitLab
    - `GET /projects/:id`
    - http://docs.gitlab.com/ce/api/projects.html


    Update info about an existing project
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitHub doesn't currently have the concept of a "project"
    - GitLab
    - `PUT /projects/:id`
    - http://docs.gitlab.com/ce/api/projects.html


    Delete existing project
    - Bitbucket
    - No available API request (no concept of projects)
    - GitHub
    - GitHub doesn't currently have the concept of a "project"
    - GitLab
    - `DELETE /projects/:id`
    - http://docs.gitlab.com/ce/api/projects.html


    ## Repos ##
    Retrieve all public repos
    - Bitbucket
    - `GET /repositories`
    - http://tinyurl.com/ztw73yy
    ­ Web: Bitbucket is horrible for exploring
    - GitHub
    - `GET /repositories`
    - https://developer.github.com/v3/repos/#list-all-public-repositories
    - Web: https://github.com/explore
    - GitLab
    - In GitLab, a repository is part of a project, so there's no separate API
    call to list all of the repositories, you would make the API call to list
    projects instead
    - Web: https://gitlab.com/explore


    Retrieve all repos (public and private) for a given user/group
    - Bitbucket
    - `/2.0/repositories/:user_name`
    - http://tinyurl.com/jg6ptp3
    - Web: https://bitbucket.org/:user
    - GitHub
    - `GET /user/repos` (logged in user)
    - https://developer.github.com/v3/repos/#list-your-repositories
    - `GET /users/:user_name/repos` (not logged in)
    - https://developer.github.com/v3/repos/#list-user-repositories
    - `GET /orgs/:org/repos` (organization repos)
    - https://developer.github.com/v3/repos/#list-organization-repositories
    - Web: `/:user_name?tab=repositories` (private projects are only shown to
    authorized users)
    - GitLab
    - Repos are parts of projects, so there's no separate API for repos
    - Web: `/u/:user_name/projects` (user's projects)


    Create new repo
    - Bitbucket
    - `POST /2.0/repositories/:user/:repo`
    - http://tinyurl.com/hjvbq2h
    - Repo parameters will be in the body of a JSON message
    - Getting/creating/updating/deleting repos all shares the same API URL,
    with the HTTP verb being different for each action
    (`GET/POST/PUT/DELETE`)
    - Web: https://bitbucket.org/repo/create
    - GitHub
    - `POST /user/repos` (for the specified user)
    - https://developer.github.com/v3/repos/#create
    - Repo parameters (including repo name) will be in the body of a JSON
    message
    - Web: https://github.com/new
    - `POST /orgs/:org_name/repos` (for the specified org)
    - https://developer.github.com/v3/repos/#create
    - Repo parameters (including repo name) will be in the body of a JSON
    message
    - Web: https://github.com/organizations/:org/repositories/new
    - GitLab
    - Repos are parts of projects, so there's no separate API for repos
    - `POST /projects` (for the authenticated user, with project `name`,
    `path`, etc.)
    - `POST /projects/user/:user_name` (for the specified user, with project
    `name`, `path`, etc.; only available for admins)
    - Web: https://gitlab.com/projects/new


    Retrieve info about a given repo
    - Bitbucket
    - `GET /2.0/repositories/:user/:repo`
    - http://tinyurl.com/hjvbq2h
    - Getting/creating/updating/deleting repos all shares the same API URL, with
    the HTTP verb being different for each action (`GET/POST/PUT/DELETE`)
    - Web: https://bitbucket.org/:user/:repo
    - GitHub
    - `GET /repos/:owner/:repo`
    - https://developer.github.com/v3/repos/#get
    - Comes with `parent` and `source` parameters if this repo is a fork of
    another repo; `parent` would the the repo that this repo was forked
    from, and `source` would be the ultimate parent of all forks that exist
    in the system
    - Web: https://github.com/:user/:repo
    - GitLab
    - Repos are parts of projects, so there's no separate API for repos
    - `GET /projects/:id`
    - http://docs.gitlab.com/ce/api/projects.html
    - Web: https://gitlab.com/:user/:project


    Update info about an existing repo
    - Bitbucket
    - `PUT /2.0/repositories/{username}/{repo_slug}`
    - http://tinyurl.com/hjvbq2h
    - Getting/creating/updating/deleting repos all shares the same API URL, with
    the HTTP verb being different for each action (`GET/POST/PUT/DELETE`)
    - Web: https://bitbucket.org/:user/:repo/admin
    - GitHub
    - `PATCH /repos/:owner/:repo`
    - https://developer.github.com/v3/repos/#edit
    - Web: https://github.com/user:/:repo/settings
    - GitLab
    - Repos are parts of projects, so there's no separate API for repos
    - `PUT /projects/:id`
    - http://docs.gitlab.com/ce/api/projects.html
    - Web: https://gitlab.com/:user/:project/edit


    Delete existing repo
    - Bitbucket
    - `DELETE /2.0/repositories/:user/:repo`
    - http://tinyurl.com/hjvbq2h
    - Getting/creating/updating/deleting repos all shares the same API URL, with
    the HTTP verb being different for each action (`GET/POST/PUT/DELETE`)
    - Web: https://bitbucket.org/:user/:repo/admin
    - GitHub
    - `DELETE /repos/:owner/:repo`
    - https://developer.github.com/v3/repos/#delete-a-repository
    - Web: https://github.com/:user/:repo/settings
    - GitLab
    - `DELETE /projects/:id`
    - http://docs.gitlab.com/ce/api/projects.html
    - Web: https://gitlab.com/:user/:project/edit


    ## Trackers ##
    Retrieve tracker list
    - Bitbucket
    - GitHub
    - GitLab


    Create new tracker
    - Bitbucket
    - GitHub
    - GitLab


    Get tracker metadata
    - Bitbucket
    - GitHub
    - GitLab


    Update tracker metadata
    - Bitbucket
    - GitHub
    - GitLab


    Delete tracker
    - Bitbucket
    - GitHub
    - GitLab


    ## Wikis ##
    Retrieve wiki list
    - Bitbucket
    - GitHub
    - GitLab


    Create new wiki
    - Bitbucket
    - GitHub
    - GitLab


    Get wiki metadata
    - Bitbucket
    - GitHub
    - GitLab


    Update wiki metadata
    - Bitbucket
    - GitHub
    - GitLab


    Delete wiki
    - Bitbucket
    - GitHub
    - GitLab


    ## Commits ##
    Retrieve list of commits
    - Bitbucket
    - GitHub
    - GitLab


    Create new commit
    - Bitbucket
    - GitHub
    - GitLab


    Get a specific commmit
    - Bitbucket
    - GitHub
    - GitLab


    Update metadata about a specific commit
    - Bitbucket
    - GitHub
    - GitLab


    Delete commit
    - Bitbucket
    - GitHub
    - GitLab


    ## Issues ##
    Retrieve total open/closed issues for this repo
    - Bitbucket
    - GitHub
    - https://developer.github.com/v3/issues/#list-issues-for-a-repository
    - GitLab


    Create new issue
    - Bitbucket
    - GitHub
    - GitHub - `POST /repos/:owner/:repo/issues`
    - GitLab


    Retrieve existing issue
    - Bitbucket
    - GitHub
    - GitLab


    Update existing issue
    - Bitbucket
    - GitHub
    - GitLab


    Delete existing issue
    - Bitbucket
    - GitHub
    - GitLab


    Retrieve issue list
    - Bitbucket
    - GitHub
    - https://developer.github.com/v3/issues/#list-issues
    - GitLab


    ## (Wiki) Pages ##
    Retrieve list pages for a given wiki
    - Bitbucket
    - GitHub
    - GitLab


    Create new wiki page
    - Bitbucket
    - GitHub
    - GitLab


    Get a wiki page
    - Bitbucket
    - GitHub
    - GitLab


    Update metadata about a specific wiki page
    - Bitbucket
    - GitHub
    - GitLab


    Delete wiki page
    - Bitbucket
    - GitHub
    - GitLab


    ## Milestones ##
    Create new milestone
    - Bitbucket
    - GitHub
    - GitLab


    Retrieve all milestones
    - Bitbucket
    - GitHub
    - GitLab


    Retrieve all issues for a given milestone
    - Bitbucket
    - GitHub
    - GitLab

    Update existing milestone
    - Bitbucket
    - GitHub
    - GitLab


    Delete existing milestone
    - Bitbucket
    - GitHub
    - GitLab


    Attach a milestone to an issue
    - Bitbucket
    - GitHub
    - GitLab


    Detatch a milestone from an issue
    - Bitbucket
    - GitHub
    - GitLab


    Replace a milestone on an issue
    - Bitbucket
    - GitHub
    - GitLab


    vim: filetype=markdown shiftwidth=2 tabstop=2