https://github.com/richismyhoo/zoorestapi
rest api for zoo
https://github.com/richismyhoo/zoorestapi
api aspnetcore csharp dotnet entity-framework-core rest-api
Last synced: about 2 months ago
JSON representation
rest api for zoo
- Host: GitHub
- URL: https://github.com/richismyhoo/zoorestapi
- Owner: richismyhoo
- Created: 2025-02-27T14:33:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-27T14:42:25.000Z (over 1 year ago)
- Last Synced: 2025-02-27T20:47:55.966Z (over 1 year ago)
- Topics: api, aspnetcore, csharp, dotnet, entity-framework-core, rest-api
- Language: C#
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZOO REST API
###
Casual basic ready to use REST API for zoo
## endpoints
**/api/animals** `[GET]` - get all animals, answer example
```json
{
{
"id": 1,
"name": "genadiy",
"type": "turtle",
"energy": 70
},
{
"id": 2,
"name": "anton",
"type": "lion",
"energy": 27
}
}
```
**/api/animals/{id}** `[GET]` - get specific animal in zoo, answer example
```json
{
"id": 1,
"name": "genadiy",
"type": "turtle",
"energy": 70
}
```
**/api/animals** `[POST]` - create new animal, energy choosing randomly in range 1 - 100 body json example
```json
{
"name": "genadiy",
"type": "turtle"
}
```
**/api/animals/{id}/feed** `[PUT]` - feed specific animal, energy cant upgrade more than 100, and value of food cant be more than 100, body json example
```json
{
20
}
```
**/api/animals/{id}** `[DELETE]` - delete animal, just returning 204 if successufuly deleted