OperatorAPI options
newadmapi (Operator API) function. Available to: Operator, SuperRoot.
Description
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. func=help describes the FUNCTIONS; this describes a section, because with one engine over many sections "what may I do here" is a property of the section rather than of the verb. Computed from the same declarations the routes enforce, so a panel built from it cannot offer what the route refuses.
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=options
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. |
Example
https://host:port/newadm?func=options§ion=bonos
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":{
"section":s,
"scope":s,
"default_order":s,
"fields":[
{
"name":s,
"type":s,
"sortable":b,
"searchable":b
}
],
"writable":[
{
"name":s,
"type":s,
"required":b,
"immutable":b
}
],
"write_groups":{
...
}|null,
"can":{
"insert":b,
"update":b,
"delete":b,
"import":b
},
"export":{
...
},
"delete":{
...
}
}
}
Errors
Refusals carry a machine-readable code (branch on the code, never the message). See OperatorAPI#Error codes.
Back to OperatorAPI