Drafts awaiting or past decision (ops)
GET /v1/ops/drafts- quién puede llamarla
- Un operador
- cuán reciente
- Nunca en caché
- cada respuesta lleva la altura del índice y la del nodo
- Herramienta MCP
- Ninguna
En esta página
A pending draft carries guard, the guard that would hold it out of a batch, with the text the CSV and the batch answer give: single_source: …, collision: … or chain_mismatch: ….
Parámetros
| Nombre | Dónde | Tipo | Obligatorio | Qué hace |
|---|---|---|---|---|
status | consulta | string | opcional | Only the drafts in this state. |
limit | consulta | integer | opcional | Drafts, newest first: 100 by default, at most 500; a value outside 1 to 500 reads as 100. |
Qué responde
Drafts, newest first.
| Campo | Tipo | Qué lleva |
|---|---|---|
items | array | The drafts, newest first, at most limit. |
items[].id | integer | The draft's id. |
items[].claim_table | string | The table the payload is for: intel.annotations, intel.entities, intel.entity_relations or intel.events. |
items[].payload | object | What the draft would write, as proposed. |
items[].proposed_by | string | Who proposed it: an operator's id, npub:<hex>, key:<id> or account:<id>. |
items[].source_id | string o null | The source it is published under on approval. Null when it names none. |
items[].lead_event_id | string o null | The Community event that led to it, 64 hex. Null when none did. |
items[].status | string | Where it stands: draft until a human approves or rejects it. |
items[].decided_by | string o null | The operator who decided it. Null while it waits. |
items[].decided_at | string o null | When it was decided. Null while it waits. |
items[].reason | string o null | Why it was rejected. Null otherwise. |
items[].published_id | integer o null | The id of the row the approval wrote, in the draft's table. Null until it is approved. |
items[].created_at | string | When it was proposed. |
items[].guard | string | Why a pending draft would be held out of a batch; absent when nothing holds it. |
esquema
itemsarray de Draft — The drafts, newest first, at mostlimit.idinteger — The draft's id.claim_tablestring — The table the payload is for: intel.annotations, intel.entities, intel.entity_relations or intel.events.payloadobject — What the draft would write, as proposed.proposed_bystring — Who proposed it: an operator's id,npub:<hex>,key:<id>oraccount:<id>.source_idstring | null — The source it is published under on approval. Null when it names none.lead_event_idstring | null — The Community event that led to it, 64 hex. Null when none did.statusstring — Where it stands:draftuntil a human approves or rejects it. · uno de "draft", "approved", "rejected", "withdrawn"decided_bystring | null — The operator who decided it. Null while it waits.decided_atstring | null (date-time) — When it was decided. Null while it waits.reasonstring | null — Why it was rejected. Null otherwise.published_idinteger | null — The id of the row the approval wrote, in the draft's table. Null until it is approved.created_atstring (date-time) — When it was proposed.guardstring — Why a pending draft would be held out of a batch; absent when nothing holds it.
Ausente y vacío
| El caso | En la respuesta |
|---|---|
| No guard holds the draft. | No guard field. |
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 401 | unauthorized | unauthorized: the request does not say who makes it, or what it offers does not verify: no key or session where one is needed, or a password, a code, a passkey or a signed event that does not check. The message says what is missing. |
| 403 | forbidden | forbidden: the caller is known but may not do this: a key without the scope or the tier the action needs, a session without an npub, a second factor or a recent sign-in, an operator without the role or switched off, or a source that does not allow it. The message says which. |
Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.
Ejemplo
curl y jq, en cualquier shell.
curl -s 'https://api.btcintel.io/v1/ops/drafts?limit=100' \
-H "Authorization: Bearer $BTCINTEL_KEY" | jqThis route needs an operator credential. Set BTCINTEL_KEY to the ops bearer or a btci_ key with the ops:agent scope first: the snippet reads it from there and holds no key.