Jump to content

API VoIP: Difference between revisions

From Wiki 7Kas
API docs (generated from func=help)
 
(20 intermediate revisions by 2 users not shown)
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, call recordings (audio/transcripts/certification), 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.


== Consultas CDR ==
== Response format ==
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
'''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 CDR Entrantes]] Recopila información sobre las llamadas recibidas en los CLIs de cliente. Tanto las tarificadas de RI como las no tarificadas.
== Limits ==
Up to '''10,000''' rows/request from the SHM cache; '''1,000''' from PostgreSQL. Paginate with <code>limit</code>/<code>offset</code>.


[[API CDR Salientes]] Computa el detalle de llamadas salientes tarificadas.
== Catalogue by profile ==
* '''[[API profile SuperRoot]]''' — 44 functions (everything)
* '''[[API profile Operator]]''' — 37 functions
* '''[[API profile Client (of operator)]]''' — 24 functions (client of an operator, root>0)
* '''[[API profile Client (direct)]]''' — 24 functions (direct 7Kas client, root=0)


[[API CDR General]] Es un CDR común de PBX donde se encuentra todo tipo de llamadas sin filtrar ni tarificar.
== Try it ==
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.


= Preguntas Frecuentes FAQ =
[[Category:API]]

Latest revision as of 07:39, 23 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, call recordings (audio/transcripts/certification), 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.