URL Base |
---|
http://localhost:8080 |
Método | Rota |
---|---|
POST | /districts |
{
"district_name": "Laranjeiras",
"value_district_m2": "400"
}
Success status: 201 Created
{
"district_id": 1,
"district_name": "Laranjeiras",
"value_district_m2": 400
}
Método | Rota |
---|---|
POST | /properties |
{
"prop_name": "Fazenda Boa Vista",
"prop_district_id": 1,
"rooms": [
{
"room_name": "Sala de estar",
"room_width": 20,
"room_length": 20
},
{
"room_name": "Cozinha",
"room_width": 30,
"room_length": 30
}
]
}
Success status: 201 Created
{
"prop_id": 1,
"prop_name": "Fazenda Boa Vista",
"prop_district": "Laranjeiras",
"value_district_m2": 400,
"rooms": [
{
"room_name": "Sala de estar",
"room_width": 20.0,
"room_length": 20.0
},
{
"room_name": "Cozinha",
"room_width": 30.0,
"room_length": 30.0
}
]
}
Método | Rota |
---|---|
GET | /properties/total_m2/{propertyId} |
empty
Success status: 200 OK
{
"total_m2": 1300.0
}
Método | Rota |
---|---|
GET | /properties/value/{propertyId} |
empty
Success status: 200 OK
{
"value": 520000.0
}
Método | Rota |
---|---|
GET | /properties/{propertyId}/largest_room |
empty
Success status: 200 OK
{
"largest_room": {
"name": "Cozinha",
"width": 30.0,
"length": 30.0
}
}
Método | Rota |
---|---|
GET | /properties/{propertyId}/rooms_m2 |
empty
Success status: 200 OK
{
"rooms": [
{
"room_name": "Sala de estar",
"room_width": 20.0,
"room_length": 20.0,
"total_m2": 400.0
},
{
"room_name": "Cozinha",
"room_width": 30.0,
"room_length": 30.0,
"total_m2": 900.0
}
]
}