Skip to content

Instantly share code, notes, and snippets.

@jordelver
Last active April 8, 2018 02:01
Show Gist options
  • Save jordelver/71ef7394383ab36e4b7e to your computer and use it in GitHub Desktop.
Save jordelver/71ef7394383ab36e4b7e to your computer and use it in GitHub Desktop.
RestfulGit examples

RestfulGit examples

Things we need to get from the API

(Install jq for these examples http://stedolan.github.io/jq/)

Single commits

curl 'http://0.0.0.0:5000/repos/restfulgit/commits/8990ae2cd9bfa2d94f4fd37ae8026c71bfe7d8ef/' | jq '.'

Range of commits

curl http://0.0.0.0:5000/repos/restfulgit/git/commits/ | jq '.'

Branches

curl 'http://0.0.0.0:5000/repos/restfulgit/branches/' | jq '.'

Remotes

??

Miscellaneous, but handy

List of all repos

curl http://0.0.0.0:5000/repos/ | jq '.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment