https://github.com/vyomrastogi/cryptozoology-zoo-api
https://github.com/vyomrastogi/cryptozoology-zoo-api
galvanize learn-repo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/vyomrastogi/cryptozoology-zoo-api
- Owner: vyomrastogi
- Created: 2021-01-09T19:23:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-09T23:18:32.000Z (over 4 years ago)
- Last Synced: 2023-03-09T07:56:21.763Z (about 2 years ago)
- Topics: galvanize, learn-repo
- Language: Java
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cyrtozoology Zoo REST API
## API Specifications
**Resource Summary**
| URI | HTTP Method | HTTP Status | Description |
|----------------------------------------------------|-------------|-----------------|-------------------------------------------------------|
| domain.com/api/zoo/animals | POST | 201 CREATED| Add animal to Zoo and return new animal |
| domain.com/api/zoo/animals | GET | 200 OK | Return the list of animals. |
| domain.com/api/zoo/animals/{name}/treat | PUT | 200 OK | Gives treat to animal and makes animal happy. |
| domain.com/api/zoo/animals/{name}/habitat/{habitat}| PUT | 200 OK | Updates habitat and returns animal with mood updated |
| domain.com/api/zoo/animals?mood={mood}&type={type} | GET | 200 OK | Return the list of animals matching search criteria |
| domain.com/api/zoo/habitats?empty={isEmpty} | GET | 200 OK | Returns the list of habitats matching search criteria |---
** POST /api/zoo/animals **
Request Body:
```json
{
"name": "Lion",
"type": "walking"
}
```Response Body:
```json
{
"id": 1,
"name": "Lion",
"type": "walking",}
```
---** GET /api/zoo/animals **
Response Body:
```json
[
{
"id": 1,
"name": "Bird",
"type": "flying"
},
{
"id": 2,
"name": "Bird",
"type": "flying"
},
{
"id": 3,
"name": "Bird",
"type": "flying"
}
]
```