Jump to content

OperatorAPI

From Wiki 7Kas
(Redirected from Operator api)
New here? Start with the self-discovery endpoint. This whole reference is generated from the service's own func=help, so it never drifts from the code.

Overview

Operator API (newadmapi / Helm) is the REST API a brand operator uses to manage its services. HTTPS, GET or POST, JSON. One route, one dispatch parameter:

https://YOUR_HOST:9089/newadm?func=NAME&...

Authentication

Every request carries your API key - as X-API-Key: YOUR_KEY, Authorization: Bearer YOUR_KEY, or the ukey query parameter. The key identifies the operator and its tenant (root); the service NEVER trusts a tenant supplied in the request body. Write paths always stamp the caller's own root.

Response envelope

Every answer is a JSON envelope. Success: {"ok":true,"data":{...}} (an empty result set is still ok:true). Refusal: {"ok":false,"code":"...","message":"..."}. Branch on code, never on the message text - the message is human-facing and may change; the code is the contract.

Error codes

Code Meaning
auth_missing no API key was sent
auth_invalid the key is not valid
auth_busy the key's concurrency limit is reached - retry later
forbidden the key's role may not do this
readonly this key may only read
unknown_func no such function
invalid_param a value is out of range or the wrong type (named)
unknown_param a field that is not part of this section/function
count_mismatch a bulk delete's stated count did not match the set
server_busy the pool is momentarily exhausted - retry later
server_error a server-side fault; retrying the same request will not help

How the sections work

Most data lives in sections (bonos, cli, tucloudpbx, didstock, ...). Two discovery calls, then the generic verbs:

Functions

Discovery & meta

  • OperatorAPI help — Lists the API functions this key's role may call, with parameters, an example and the response shape.

Generic verbs (over any section)

  • OperatorAPI delete — Removes one row, addressed by id, within your tenant.
  • OperatorAPI export — The SAME query as list, rendered as a delimited file.
  • OperatorAPI get — One row of a section, by id, tenant-scoped and projected through the SAME declared field list as list - so an edit form can never receive a column the grid would not show.
  • OperatorAPI insert — Creates a row in a section.
  • OperatorAPI list — Lists any served section.
  • OperatorAPI lookup — One writable field's picker, served for a GIVEN root instead of baked into the func=options contract for your own.
  • OperatorAPI options — What a SECTION offers, and what THIS caller may do with it: the readable fields with their types and whether each is sortable or searchable, the writable fields with required/immutable, the group writes demand, the export choices, and what a delete would cascade to.
  • OperatorAPI sections — Every section this service serves, with what each offers and what THIS caller may do with it.
  • OperatorAPI update — Changes declared fields of one row, addressed by id.

Login & session

  • OperatorAPI login — Exchanges an operator ukey for a short, revocable session.
  • OperatorAPI poll — Polls a login started with func=request.
  • OperatorAPI request — Starts an operator login.
  • OperatorAPI session:menu — The menu this operator may see, NESTED as the legacy renders it: the rows of web_menus for their root, filtered by their groups, built into containers and leaves.

PBX / TuCloud

Platform

Rates

Tariffs

Billing

Bundles (bonos)

SIP

Payments

Customers

Generated from func=help as the operator role. Regenerate after any change to the service's registered functions.