Overview
The ICP System frontend communicates with a single backend REST API. Every request is sent through the shared Axios instance insrc/shared/api/http.ts with the base path /api.
All endpoints (except
POST /v1/auth/login) require a valid Bearer token. The token is attached automatically by the request interceptor in http.ts:Standard response envelope
Most list and mutation endpoints return a consistent response shape:| Field | Type | Description |
|---|---|---|
ok | boolean | true on success, false on application-level failure |
message | string (optional) | Human-readable status or error message |
count | number (optional) | Total number of records available (before pagination) |
items | array (optional) | Page of result objects |
Sample authenticated request
Endpoints by resource
Authentication
Authentication
| Method | Path | Description |
|---|---|---|
POST | /v1/auth/login | Authenticate with username and password. Returns { ok, access_token }. |
GET | /v1/auth/me | Return the currently authenticated user’s profile and assigned roles. |
GET | /v1/auth/users | List all registered users. ADMIN role required. |
/v1/auth/me responseProviders (Proveedores)
Providers (Proveedores)
| Method | Path | Description |
|---|---|---|
GET | /v1/proveedores/listar | Paginated list of providers. |
GET | /v1/proveedores/:id | Get a single provider by ID. |
POST | /v1/proveedores/crear | Create a new provider. |
PUT | /v1/proveedores/editar | Update an existing provider (ID sent in body). |
DELETE | /v1/proveedores/eliminar/:id | Soft-delete a provider (marks as inactive). |
GET | /v1/proveedores/listar/select | Lightweight list for dropdown population — returns each provider with its associated services. |
GET /v1/proveedores/listar query parameters| Parameter | Type | Description |
|---|---|---|
busqueda | string | Free-text search across provider name / RUC |
estado | 0 | 1 | Filter by active (1) or inactive (0) status |
limit | number | Page size |
offset | number | Pagination offset |
PUT /v1/proveedores/editar request bodyProvider Services (Servicios de Proveedor)
Provider Services (Servicios de Proveedor)
| Method | Path | Description |
|---|---|---|
GET | /v1/servicios-proveedor/listar | Paginated list of provider services. |
POST | /v1/servicios-proveedor/crear | Create a new provider service. |
PUT | /v1/servicios-proveedor/servicios-proveedor/:id | Update a provider service by ID. |
POST | /v1/servicios-proveedor/:id/ajustar-capacidad | Adjust the available capacity of a service by a delta value. |
GET | /v1/servicios-proveedor/:id/conexiones | Get a service together with all its associated connections. |
GET | /v1/servicios-proveedor/next-cid | Get the next available internal CID number. |
GET | /v1/servicios-proveedor/proveedor/:id | List all services belonging to a specific provider. |
GET /v1/servicios-proveedor/listar query parameters| Parameter | Type | Description |
|---|---|---|
search | string | Free-text search |
limit | number | Page size |
offset | number | Pagination offset |
POST /v1/servicios-proveedor/:id/ajustar-capacidad request bodydelta_disponible increases available capacity; a negative value decreases it.Nodes (Nodos)
Nodes (Nodos)
| Method | Path | Description |
|---|---|---|
GET | /v1/nodos/listar | Paginated list of nodes. |
GET | /v1/nodos/:id | Get node detail including associated services and equipment IDs. |
POST | /v1/nodos/crear | Create a new node. |
PATCH | /v1/nodos/:id | Partially update a node. |
GET | /v1/nodos/listar/select | Lightweight node list for dropdown population. |
GET /v1/nodos/listar query parameters| Parameter | Type | Description |
|---|---|---|
search | string | Free-text search by name or location |
limit | number | Page size |
offset | number | Pagination offset |
GET /v1/nodos/:id response shapeConnections (Conexiones / Enlaces)
Connections (Conexiones / Enlaces)
| Method | Path | Description |
|---|---|---|
GET | /v1/conexiones/listar | Paginated list of connections (enlaces). |
GET | /v1/conexiones/:id | Get a connection by its enlace_id. |
POST | /v1/conexiones | Create a new connection. |
PUT | /v1/conexiones/:id | Update an existing connection. |
GET | /v1/conexiones/listar/select | Lightweight connection list for dropdown population. |
GET /v1/conexiones/listar query parameters| Parameter | Type | Description |
|---|---|---|
limit | number | Page size |
offset | number | Pagination offset |
POST /v1/conexiones request body (key fields)Equipment (Equipos Principales)
Equipment (Equipos Principales)
| Method | Path | Description |
|---|---|---|
GET | /v1/equipo_principal/listar | Paginated list of network equipment. |
GET | /v1/equipo_principal/:id | Get full equipment detail including node, link, and SNMP fields. |
POST | /v1/equipo_principal/crear | Register new equipment. |
PUT | /v1/equipo_principal/:id | Update equipment fields. |
POST | /v1/equipo_principal/crear/catalogo/equipos | Create a new entry in the equipment catalog (type / brand / model). |
GET | /v1/equipo_principal/catalogo/equipos | List all catalog entries (types, brands, models). |
GET | /v1/equipo_principal/select/equipos | Lightweight equipment list for dropdown population. |
GET /v1/equipo_principal/listar query parameters| Parameter | Type | Description |
|---|---|---|
limit | number | Page size |
offset | number | Pagination offset |
search | string | Free-text search by name, serial, or IP |
POST /v1/equipo_principal/crear request bodyImport (Importación)
Import (Importación)
| Method | Path | Description |
|---|---|---|
POST | /v1/importacion/listar-columnas | Upload an Excel file (multipart/form-data) and receive a per-sheet column summary. |
POST | /v1/importacion/listar-hoja-datos | Upload an Excel file and receive the rows from the first sheet that matches the required column set. |
multipart/form-data body with a single file field containing the .xlsx file.POST /v1/importacion/listar-columnas response shape/v1/importacion/listar-hoja-datosCID, ID PROVEEDOR, PROVEEDOR, CONDICION, MODALIDAD, DESTINO, CAPACIDAD COMPRADA, OBSERVACIÓN, CAPACIDAD VENDIDA, OBSERVACION DE VENTA, CAPACIDAD ACTUAL