All admin endpoints require authentication with ROLE_GOBIERNO. Access the admin login at
/login/admin.Dashboard
GET /admin/dashboard
Displays the main administrative dashboard. Authentication: Required (ROLE_GOBIERNO) Response: HTML view of the admin dashboardPerson Management
GET /admin/persons
Lists all persons in the system and displays the person creation form. Authentication: Required (ROLE_GOBIERNO) Response: HTML view with list of persons and creation form Model Attributes:people: List of all Person entitiesform: Empty PersonCreateFormidTypes: Available ID types (CC, TI, CE, etc.)
GET /admin/persons/new
Displays the dedicated form for creating a new person. Authentication: Required (ROLE_GOBIERNO) Response: HTML form viewPOST /admin/persons
Creates a new person and their associated folder in the filesystem. Authentication: Required (ROLE_GOBIERNO)Type of identification (CC, TI, CE, etc.)
Identification number
First name
Last name
Email address
Phone number (optional)
Date of birth (optional)
/admin/persons/{id}
Reference: AdminController.java:269
GET /admin/persons/
Displays details of a specific person including their documents and access state. Authentication: Required (ROLE_GOBIERNO)Internal person ID
person: Person entitydocs: List of PersonDocument entitiesuserAccess: UserAccess entity (if user exists)accessStateOptions: Available access states
POST /admin/persons//access-state
Updates the access state for a user associated with a person. Authentication: Required (ROLE_GOBIERNO)Person ID
New access state: ENABLED, SUSPENDED, or DISABLED
Reason for state change (optional)
/admin/persons/{id} with flash message
Synchronization: Automatically syncs state to Indy if configured
Reference: AdminController.java:308
Document Management
POST /admin/persons//upload
Uploads a document for a specific person. Authentication: Required (ROLE_GOBIERNO)Person ID
Document definition ID
Document status (VIGENTE, VENCIDO, etc.)
Document issue date (optional)
Document expiry date (optional)
The document file to upload
/admin/persons/{id}
Reference: AdminController.java:355
POST /admin/person-documents//review
Reviews and updates the status of a person document. Authentication: Required (ROLE_GOBIERNO)PersonDocument ID
Review status: PENDING, APPROVED, or REJECTED
Review notes (optional)
Person ID for redirect
/admin/persons/{personId}
Reference: PersonDocumentAdminController.java:43
Issuer Management
Issuer management endpoints allow administrators to view issuer statistics and manage which document types each issuer is authorized to upload.
GET /admin/issuers
Displays the issuer management dashboard with statistics. Authentication: Required (ROLE_GOBIERNO) Response: HTML view with issuer statistics Model Attributes:stats: Issuer statistics (total issuers, active entities, document counts)
GET /admin/issuers/
Displays detailed view of a specific issuer with document authorization management. Authentication: Required (ROLE_GOBIERNO)Issuer entity ID
issuer: IssuingEntity with assigned documentsallDocs: All available document definitions
POST /admin/issuers//documents/add
Associates a document definition with an issuer, authorizing them to upload that document type. Authentication: Required (ROLE_GOBIERNO)Issuer entity ID
Document definition ID to authorize
/admin/issuers/{id}
Effect: The issuer can now upload documents of the specified type via the issuer portal.
Reference: IssuerAdminController.java:73
POST /admin/issuers//documents/remove
Removes a document definition association from an issuer, revoking their authorization. Authentication: Required (ROLE_GOBIERNO)Issuer entity ID
Document definition ID to revoke
/admin/issuers/{id}
Effect: The issuer can no longer upload documents of the specified type.
Reference: IssuerAdminController.java:88
Reports and Analytics
GET /admin/reports
Displays the administrative dashboard with analytics and blockchain traceability. Authentication: Required (ROLE_GOBIERNO)Start date for analytics (defaults to 30 days ago)
End date for analytics (defaults to today)
Trend granularity: DAY, WEEK, or MONTH
ID type for blockchain trace (optional)
ID number for blockchain trace (optional)
Enable global blockchain trace without specific ID
Active view: analytics or blockchain
GET /admin/reports/pdf
Exports the administrative traceability report as PDF. Authentication: Required (ROLE_GOBIERNO)Start date (optional)
End date (optional)
Trend period
Report view type
ccdigital-reporte-trazabilidad-{from}-{to}.pdf
Reference: AdminController.java:197
GET /admin/reports/block-detail
Retrieves detailed blockchain information for a specific reference. Authentication: Required (ROLE_GOBIERNO)Blockchain network: Fabric or Indy
Blockchain reference (docId or pres_ex_id)
ID type (required for Fabric)
ID number (required for Fabric)
Blockchain network
Original reference
Complete blockchain block details
Synchronization
GET /admin/sync
Displays the synchronization page for Fabric and Indy operations. Authentication: Required (ROLE_GOBIERNO) Response: HTML view with sync options Reference: AdminController.java:377POST /admin/sync/fabric/all
Executes full synchronization of all data to Hyperledger Fabric. Authentication: Required (ROLE_GOBIERNO) Response: HTML view with execution result Process:- Syncs all person documents from database to Fabric ledger
- Executes Node.js script:
sync-db-to-ledger.js - Returns execution output and status
POST /admin/sync/fabric/person
Synchronizes data for a specific person to Hyperledger Fabric. Authentication: Required (ROLE_GOBIERNO)Person’s ID type
Person’s ID number
- Syncs specific person’s documents to Fabric
- Executes Node.js script with person parameters
POST /admin/sync/indy/issue
Issues Indy credentials from database information. Authentication: Required (ROLE_GOBIERNO) Response: HTML view with execution result Process:- Executes Python script:
issue_credentials_from_db.py - Issues verifiable credentials to eligible users
- Returns execution output
Security
Login
Endpoint:/login/admin
Method: POST
Form Parameters:
username: Email or full name (case-insensitive)password: User password
/admin/dashboard
Failure: Redirects to /login/admin?error=true
Logout
Endpoint:/admin/logout
Method: POST
Response: Redirects to /login/admin?logout=true
Session: Invalidated and cookies deleted
Error Handling
Session Expiration
URL Parameter:?expired=true
Trigger: Session timeout or invalid session
Redirect: /login/admin?expired=true
Access Denied
URL Parameter:?denied=true
Trigger: Insufficient permissions
Redirect: /login/admin?denied=true
Session Management
GET /admin/session/keepalive
Keeps the admin session alive during active UI interaction. Authentication: Required (ROLE_GOBIERNO) Response: 204 No Content Usage: Called periodically by frontend to prevent session timeout during active use. Reference: SessionActivityController.java:38GET /admin/session/expire
Explicitly expires the admin session due to client-detected inactivity. Authentication: Required (ROLE_GOBIERNO) Response: 204 No Content Behavior:- Invalidates HTTP session
- Clears Spring Security context
REST API Endpoints
The
/api/** endpoints provide a REST API for programmatic access to persons, documents, and files. These endpoints are restricted to ROLE_GOBIERNO only.GET /api/persons
Lists all persons in the system. Authentication: Required (ROLE_GOBIERNO) Response: JSON array of Person entities Reference: PersonController.java:38GET /api/persons/
Retrieves a specific person by ID. Authentication: Required (ROLE_GOBIERNO)Internal person ID
GET /api/persons//documents
Lists all documents associated with a person. Authentication: Required (ROLE_GOBIERNO)Internal person ID
POST /api/persons//documents
Creates a new document for a person via JSON request. Authentication: Required (ROLE_GOBIERNO)Internal person ID
Document definition ID
Optional notes
GET /api/person-documents/
Retrieves a specific person document by ID. Authentication: Required (ROLE_GOBIERNO)PersonDocument ID
GET /api/person-documents//files/
Downloads or displays a file associated with a person document. Authentication: Required (ROLE_GOBIERNO)PersonDocument ID
File ID
GET /api/document-definitions/
Retrieves a document definition by ID. Authentication: Required (ROLE_GOBIERNO)Document definition ID
