Overview
The Credentials Management API allows you to create, update, and manage employee credentials (accounts/badges) for accessing various systems and facilities. This includes managing credential types and associating credentials with employees, departments, and units.Understanding Credentials
Credentials in the Integra system represent:- Access badges for physical locations
- System login accounts
- Department-specific access credentials
- Unit-based authentication tokens
- A credential type (badge type, account type)
- An employee or department
- A specific unit/location
- Optional username and password
Creating Credentials
Register new credentials for employees or departments.Prepare credential data
Endpoint: Required Fields:
POST /credencialesRequest Body:usuario- Username/credential identifier (required, cannot be empty)idTipoCuenta- Credential type ID (required)idDepartamento- Department ID associated with the credential (required)idUnidad- Unit ID where credential is valid (required)
clave- Password or access codenota- Additional notes or description
Retrieving Credentials
Query existing credentials using various filters.Apply filters
Endpoint:
GET /credencialesQuery Parameters:idTipo- Filter by credential type IDidDepartamento- Filter by department IDidUnidad- Filter by unit ID
Execute query
Example: Get all credentials for a departmentExample: Get credentials by type and unitExample: Get all credentials for a specific unit
Updating Credentials
Modify existing credential information.Prepare update data
Endpoint: All fields from the creation request can be updated.
PUT /credenciales/{id}Path Parameters:id- Credential ID to update
Deleting Credentials
Remove credentials that are no longer needed.Managing Credential Types
Credential types define different categories of access credentials (e.g., employee badge, supervisor access, admin account).Viewing Credential Types
Creating Credential Types
Define new type
Endpoint: Required Fields:
POST /credenciales/tipoRequest Body:nombre- Type name (required, cannot be empty)
Updating Credential Types
Update type information
Endpoint:
PUT /credenciales/tipo/{id}Path Parameters:id- Credential type ID
Deleting Credential Types
Remove credential type
Endpoint:
DELETE /credenciales/tipo/{id}Path Parameters:id- Credential type ID to delete
Common Use Cases
Creating Employee Badge Credentials
Creating System Login Accounts
Querying Credentials by Department
Updating Credential Password
Best Practices
Security
- Use strong passwords for credential
clavefield - Regularly update passwords for system accounts
- Delete credentials immediately when employees leave
- Assign appropriate credential types based on access needs
Organization
- Use meaningful usernames that identify the credential purpose
- Document credential assignments in the
notafield - Group credentials by department for easier management
- Create specific credential types for different access levels
Maintenance
- Periodically audit credentials by department and unit
- Remove unused credential types
- Update credential information when employees change roles
- Maintain consistent naming conventions for usernames
Reference
Controller:CredencialController.java at /credenciales/controller/CredencialController.java:1
Related Models:
NuevaCuenta.java- Credential creation/update requestTipoCuenta.java- Credential type modelFiltroCuenta- Credential filter parametersCuentaEntityDto- Credential query response
Next Steps
Employee Management
Associate credentials with employees
Attendance Recording
Use credentials for attendance tracking