Jump to content

OperatorAPI list: Difference between revisions

From Wiki 7Kas
Operator API reference (generated from func=help)
 
Operator API reference: multi-line response shape
 
Line 34: Line 34:


== Response ==
== Response ==
Success is <code>{"ok":true,"data":{...}}</code>; on refusal <code>{"ok":false,"code":"...","message":"..."}</code>. This function's data shape: <code>{"ok":true,"data":{"rows":[...],"page":n,"pagesize":n,"order":s,"dir":s}}</code>.
Success is <code>{"ok":true,"data":{...}}</code>; on refusal <code>{"ok":false,"code":"...","message":"..."}</code>. This function's data shape (<code>n</code> = number, <code>s</code> = string, <code>?</code> = present only when set):
<pre>
{
  "ok":true,
  "data":{
    "rows":[
      ...
    ],
    "page":n,
    "pagesize":n,
    "order":s,
    "dir":s
  }
}
</pre>


== Errors ==
== Errors ==

Latest revision as of 08:28, 19 August 2026

newadmapi (Operator API) function. Available to: Operator, SuperRoot.

Description

Lists any served section. The section names WHICH declaration is used; the declaration decides the relation, the tenant scope, the published fields and what may be sorted or searched. Same engine and same rules as the per-section <section>:list routes, which remain registered.

A generic verb: it works over any section via the section parameter. Discover sections with OperatorAPI sections and a section's fields/capabilities with OperatorAPI options.

Call

GET|POST https://YOUR_HOST:9089/newadm?func=list

Send your API key with every request (header X-API-Key: YOUR_KEY, or Authorization: Bearer YOUR_KEY, or the ukey query parameter).

Parameters

Parameter Type Required Default Meaning
section string Yes The section key, e.g. bonos.
order string No Sort field, from the declared set.
dir string No asc asc or desc.
page integer No 0 Zero-based page.
pagesize integer No 50 Rows per page, 1..500.
filterby string No Field to search, from the declared set.
filter string No Literal substring, case-insensitive.
fields string No Comma-separated subset of the declared fields, in column order. (The same parameter export and print use, so all three agree on what "the current view" is)

Example

https://host:port/newadm?func=list&section=bonos&order=name

Response

Success is {"ok":true,"data":{...}}; on refusal {"ok":false,"code":"...","message":"..."}. This function's data shape (n = number, s = string, ? = present only when set):

{
  "ok":true,
  "data":{
    "rows":[
      ...
    ],
    "page":n,
    "pagesize":n,
    "order":s,
    "dir":s
  }
}

Errors

Refusals carry a machine-readable code (branch on the code, never the message). See OperatorAPI#Error codes.


Back to OperatorAPI