diff --git a/API.md b/API.md index a0517c9..9329bcc 100644 --- a/API.md +++ b/API.md @@ -1,8 +1,10 @@ Statup includes a RESTFUL API so you can view, update, and edit your services with easy to use routes. ## Authentication +Authentication uses the Statup API Secret to accept remote requests. You can find the API Secret in the Settings page of your Statup server. To send requests to your Statup API, include a Authorization Header when you send the request. The API will accept any one of the headers below. -HTTP Request Header: `Authorization: API SECRET HERE` +- HTTP Header: `Authorization: API SECRET HERE` +- HTTP Header: `Authorization: Bearer API SECRET HERE` ## Main Route `/api` The main API route will show you all services and failures along with them. @@ -13,14 +15,17 @@ The services API endpoint will show you detailed information about services and ### Viewing All Services - Endpoint: `/api/services` - Method: `GET` +- Response: Array of [Services](https://github.com/hunterlong/statup/wiki/API#service-response) ### Viewing Service - Endpoint: `/api/services/{id}` - Method: `GET` +- Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response) ### Updating Service - Endpoint: `/api/services/{id}` - Method: `POST` +- Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response) POST Data: ```json @@ -42,6 +47,7 @@ POST Data: ### Deleting Service - Endpoint: `/api/services/{id}` - Method: `DELETE` +- Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response) Response: ```json @@ -157,6 +163,7 @@ Response: } ``` + # Main API Response ```json {