Parking Lot API Documentation

Base URL - Hosted via Render at https://api-service-i1ms.onrender.com/

The Parking Lot API helps you manage parking lots, floors, sections and parking spaces from a single service. It also includes diagnostics, a lightweight health ping, and event-streaming endpoints to support operations dashboards and real-time client updates.

Use the endpoint tables below for a quick reference, and use the sample request bodies when testing create/update operations from Postman, curl, or your frontend integration.

Lot, floor, and section creation is handled outside the public API. Operational writes are limited to parking-space updates.

Enforced capacity limits: parking lots have no count limit, each parking lot can have up to 6 floors, each floor can have up to 10 sections, and each section can have up to 10 parking spaces.

GET POST PUT DELETE

Floors

Floor-level data within a parking lot.

Method Endpoint Description
GET /api/floors Get all floors.
GET /api/floors/{id} Get a floor by ID.

Sections

Sections group parking spaces on a floor.

Method Endpoint Description
GET /api/sections Get all sections.
GET /api/sections/{id} Get a section by ID.

Parking Lots

Top-level parking lot management and floor details.

Method Endpoint Description
GET /api/lots Get all parking lots.
GET /api/lots/{id} Get a parking lot by ID.
GET /api/lots/{lotId}/floors/{floorId}/details Get details for a specific floor in a parking lot.

Parking Spaces

Parking-space records and updates.

Method Endpoint Description
GET /api/spaces Get all parking spaces.
GET /api/spaces/{id} Get a parking space by ID.
PUT /api/spaces/{id} Update an existing parking space.
DELETE /api/spaces/{id} Remove a car from a parking space.

Diagnostics and Events

Runtime visibility and server-sent floor events.

Method Endpoint Description
GET /api/diagnostics/ping Lightweight health ping for quick liveness checks.
GET /api/diagnostics/api Get API diagnostics and runtime details.
GET /api/diagnostics/database Get database diagnostics and connection details.
GET /api/lots/{lotId}/floors/{floorId}/events Subscribe to real-time floor events as a server-sent event stream. Events include ADD, UPDATE, and REMOVE operations.

Sample JSON Request Bodies

For nested references, provide existing entity IDs such as parkingSpace.id or section.id.

PUT

/api/spaces/{id}

{
  "number": "A-21",
  "clearCar": false
}
DELETE

/api/spaces/{id}

// No request body required
// Removes the car from the parking space