List permissions
GET/api/permisos
Returns a paginated list of permission records joined with profile and module names. Results are ordered by id ascending with a fixed page size of 5 records.
Query parameters
number
default:"1"
Page number to retrieve. Defaults to
1.Response
boolean
required
true when the query completes without error.object[]
required
Array of permission records for the requested page.
number
required
Total number of pages calculated as
ceil(totalRows / 5). Returns 1 when the table is empty.Error response
500
Examples
Success response
200
Create permission
POST/api/permisos
Creates a single permission record linking a profile to a module with specific action flags.
Request body
number
required
ID of the profile to assign permissions to.
number
required
ID of the module the permissions apply to.
boolean
default:"false"
Grant create access.
boolean
default:"false"
Grant edit access.
boolean
default:"false"
Grant read/list access.
boolean
default:"false"
Grant delete access.
boolean
default:"false"
Grant detail-view access.
Response
boolean
required
true when the record is inserted successfully.object
required
The newly created
permisos_perfil row as returned by the database RETURNING clause.Error responses
Examples
Success response
200
Update permission
PUT/api/permisos/:id
Replaces all fields on an existing permission record. You must supply the full set of fields — any boolean omitted is coerced to false.
Path parameters
number
required
Primary key of the
permisos_perfil row to update.Request body
number
required
ID of the profile.
number
required
ID of the module.
boolean
Grant create access.
boolean
Grant edit access.
boolean
Grant read/list access.
boolean
Grant delete access.
boolean
Grant detail-view access.
Response
boolean
required
true when the update completes.object
required
The updated
permisos_perfil row as returned by the database RETURNING clause.Examples
Success response
200
Delete permission
DELETE/api/permisos/:id
Permanently removes a single permission record from the permisos_perfil table.
Path parameters
number
required
Primary key of the
permisos_perfil row to delete.Response
boolean
required
true when the delete completes.string
required
Always
"Eliminado correctamente".Examples
Success response
200