Infrastructure
Physical Infrastructure
Infrastructure Management APIs
Base URL: http://192.168.100.250/
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 |
List
GET /physical-infrastructure?infra_type=building
Accept: application/jsonQuery Parameters:
| Param | Description | Example |
|---|---|---|
infra_type | Infrastructure type | building, hostel, land, lab, library, furnitureEquipmentVehicle |
Response includes infrastructure_types map, counts, columns (field definitions), and results.
View Single
GET /physical-infrastructure/{id}
Accept: application/jsonResponse includes type, images array, and campus relation.
Create
POST /physical-infrastructure
Content-Type: application/jsonRequest Body:
{
"infra_type": "building",
"houseName": "Science Block",
"areaCoveredByBuilding": 2500,
"totalRoom": 20,
"totalClassroom": 12,
"condition": "Good"
}Fields vary by infra_type. See Infrastructure Types for field definitions per type.
Update
PUT /physical-infrastructure/{id}
Content-Type: application/jsonRequest Body: Same as Create.
Delete
DELETE /physical-infrastructure/{id}?infra_type=buildingDelete Image
DELETE /physical-infrastructure/images/{imageId}Create Infrastructure Type
POST /physical-infrastructure/create-type
Content-Type: application/jsonRequest Body:
{
"name": "Auditorium"
}