OperatorAPI insert: Difference between revisions
Operator API reference (generated from func=help) |
Operator API reference: multi-line response shape |
||
| Line 20: | Line 20: | ||
== Response == | == Response == | ||
Success is <code>{"ok":true,"data":{...}}</code>; on refusal <code>{"ok":false,"code":"...","message":"..."}</code>. This function's data shape: < | 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":{ | |||
"section":s, | |||
"id":n, | |||
"created":true | |||
} | |||
} | |||
</pre> | |||
== Errors == | == Errors == | ||
Latest revision as of 08:28, 19 August 2026
newadmapi (Operator API) function. Available to: Operator, SuperRoot.
Description
Creates a row in a section. The record fields travel as a JSON body and must be exactly the declared writable set - an unknown or duplicated field is refused BY NAME. The tenant is stamped from your credential and may not be supplied. Requires the group the section declares.
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=insert
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. |
Example
POST https://host:port/newadm?func=insert§ion=bonos body {"name":"Bono 60","price":1.5,"seconds":3600}
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,
"id":n,
"created":true
}
}
Errors
Refusals carry a machine-readable code (branch on the code, never the message). See OperatorAPI#Error codes.
Back to OperatorAPI