POST /public/shared/{token}/ops
Aplica batch de ops tipadas com LWW (Fase C).
- Access: Public (link or signature)
- Service:
https://api-flow.axuz.net
Accepted authentication
No authentication (public route, or protected by link/signature).
Cada batch aceito bumpa flowcharts.version uma vez e insere N rows em flowchart_op_log. Ver ADR-0006 (LWW) + internal/ops.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | path | string | yes | 16 bytes hex (2^128 espaço). |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
ops | array<FlowOp> | yes | |
ops[].client_id | string | yes | |
ops[].type | string | yes | enum: |
ops[].entity_id | string | yes | |
ops[].ts | integer | yes | Client-side ms epoch. Clampado em [server_now-60s, server_now+60s]. |
ops[].patch | object | no | |
ops[].payload | object | no |
{
"ops": [
{
"client_id": "string",
"type": "node.add",
"entity_id": "string",
"ts": 1,
"patch": {},
"payload": {}
}
]
}Responses
200
Batch processado (accepted + rejected reportados).
| Name | Type | Required | Description |
|---|---|---|---|
version | integer | yes | |
accepted | array<string> | yes | |
rejected | array<FlowOpRejection> | yes | |
rejected[].client_id | string | yes | |
rejected[].reason | string | yes |
400
Payload inválido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Share access=view.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Recurso não encontrado ou fora de escopo.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
410
Share expirou.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
413
Batch maior que opsBatchMax (100) ou body > FLOW_DOC_MAX_BYTES.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Rate limit estourado (per-token ou per-team).
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
503
Kill-switch FLOW_COLLAB_ENABLED=false.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X POST 'https://api-flow.axuz.net/public/shared/TOKEN/ops' \
-H "Content-Type: application/json" \
-d '{"ops":[{"client_id":"string","type":"node.add","entity_id":"string","ts":1,"patch":{},"payload":{}}]}'Node.js
const res = await fetch("https://api-flow.axuz.net/public/shared/TOKEN/ops", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ops": [
{
"client_id": "string",
"type": "node.add",
"entity_id": "string",
"ts": 1,
"patch": {},
"payload": {}
}
]
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"POST",
"https://api-flow.axuz.net/public/shared/TOKEN/ops",
json={
"ops": [
{
"client_id": "string",
"type": "node.add",
"entity_id": "string",
"ts": 1,
"patch": {},
"payload": {},
},
],
},
timeout=30,
)
res.raise_for_status()
print(res.json())