Jump to content

API VoIP: Difference between revisions

From Wiki 7Kas
No edit summary
API docs (generated from func=help)
Line 1: Line 1:
==Descripción==
{{Note|New here? Jump to '''[[API help|the self-discovery endpoint]]''' or open the live '''[[API Console|▶ API Console]]''' to try any call with your own key.}}
Nos va a permitir gestionar nuestros datos y servicios contratados en la plataforma VoIP de 7Kas.


==Apartados==
== Overview ==
The 7Kas VoIP REST API exposes query and management functions over CDR, billing, incoming calls, accounts, pay-per-use services, CLIs, Tucloud PBX and WireGuard. '''HTTPS, GET, JSON.'''


=Autenticación=
== Self-discovery (start here) ==
Para autenticarse en la plataforma, es necesario disponer de una APIKey proporcionada por 7Kas. Si no dispones de una, contacta con nosotros, y te facilitaremos una. Esta APIKey debe enviarse en todas las consultas POST/GET como
The API documents itself, filtered by your role:
…/7Kas?func=help&ukey=YOUR_KEY              (full catalogue for your profile)
…/7Kas?func=help&ukey=YOUR_KEY&name=getcdr  (one function)
See '''[[API help]]'''. This wiki is generated from that same source, so it never drifts.


ukey=XXXXXXXXXXXXXXXXXXXXXXX
== Authentication ==
Every call needs an '''API key''' (parameter <code>ukey</code>, max 40) issued by 7Kas. Clients have their identity parameters (accountcode/accountcodeid) forced server-side to their own values.


=Usuarios=
== Response format ==
Funciones que nos ayudan en la gestión de los usuarios del sistema. Altas, bajas, listados...
'''Always HTTP 200'''; on any error (bad/missing func or ukey, validation error, unknown function, task-limit exceeded) the body is <code>{}</code>.
Data functions use <code>FillRecords2JSON</code>:
<nowiki>{ "RecordCount": N, "fields": [...], "1": [...], "2": [...] }</nowiki>
Empty result ⇒ <code>{}</code>. SQL NULL ⇒ JSON <code>null</code>.


[[API Recuperar el ID de un usuario]]
== Limits ==
Recuperamos el ID interno en la plataforma, de un usuario. Necesario para poder llamar a otras funciones en general.
Up to '''10,000''' rows/request from the SHM cache; '''1,000''' from PostgreSQL. Paginate with <code>limit</code>/<code>offset</code>.


[[API Recuperar información de un usuario]]
== Catalogue by profile ==
Nos permite recuperar información general básica de un usuario.
* '''[[API profile SuperRoot]]''' — 40 functions (everything)
* '''[[API profile Operator]]''' — 33 functions
* '''[[API profile Client (of operator)]]''' — 20 functions (client of an operator, root>0)
* '''[[API profile Client (direct)]]''' — 20 functions (direct 7Kas client, root=0)


[[API Bloquear usuario]]
== Try it ==
Podemos impedir que un usuario use los servicios de consumo bloqueandolo.
Open the '''[[API Console]]''': paste your <code>ukey</code>, pick a function, fill parameters and run a real (read-only-safe) call from your browser.


[[API Desbloquear usuario]]
[[Category:API]]
Permitimos de nuevo el consumo de servicios tarificados en general.
 
=CDR=
Puedes consultar los datos del detalle de llamadas con una antigüedad de hasta 7 años. Ya sean llamadas entrantes o salientes, dispones de distintas funciones y modelos para recoger la información. Puedes ver el detalle de estas funciones yendo a
 
[[API CDR Entrantes]]
Recopila información sobre las llamadas recibidas en los CLIs de cliente. Tanto las tarificadas de RI como las no tarificadas.
 
[[API CDR Salientes]]
Computa el detalle de llamadas salientes tarificadas.
 
[[API CDR General]]
Es un CDR común de PBX donde se encuentra todo tipo de llamadas sin filtrar ni tarificar.
 
=CLIs=
Puedes consultar los datos de las líneas asignadas.
 
  [[API CLIs]]
  Recopila información sobre las líneas asignadas, tanto activas y asignadas a un cliente final, como inactivas en el stock o de baja de este como consecuencia de una portabilidad inversa.
 
=IVR Tucloud=
Puedes consultar los datos de las pulsaciones realizadas en las locuciones de las Tucloud.
 
  [[IVR]]
  Recopila información sobre las pulsaciones realizadas en las locuciones de las Tucloud.
 
= Preguntas Frecuentes FAQ =

Revision as of 22:33, 21 July 2026

New here? Jump to the self-discovery endpoint or open the live ▶ API Console to try any call with your own key.

Overview

The 7Kas VoIP REST API exposes query and management functions over CDR, billing, incoming calls, accounts, pay-per-use services, CLIs, Tucloud PBX and WireGuard. HTTPS, GET, JSON.

Self-discovery (start here)

The API documents itself, filtered by your role:

…/7Kas?func=help&ukey=YOUR_KEY              (full catalogue for your profile)
…/7Kas?func=help&ukey=YOUR_KEY&name=getcdr  (one function)

See API help. This wiki is generated from that same source, so it never drifts.

Authentication

Every call needs an API key (parameter ukey, max 40) issued by 7Kas. Clients have their identity parameters (accountcode/accountcodeid) forced server-side to their own values.

Response format

Always HTTP 200; on any error (bad/missing func or ukey, validation error, unknown function, task-limit exceeded) the body is {}. Data functions use FillRecords2JSON:

{ "RecordCount": N, "fields": [...], "1": [...], "2": [...] }

Empty result ⇒ {}. SQL NULL ⇒ JSON null.

Limits

Up to 10,000 rows/request from the SHM cache; 1,000 from PostgreSQL. Paginate with limit/offset.

Catalogue by profile

Try it

Open the API Console: paste your ukey, pick a function, fill parameters and run a real (read-only-safe) call from your browser.