Formatting of examples

This commit is contained in:
James Brooks 2015-01-12 08:56:10 +00:00
parent cf846e59ff
commit 2cb6acb018

View File

@ -8,14 +8,17 @@ The API is accessible from `http://<cachet-url>/api/<endpoint>`
You can use curl to interact with the API. There is no authentication required for `GET` requests: You can use curl to interact with the API. There is no authentication required for `GET` requests:
`curl -XGET http://status.cachethq.io/api/components` ```bash
$ curl -XGET http://status.cachethq.io/api/components
```
In order to create incidents, you must send the a json string with the required payload and authenticate. More information can be found in the Endpoints documentation listed below. In order to create incidents, you must send the a json string with the required payload and authenticate. More information can be found in the Endpoints documentation listed below.
Here's a simple example: Here's a simple example:
`curl -u username@example.com -H "Content-Type: application/json" -d '{"name":"API","description":"An example description","status":1}' http://status.cachethq.io/api/components` ```bash
$ curl -u username@example.com -H "Content-Type: application/json" -d '{"name":"API","description":"An example description","status":1}' http://status.cachethq.io/api/components
```
# Endpoints # Endpoints