Zach makes a lot of noises, they should be reported and saved.
https://zach-noise-api.herokuapp.com/api/
All requests must include an api_key
to be processed.
Name | Required | Example |
---|---|---|
api_key | yes | ?api_key=API_KEY |
GET /api/noises
Returns all noises
GET /api/noises/:id
Name | Required | Description |
---|---|---|
id | yes | Number |
Returns a single noise
POST /api/noises
Name | Required | Description |
---|---|---|
type | yes | Number (type id) |
severity | yes | Float (min:1, max:6) |
reporter | No | Number (reporter id) |
Saves a noise to the database
PATCH /api/noises/:id
Name | Required | Description |
---|---|---|
id | yes | Number |
Name | Required | Description |
---|---|---|
Severity | No | Number (ID) |
Reporter | No | Number (ID) |
Type | No | Number (ID) |
Updates a noise at a specific ID
DELETE /api/noises/:id
Name | Required | Description |
---|---|---|
id | yes | Number |
Deletes a noise from the database
GET /api/types
Returns all types
GET /api/types/:id
Name | Required | Description |
---|---|---|
id | yes | Number |
Returns a single type
POST /api/types
Name | Required | Description |
---|---|---|
name | yes | String |
Saves a noise type to the database
PATCH /api/types/:id
Name | Required | Description |
---|---|---|
id | yes | Number |
Name | Required | Description |
---|---|---|
Name | Yes | String |
Updates a type at a specific ID
DELETE /api/types/:id
Name | Required | Description |
---|---|---|
id | yes | Number |
Deletes a type from the database
GET /api/search?query=[QUERY]&more_than=[NUMBER]&less_than=[NUMBER]
Name | Required | Description |
---|---|---|
query | yes | String |
more_than | no | Number |
less_than | no | Number |
Returns all noises of that type
Returns all noises of that type with a severity more than x
Returns all noises of that type with a severity less than y