/api/perfil
Creates a new profile record. If bitAdministrador is true, full permissions (bitAgregar, bitEditar, bitConsulta, bitEliminar, bitDetalle) are automatically created in the permisos_perfil table for every existing module.
Request body
Name of the new profile. Cannot be empty or whitespace-only.
Whether this profile has administrator-level access. When
true, full permissions are automatically granted for all existing modules.Response
true when the profile is created successfully.The newly created profile record as returned by the database.
Error responses
| Status | Message | Cause |
|---|---|---|
400 | El nombre del perfil es obligatorio | strNombrePerfil is missing or is an empty/whitespace string. |
500 | No se pudo obtener el perfil recién creado | The INSERT statement succeeded but the RETURNING clause returned no rows. |
500 | Ocurrió un error interno al crear el perfil | Any other unhandled database error. |
Examples
Success response
200
Error response (400)
400