TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM-API/llms.txt
Use this file to discover all available pages before exploring further.
DELETE /api/v1/sidebar/:idItem endpoint permanently removes a sidebar navigation item from the sidebarItems table. The endpoint first checks that the item exists, returning 404 if not found, then performs the deletion. Because the roleXItem table is defined with ON DELETE CASCADE on its foreign key to sidebarItems, all role-to-item assignments for the deleted item are automatically cleaned up by the database — no orphaned rows are left behind.
Authentication
Requires a valid JWT in theAuthorization header. The authenticated user’s role must also have the permission DELETE /api/v1/sidebar/:idItem registered in the permissions table and assigned via permissionXRole.
Request
Method:DELETEPath:
/api/v1/sidebar/:idItem
This endpoint accepts no request body.
Path Parameters
Numeric ID of the sidebar item to delete. Must match the pattern
^\d+$ (digits only). Corresponds to the idItem primary key in the sidebarItems table.Response
200 — Success
The item was found and deleted. The response data isnull since there is nothing to return for a deletion.
Always
true for successful responses.Human-readable confirmation:
"Sidebar item eliminado exitosamente".Always
null for delete operations.400 — Bad Request
Returned when theidItem path parameter is not a valid numeric string.
401 — Unauthorized
Returned when theAuthorization header is missing or the token is invalid/expired.
403 — Forbidden
Returned when the authenticated user’s role does not have theDELETE /api/v1/sidebar/:idItem permission.
404 — Not Found
Returned when no sidebar item with the givenidItem exists in the database. The existence check is performed by findItemById before the deletion is attempted.
Example
Real-time Events
This endpoint emits Socket.IO events throughout the deletion lifecycle:| Event | Stage | Description |
|---|---|---|
sidebar:delete | start | Deletion process initiated for the given item ID |
sidebar:delete | processing | Checking existence, then removing item and cascade assignments |
sidebar:delete | success | Item deleted, payload includes the deleted idItem |