EMS-UGC API Docs
Infrastructure

Physical Infrastructure

Infrastructure Management APIs

Base URL: http://192.168.100.250/


Endpoints

MethodEndpointDescription
GET/physical-infrastructureList infrastructure by type
GET/physical-infrastructure/{id}Get single infrastructure
POST/physical-infrastructureCreate infrastructure
PUT/physical-infrastructure/{id}Update infrastructure
DELETE/physical-infrastructure/{id}Delete infrastructure
DELETE/physical-infrastructure/images/{imageId}Delete image
POST/physical-infrastructure/create-typeCreate infrastructure type

List

GET /physical-infrastructure?infra_type=building
Accept: application/json

Query Parameters:

ParamDescriptionExample
infra_typeInfrastructure typebuilding, hostel, land, lab, library, furnitureEquipmentVehicle

Response includes infrastructure_types map, counts, columns (field definitions), and results.


View Single

GET /physical-infrastructure/{id}
Accept: application/json

Response includes type, images array, and campus relation.


Create

POST /physical-infrastructure
Content-Type: application/json

Request 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/json

Request Body: Same as Create.


Delete

DELETE /physical-infrastructure/{id}?infra_type=building

Delete Image

DELETE /physical-infrastructure/images/{imageId}

Create Infrastructure Type

POST /physical-infrastructure/create-type
Content-Type: application/json

Request Body:

{
  "name": "Auditorium"
}

On this page