Spaces represent the physical venues — classrooms, auditoriums, labs, and meeting rooms — that belong to a specific faculty tenant. Every event in UniEvents must be assigned to a space, and a space is always scoped to the tenant that owns it. Spaces cannot be shared across faculties: eachDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Edfermachado/proyectoSistemas/llms.txt
Use this file to discover all available pages before exploring further.
tenantId is fixed at creation time and cannot be changed via PUT. All CRUD operations are handled by SpacesService, which queries the spaces table through Drizzle ORM.
GET /api/spaces
Returns all spaces that belong to a given tenant, ordered by creation date (newest first).Query Parameters
The UUID of the tenant (faculty) whose spaces you want to retrieve. Returns
400 if omitted.Response 200
Returns a JSON array of space objects. An empty array is returned when the tenant has no spaces yet.
UUID of the space.
Human-readable name of the venue (e.g.
"Auditorium A", "Lab 302").Maximum number of attendees the space can hold.
UUID of the owning tenant. Spaces are never shared across tenants.
ISO 8601 timestamp of when the space was created.
Error Responses
| Status | Body | Reason |
|---|---|---|
400 | { "error": "Missing tenantId param" } | tenantId query parameter was not provided. |
500 | { "error": "Internal Server Error" } | Unexpected database or server error. |
POST /api/spaces
Creates a new space and associates it with the specified tenant.Request Body
The display name for the venue. Must be non-empty.
The maximum number of attendees the space can hold. Must be a positive integer.
UUID of the tenant (faculty) that owns this space. This value is set at creation and cannot be updated later.
Response 201
Returns the newly created space object.
Auto-generated UUID for the new space.
Name of the space as provided.
Capacity as provided.
UUID of the owning tenant.
ISO 8601 timestamp set by the database on insert.
Error Responses
| Status | Body | Reason |
|---|---|---|
500 | { "error": "Internal Server Error" } | Unexpected database or server error. |
GET /api/spaces/{id}
Returns a single space by its UUID.Path Parameters
UUID of the space to retrieve.
Response 200
UUID of the space.
Display name of the venue.
Maximum attendee capacity.
UUID of the owning tenant.
ISO 8601 creation timestamp.
Error Responses
| Status | Body | Reason |
|---|---|---|
404 | { "error": "Not found" } | No space exists with the given id. |
500 | { "error": "Internal Server Error" } | Unexpected server error. |
PUT /api/spaces/{id}
Partially updates a space’sname and/or capacity. The tenantId is immutable and cannot be changed through this endpoint.
Path Parameters
UUID of the space to update.
Request Body
New display name for the venue. Omit to leave unchanged.
New capacity value. Omit to leave unchanged.
Response 200
Returns the updated space object.
UUID of the space.
Updated (or unchanged) display name.
Updated (or unchanged) capacity.
UUID of the owning tenant (unchanged).
Original ISO 8601 creation timestamp.
Error Responses
| Status | Body | Reason |
|---|---|---|
500 | { "error": "Internal Server Error" } | Unexpected server error. |
DELETE /api/spaces/{id}
Permanently deletes a space. This operation is irreversible. Deleting a space that is still referenced by active events will cause a database foreign-key constraint error.Path Parameters
UUID of the space to delete.
Response 204
Empty body. The space has been deleted.
Error Responses
| Status | Body | Reason |
|---|---|---|
500 | { "error": "Internal Server Error" } | Unexpected server error or FK constraint violation. |
Spaces belong to a single tenant and cannot be shared across faculties. The
tenantId is set at creation time (via POST) and is not exposed as an editable field on PUT. Attempting to move a space to a different tenant requires deleting and recreating it.