Use this file to discover all available pages before exploring further.
Roles are the primary access-control primitive in the Romsoft Gestión Clínica security model. Every user account in SEG_USUARIO is assigned exactly one role via its id_rol foreign key, and that role determines which system functions the user may access. The SEG_ROL controller exposes a single read-only endpoint that returns all currently active roles — the canonical list to use when populating role selection drop-downs during user creation or update workflows. Role definitions themselves (creation, modification, deactivation) are managed directly at the database level and are not exposed through the API surface.
The SEG_ROL controller exposes onlyGetAllActives. Create, update, and delete operations for roles are managed in the database and are not accessible via the REST API. Treat role data as reference / lookup data.
If an unhandled exception occurs while fetching role data, the controller catches it, logs the error through BaseController.LogError(), and returns a failure envelope:
{ "Success": false, "Warning": false, "Message": "Hubo un error, inténtelo más tarde.", "Data": null}
The most common use of this endpoint is to populate a role drop-down before creating or editing a user. Fetch the active role list once per session and cache it client-side for the duration of the management workflow.
Call GetAllActives when your user management screen loads, then map the returned id_rol → rol pairs into your drop-down. When creating a new user via POST /api/SEG_USUARIO/Add, submit the selected id_rol integer value in the request body.
// Pseudocode — fetch active roles and populate a select elementconst response = await fetch('/api/SEG_ROL/GetAllActives', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }});const { Success, Data } = await response.json();if (Success && Data) { const roleOptions = Data.map(r => ({ value: r.id_rol, label: `${r.rol} — ${r.descripcion}` })); // bind roleOptions to your UI select component}