Physical Infrastructure
Base URL: http://192.168.100.250/
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /physical-infrastructure |
List infrastructure by type |
| GET | /physical-infrastructure/{id} |
Get single infrastructure |
| POST | /physical-infrastructure |
Create infrastructure |
| PUT | /physical-infrastructure/{id} |
Update infrastructure |
| DELETE | /physical-infrastructure/{id} |
Delete infrastructure |
| DELETE | /physical-infrastructure/images/{imageId} |
Delete image |
| POST | /physical-infrastructure/create-type |
Create infrastructure type |
GET /physical-infrastructure?infra_type=buildingAccept: application/jsonQuery Parameters:
| Param | Description | Example |
|---|---|---|
infra_type |
Infrastructure type | building, hostel, land, lab, library, furnitureEquipmentVehicle |
View Single
Section titled “View Single”GET /physical-infrastructure/{id}Accept: application/jsonCreate
Section titled “Create”POST /physical-infrastructureContent-Type: application/jsonRequest Body:
{ "infra_type": "building", "houseName": "Science Block", "areaCoveredByBuilding": 2500, "totalRoom": 20, "totalClassroom": 12, "condition": "Good"}Update
Section titled “Update”PUT /physical-infrastructure/{id}Content-Type: application/jsonRequest Body: Same as Create.
Delete
Section titled “Delete”DELETE /physical-infrastructure/{id}?infra_type=buildingDelete Image
Section titled “Delete Image”DELETE /physical-infrastructure/images/{imageId}Create Infrastructure Type
Section titled “Create Infrastructure Type”POST /physical-infrastructure/create-typeContent-Type: application/jsonRequest Body:
{ "name": "Auditorium"}