{"action":"created","issue":{"url":"https://api.github.com/repos/healthchecks/healthchecks/issues/45","repository_url":"https://api.github.com/repos/healthchecks/healthchecks","labels_url":"https://api.github.com/repos/healthchecks/healthchecks/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/healthchecks/healthchecks/issues/45/comments","events_url":"https://api.github.com/repos/healthchecks/healthchecks/issues/45/events","html_url":"https://github.com/healthchecks/healthchecks/issues/45","id":133022464,"number":45,"title":"Create HTTP API endpoint aimed to create a new check","user":{"login":"kakovskyi","id":11719873,"avatar_url":"https://avatars.githubusercontent.com/u/11719873?v=3","gravatar_id":"","url":"https://api.github.com/users/kakovskyi","html_url":"https://github.com/kakovskyi","followers_url":"https://api.github.com/users/kakovskyi/followers","following_url":"https://api.github.com/users/kakovskyi/following{/other_user}","gists_url":"https://api.github.com/users/kakovskyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kakovskyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kakovskyi/subscriptions","organizations_url":"https://api.github.com/users/kakovskyi/orgs","repos_url":"https://api.github.com/users/kakovskyi/repos","events_url":"https://api.github.com/users/kakovskyi/events{/privacy}","received_events_url":"https://api.github.com/users/kakovskyi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-11T16:36:19Z","updated_at":"2016-02-16T10:31:12Z","closed_at":null,"body":"It would be very handy to have HTTP API for spawning new checks.\r\n\r\nMany thanks for your service."},"comment":{"url":"https://api.github.com/repos/healthchecks/healthchecks/issues/comments/184616374","html_url":"https://github.com/healthchecks/healthchecks/issues/45#issuecomment-184616374","issue_url":"https://api.github.com/repos/healthchecks/healthchecks/issues/45","id":184616374,"user":{"login":"cuu508","id":661859,"avatar_url":"https://avatars.githubusercontent.com/u/661859?v=3","gravatar_id":"","url":"https://api.github.com/users/cuu508","html_url":"https://github.com/cuu508","followers_url":"https://api.github.com/users/cuu508/followers","following_url":"https://api.github.com/users/cuu508/following{/other_user}","gists_url":"https://api.github.com/users/cuu508/gists{/gist_id}","starred_url":"https://api.github.com/users/cuu508/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuu508/subscriptions","organizations_url":"https://api.github.com/users/cuu508/orgs","repos_url":"https://api.github.com/users/cuu508/repos","events_url":"https://api.github.com/users/cuu508/events{/privacy}","received_events_url":"https://api.github.com/users/cuu508/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T10:31:12Z","updated_at":"2016-02-16T10:31:12Z","body":"By now there are 3 issues asking for API access – #4, #42 and this one, so clearly this is something that's missing and worth adding.\r\n\r\nHere's what we could start with:\r\n * Each account gets an API key, accessible from settings page\r\n * There's an API call for creating a new check. It takes a JSON payload with parameters (all optional):\r\n\r\n    curl -H \"Content-Type: application/json\" -X POST -d '{\"name\":\"ip-10-0-0-1\", \"tags\":\"web,aws\", \"period\":86400, \"grace\":300}' http://healthchecks.io/api/check\r\n\r\n * the response would be a JSON dictionary with ping URL: \r\n\r\n    {\"url\": \"https://hchk.io/...\"}\r\n\r\nWith this in place, one could write a CLI client in Python/Ruby/Go/whatever which creates the check if needed and then pings it. It could store the created URL in e.g. a dotfile in $HOME.\r\n\r\n    $ hchk --api-key=base64gibberish --name=`hostname` --tags=web,aws --period=86400 --grace=300\r\n\r\nWould this help? What would be the use cases where this would not be sufficient?"}}