Skip to content

Instantly share code, notes, and snippets.

@chrisedington
Created January 20, 2016 05:54
Show Gist options
  • Save chrisedington/82d22642ddef34482cb6 to your computer and use it in GitHub Desktop.
Save chrisedington/82d22642ddef34482cb6 to your computer and use it in GitHub Desktop.
Some useful undocumented CircleCI API stuff
# Adding a GitHub repo to CircleCI
curl -s "https://circleci.com/api/v1/project/{{ORGANISATION}}/{{REPO_NAME}}/follow?circle-token={{TOKEN}}" -H "Accept: application/json" -H "Content-type: application/json" -X POST
# Adding private key to CircleCI to enable deployment
curl -s -H "Content-Type: application/json" --data "{"hostname":"{{HOSTNAME}}","private_key":"{{PRIVATE KEY}}"}" "https://circleci.com/api/v1/project/{{ORGANISATION}}/{{REPO_NAME}}/ssh-key?circle-token={{TOKEN}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment