Skip to main content

Overview

The ICP System frontend communicates with a single backend REST API. Every request is sent through the shared Axios instance in src/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:
Authorization: Bearer <access_token>

Standard response envelope

Most list and mutation endpoints return a consistent response shape:
{
  "ok": true,
  "message": "Operación exitosa",
  "count": 42,
  "items": []
}
FieldTypeDescription
okbooleantrue on success, false on application-level failure
messagestring (optional)Human-readable status or error message
countnumber (optional)Total number of records available (before pagination)
itemsarray (optional)Page of result objects

Sample authenticated request

curl -X GET "https://misidev.space/api/v1/proveedores/listar?limit=10&offset=0" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json"

Endpoints by resource

MethodPathDescription
POST/v1/auth/loginAuthenticate with username and password. Returns { ok, access_token }.
GET/v1/auth/meReturn the currently authenticated user’s profile and assigned roles.
GET/v1/auth/usersList all registered users. ADMIN role required.
Login request body
{
  "username": "admin",
  "password": "secret"
}
Login response
{
  "ok": true,
  "access_token": "eyJhbGci..."
}
/v1/auth/me response
{
  "ok": true,
  "user": {
    "usuario_id": 1,
    "username": "admin",
    "email": "admin@example.com",
    "is_active": true,
    "roles": ["ADMIN", "NOC"]
  }
}
MethodPathDescription
GET/v1/proveedores/listarPaginated list of providers.
GET/v1/proveedores/:idGet a single provider by ID.
POST/v1/proveedores/crearCreate a new provider.
PUT/v1/proveedores/editarUpdate an existing provider (ID sent in body).
DELETE/v1/proveedores/eliminar/:idSoft-delete a provider (marks as inactive).
GET/v1/proveedores/listar/selectLightweight list for dropdown population — returns each provider with its associated services.
GET /v1/proveedores/listar query parameters
ParameterTypeDescription
busquedastringFree-text search across provider name / RUC
estado0 | 1Filter by active (1) or inactive (0) status
limitnumberPage size
offsetnumberPagination offset
PUT /v1/proveedores/editar request body
{
  "proveedor_id": 5,
  "nombre": "Proveedor Actualizado",
  "ruc": "20123456789",
  "contacto_soporte": "soporte@proveedor.com",
  "sla_soporte": 4,
  "is_active": 1
}
MethodPathDescription
GET/v1/servicios-proveedor/listarPaginated list of provider services.
POST/v1/servicios-proveedor/crearCreate a new provider service.
PUT/v1/servicios-proveedor/servicios-proveedor/:idUpdate a provider service by ID.
POST/v1/servicios-proveedor/:id/ajustar-capacidadAdjust the available capacity of a service by a delta value.
GET/v1/servicios-proveedor/:id/conexionesGet a service together with all its associated connections.
GET/v1/servicios-proveedor/next-cidGet the next available internal CID number.
GET/v1/servicios-proveedor/proveedor/:idList all services belonging to a specific provider.
GET /v1/servicios-proveedor/listar query parameters
ParameterTypeDescription
searchstringFree-text search
limitnumberPage size
offsetnumberPagination offset
POST /v1/servicios-proveedor/:id/ajustar-capacidad request body
{
  "delta_disponible": -50,
  "motivo": "Venta de nuevo enlace cliente XYZ"
}
A positive delta_disponible increases available capacity; a negative value decreases it.
MethodPathDescription
GET/v1/nodos/listarPaginated list of nodes.
GET/v1/nodos/:idGet node detail including associated services and equipment IDs.
POST/v1/nodos/crearCreate a new node.
PATCH/v1/nodos/:idPartially update a node.
GET/v1/nodos/listar/selectLightweight node list for dropdown population.
GET /v1/nodos/listar query parameters
ParameterTypeDescription
searchstringFree-text search by name or location
limitnumberPage size
offsetnumberPagination offset
GET /v1/nodos/:id response shape
{
  "ok": true,
  "message": "ok",
  "item": {
    "nodo_id": 12,
    "nombre": "Nodo Lima Norte",
    "tipo_nodo": "POP",
    "departamento": "Lima",
    "provincia": "Lima",
    "distrito": "Independencia",
    "latitud": "-11.9854",
    "longitud": "-77.0311",
    "estado": 1,
    "equipos_ids": [3, 7, 11],
    "servicios": []
  }
}
MethodPathDescription
GET/v1/conexiones/listarPaginated list of connections (enlaces).
GET/v1/conexiones/:idGet a connection by its enlace_id.
POST/v1/conexionesCreate a new connection.
PUT/v1/conexiones/:idUpdate an existing connection.
GET/v1/conexiones/listar/selectLightweight connection list for dropdown population.
GET /v1/conexiones/listar query parameters
ParameterTypeDescription
limitnumberPage size
offsetnumberPagination offset
POST /v1/conexiones request body (key fields)
{
  "nodo_a": 3,
  "configuracion_nodo_a": "PE",
  "nodo_b": 7,
  "configuracion_nodo_b": "CE",
  "tipo_enlace": "FIBRA",
  "modalidad_enlace": "DEDICADO",
  "cliente_id": 21,
  "servicio_id": 5,
  "departamento_enlace": "Lima",
  "provincia_enlace": "Lima",
  "distrito_enlace": "Miraflores",
  "direccion_enlace": "Av. Larco 123",
  "estado": "ACTIVO",
  "fecha_activacion": "2025-01-15",
  "bw_contratado": 100,
  "cid": "CID-00042"
}
MethodPathDescription
GET/v1/equipo_principal/listarPaginated list of network equipment.
GET/v1/equipo_principal/:idGet full equipment detail including node, link, and SNMP fields.
POST/v1/equipo_principal/crearRegister new equipment.
PUT/v1/equipo_principal/:idUpdate equipment fields.
POST/v1/equipo_principal/crear/catalogo/equiposCreate a new entry in the equipment catalog (type / brand / model).
GET/v1/equipo_principal/catalogo/equiposList all catalog entries (types, brands, models).
GET/v1/equipo_principal/select/equiposLightweight equipment list for dropdown population.
GET /v1/equipo_principal/listar query parameters
ParameterTypeDescription
limitnumberPage size
offsetnumberPagination offset
searchstringFree-text search by name, serial, or IP
POST /v1/equipo_principal/crear request body
{
  "nodo_id": 12,
  "enlace_id": null,
  "tipo_id": 2,
  "marca_id": 1,
  "modelo_id": 4,
  "serial": "SN-ABC-001",
  "usuario_gestion": "admin",
  "password_gestion": "secret"
}
MethodPathDescription
POST/v1/importacion/listar-columnasUpload an Excel file (multipart/form-data) and receive a per-sheet column summary.
POST/v1/importacion/listar-hoja-datosUpload an Excel file and receive the rows from the first sheet that matches the required column set.
Both endpoints accept a multipart/form-data body with a single file field containing the .xlsx file.POST /v1/importacion/listar-columnas response shape
{
  "Hoja1": [
    { "nombre": "CID", "tipo": "object", "nulos": 0 },
    { "nombre": "PROVEEDOR", "tipo": "object", "nulos": 2 }
  ]
}
Required columns for /v1/importacion/listar-hoja-datosCID, ID PROVEEDOR, PROVEEDOR, CONDICION, MODALIDAD, DESTINO, CAPACIDAD COMPRADA, OBSERVACIÓN, CAPACIDAD VENDIDA, OBSERVACION DE VENTA, CAPACIDAD ACTUAL