mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 13:38:20 +01:00
Formatting of examples
This commit is contained in:
parent
cf846e59ff
commit
2cb6acb018
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user