Updated API (markdown)

master
Hunter Long 2018-09-12 14:23:49 -07:00
parent dac1cea793
commit a769e834bb
1 changed files with 18 additions and 0 deletions

18
API.md

@ -16,16 +16,22 @@ The services API endpoint will show you detailed information about services and
- Endpoint: `/api/services` - Endpoint: `/api/services`
- Method: `GET` - Method: `GET`
- Response: Array of [Services](https://github.com/hunterlong/statup/wiki/API#service-response) - Response: Array of [Services](https://github.com/hunterlong/statup/wiki/API#service-response)
- Response Type: `application/json`
- Request Type: `application/json`
### Viewing Service ### Viewing Service
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `GET` - Method: `GET`
- Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response) - Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response)
- Response Type: `application/json`
- Request Type: `application/json`
### Updating Service ### Updating Service
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `POST` - Method: `POST`
- Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response) - Response: [Service](https://github.com/hunterlong/statup/wiki/API#service-response)
- Response Type: `application/json`
- Request Type: `application/json`
POST Data: POST Data:
```json ```json
@ -48,6 +54,8 @@ POST Data:
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `DELETE` - Method: `DELETE`
- Response: [Object Response](https://github.com/hunterlong/statup/wiki/API#object-response) - Response: [Object Response](https://github.com/hunterlong/statup/wiki/API#object-response)
- Response Type: `application/json`
- Request Type: `application/json`
Response: Response:
```json ```json
@ -66,16 +74,22 @@ The users API endpoint will show you users that are registered inside your Statu
- Endpoint: `/api/users` - Endpoint: `/api/users`
- Method: `GET` - Method: `GET`
- Response: Array of [Users](https://github.com/hunterlong/statup/wiki/API#user-response) - Response: Array of [Users](https://github.com/hunterlong/statup/wiki/API#user-response)
- Response Type: `application/json`
- Request Type: `application/json`
### Viewing User ### Viewing User
- Endpoint: `/api/users/{id}` - Endpoint: `/api/users/{id}`
- Method: `GET` - Method: `GET`
- Response: [User](https://github.com/hunterlong/statup/wiki/API#user-response) - Response: [User](https://github.com/hunterlong/statup/wiki/API#user-response)
- Response Type: `application/json`
- Request Type: `application/json`
### Creating New User ### Creating New User
- Endpoint: `/api/users` - Endpoint: `/api/users`
- Method: `POST` - Method: `POST`
- Response: [User](https://github.com/hunterlong/statup/wiki/API#user-response) - Response: [User](https://github.com/hunterlong/statup/wiki/API#user-response)
- Response Type: `application/json`
- Request Type: `application/json`
POST Data: POST Data:
```json ```json
@ -91,6 +105,8 @@ POST Data:
- Endpoint: `/api/users/{id}` - Endpoint: `/api/users/{id}`
- Method: `POST` - Method: `POST`
- Response: [User](https://github.com/hunterlong/statup/wiki/API#user-response) - Response: [User](https://github.com/hunterlong/statup/wiki/API#user-response)
- Response Type: `application/json`
- Request Type: `application/json`
POST Data: POST Data:
```json ```json
@ -106,6 +122,8 @@ POST Data:
- Endpoint: `/api/services/{id}` - Endpoint: `/api/services/{id}`
- Method: `DELETE` - Method: `DELETE`
- Response: [Object Response](https://github.com/hunterlong/statup/wiki/API#object-response) - Response: [Object Response](https://github.com/hunterlong/statup/wiki/API#object-response)
- Response Type: `application/json`
- Request Type: `application/json`
Response: Response:
```json ```json