{"components":{"parameters":{"BlobHashPath":{"description":"64-hex SHA-256 of the raw blob body.","in":"path","name":"hash","required":true,"schema":{"$ref":"#/components/schemas/BlobHash"}},"EventIdPath":{"description":"64-hex event id.","in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/EventId"}},"IfNoneMatch":{"description":"A quoted ETag, the bare value, or `*`. A match returns 304.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},"Range":{"description":"One `bytes=from-to` range. Malformed or unsatisfiable ranges return the full blob.","example":"bytes=0-1023","in":"header","name":"Range","required":false,"schema":{"type":"string"}}},"schemas":{"BlobHash":{"description":"Lowercase hex SHA-256 of the raw blob body.","pattern":"^[0-9a-f]{64}$","type":"string"},"BlobUpload":{"additionalProperties":false,"properties":{"expires_at":{"description":"Unix seconds when the blob expires unless a live event extends it.","format":"int64","type":"integer"},"hash":{"$ref":"#/components/schemas/BlobHash"},"size":{"format":"int64","minimum":0,"type":"integer"},"url":{"description":"Versioned download path for this blob.","format":"uri-reference","type":"string"}},"required":["hash","size","url","expires_at"],"type":"object"},"Error":{"additionalProperties":false,"properties":{"code":{"description":"Stable machine-readable code, such as `not_found` or `at_watermark`.","type":"string"},"error":{"description":"Human-readable message.","type":"string"}},"required":["error","code"],"type":"object"},"EventEnvelope":{"additionalProperties":true,"description":"Canonical signed envelope. On publish, unknown fields are accepted and discarded; `id` must match the digest and `sig` must verify.","properties":{"blobs":{"description":"Blob hashes this event claims; empty means none. References only; bytes never travel in the envelope.","items":{"$ref":"#/components/schemas/BlobHash"},"maxItems":8,"type":"array","uniqueItems":true},"collection":{"pattern":"^[a-z0-9/_-]{1,32}$","type":"string"},"created_at":{"description":"Unix seconds. Must not be in the server's future.","format":"int64","type":"integer"},"data":{"additionalProperties":true,"description":"Opaque JSON object owned by the client.","type":"object"},"expires_at":{"description":"Unix seconds. Must be in the future and at most 10 years after `created_at`.","format":"int64","type":"integer"},"id":{"$ref":"#/components/schemas/EventId"},"labels":{"items":{"pattern":"^[A-Za-z0-9:_\\.\\-\\+/]{1,64}$","type":"string"},"maxItems":10,"type":"array"},"owner":{"$ref":"#/components/schemas/Owner"},"sig":{"description":"Ed25519 signature over the 32-byte digest.","pattern":"^[0-9a-f]{128}$","type":"string"}},"required":["collection","created_at","expires_at","owner","labels","blobs","data","id","sig"],"type":"object"},"EventId":{"description":"Lowercase hex SHA-256 of the canonical envelope digest.","pattern":"^[0-9a-f]{64}$","type":"string"},"EventList":{"additionalProperties":false,"properties":{"count":{"minimum":0,"type":"integer"},"events":{"items":{"$ref":"#/components/schemas/EventEnvelope"},"type":"array"},"next_cursor":{"description":"Opaque cursor for the next page, or null when the page was not full.","type":["string","null"]}},"required":["count","events","next_cursor"],"type":"object"},"EventQuery":{"additionalProperties":false,"description":"Filters for POST /events/query. All supplied labels must be present (AND). Unknown fields are rejected.","properties":{"collection":{"description":"Exact collection match.","type":"string"},"cursor":{"description":"Opaque cursor from `next_cursor`.","type":"string"},"labels":{"description":"All supplied labels must be present (AND).","items":{"pattern":"^[A-Za-z0-9:_\\.\\-\\+/]{1,64}$","type":"string"},"type":"array"},"limit":{"default":20,"description":"Page size. Values outside the range are rejected.","maximum":100,"minimum":1,"type":"integer"},"owner":{"$ref":"#/components/schemas/Owner"}},"type":"object"},"EventSize":{"additionalProperties":false,"properties":{"envelope_size":{"description":"Stored canonical envelope size in bytes.","format":"int64","minimum":0,"type":"integer"},"id":{"$ref":"#/components/schemas/EventId"},"total_size":{"description":"Envelope size plus live attached blob bytes.","format":"int64","minimum":0,"type":"integer"}},"required":["id","envelope_size","total_size"],"type":"object"},"Health":{"additionalProperties":false,"properties":{"live_blobs":{"format":"int64","minimum":0,"type":"integer"},"live_events":{"format":"int64","minimum":0,"type":"integer"},"node_id":{"$ref":"#/components/schemas/NodeId"},"status":{"const":"ok","type":"string"}},"required":["status","node_id","live_events","live_blobs"],"type":"object"},"NodeId":{"description":"Lowercase hex SHA-256 of the node's raw Ed25519 public key.","pattern":"^[0-9a-f]{64}$","type":"string"},"NodeIdentity":{"additionalProperties":false,"properties":{"algorithm":{"const":"ed25519","type":"string"},"api_version":{"type":"string"},"node_id":{"$ref":"#/components/schemas/NodeId"},"public_key":{"description":"The node's Ed25519 public key.","pattern":"^ed25519:[0-9a-f]{64}$","type":"string"},"source":{"description":"Always `generated` (ephemeral identity created at process boot).","enum":["generated"],"type":"string"},"started_at":{"format":"int64","type":"integer"},"sync":{"description":"Peer node base URLs configured in SYNC, in configured order.","items":{"format":"uri","type":"string"},"maxItems":4,"type":"array"},"uptime_s":{"format":"int64","minimum":0,"type":"integer"},"version":{"type":"string"}},"required":["node_id","public_key","algorithm","source","sync","started_at","uptime_s","version","api_version"],"type":"object"},"Owner":{"description":"Ed25519 public key as `ed25519:<64 hex>`. The server stores it lowercase.","pattern":"^ed25519:[0-9a-fA-F]{64}$","type":"string"},"PublishResponse":{"additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/EventId"},"status":{"enum":["stored","duplicate"],"type":"string"}},"required":["status","id"],"type":"object"},"Stats":{"additionalProperties":false,"properties":{"blobs":{"$ref":"#/components/schemas/StatsBlobs"},"events":{"$ref":"#/components/schemas/StatsEvents"},"eviction":{"$ref":"#/components/schemas/StatsEviction"},"reaper":{"$ref":"#/components/schemas/StatsReaper"},"storage":{"$ref":"#/components/schemas/StatsStorage"},"upload":{"$ref":"#/components/schemas/StatsUpload"},"uptime_s":{"format":"int64","minimum":0,"type":"integer"},"version":{"type":"string"}},"required":["events","blobs","storage","reaper","eviction","upload","uptime_s","version"],"type":"object"},"StatsBlobs":{"additionalProperties":false,"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"claimed_bytes":{"format":"int64","minimum":0,"type":"integer"},"enabled":{"type":"boolean"},"live":{"format":"int64","minimum":0,"type":"integer"},"max_single_bytes":{"format":"int64","minimum":0,"type":"integer"},"unclaimed":{"format":"int64","minimum":0,"type":"integer"},"unclaimed_bytes":{"format":"int64","minimum":0,"type":"integer"},"unclaimed_limit_bytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["enabled","live","bytes","claimed_bytes","unclaimed","unclaimed_bytes","unclaimed_limit_bytes","max_single_bytes"],"type":"object"},"StatsEvents":{"additionalProperties":false,"properties":{"bytes":{"description":"Charged live envelope bytes.","format":"int64","minimum":0,"type":"integer"},"live":{"format":"int64","minimum":0,"type":"integer"}},"required":["live","bytes"],"type":"object"},"StatsEviction":{"additionalProperties":false,"properties":{"blobs_evicted":{"format":"int64","minimum":0,"type":"integer"},"bytes_reclaimed":{"format":"int64","minimum":0,"type":"integer"},"candidates":{"$ref":"#/components/schemas/StatsEvictionCandidates"},"events_evicted":{"format":"int64","minimum":0,"type":"integer"},"unclaimed_blobs_evicted":{"format":"int64","minimum":0,"type":"integer"},"unclaimed_bytes_reclaimed":{"format":"int64","minimum":0,"type":"integer"}},"required":["events_evicted","blobs_evicted","bytes_reclaimed","unclaimed_blobs_evicted","unclaimed_bytes_reclaimed","candidates"],"type":"object"},"StatsEvictionCandidates":{"additionalProperties":false,"properties":{"blob_bytes":{"description":"Blob bytes only the candidate events claim.","format":"int64","minimum":0,"type":"integer"},"envelope_bytes":{"format":"int64","minimum":0,"type":"integer"},"events":{"description":"Live events pressure eviction could delete now.","format":"int64","minimum":0,"type":"integer"},"largest_bytes":{"format":"int64","minimum":0,"type":"integer"},"reclaimable_bytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["events","envelope_bytes","blob_bytes","reclaimable_bytes","largest_bytes"],"type":"object"},"StatsReaper":{"additionalProperties":false,"properties":{"interval_s":{"format":"int64","minimum":0,"type":"integer"},"last_sweep_age_s":{"description":"Seconds since the last sweep, or null before the first one.","type":["integer","null"]},"last_sweep_at":{"description":"Unix seconds of the last completed sweep, or null before the first one.","type":["integer","null"]}},"required":["interval_s","last_sweep_at","last_sweep_age_s"],"type":"object"},"StatsStorage":{"additionalProperties":false,"properties":{"budget_bytes":{"description":"Admission watermark: 90% of the effective budget.","format":"int64","type":"integer"},"clamped_to_free":{"type":"boolean"},"configured_bytes":{"format":"int64","type":"integer"},"data_dir":{"type":"string"},"free_bytes":{"format":"int64","minimum":0,"type":"integer"},"store_bytes":{"format":"int64","type":"integer"},"target_bytes":{"description":"Eviction target: 85% of the effective budget.","format":"int64","type":"integer"},"used_bytes":{"description":"Charged bytes: live envelopes plus claimed blobs.","format":"int64","type":"integer"},"whitelist_blob_bytes":{"format":"int64","minimum":0,"type":"integer"},"whitelist_event_bytes":{"format":"int64","minimum":0,"type":"integer"},"whitelist_keys":{"format":"int64","minimum":0,"type":"integer"}},"required":["budget_bytes","target_bytes","used_bytes","store_bytes","configured_bytes","clamped_to_free","free_bytes","data_dir","whitelist_keys","whitelist_event_bytes","whitelist_blob_bytes"],"type":"object"},"StatsUpload":{"additionalProperties":false,"properties":{"inflight_bytes":{"format":"int64","minimum":0,"type":"integer"},"max_single_bytes":{"format":"int64","minimum":0,"type":"integer"}},"required":["inflight_bytes","max_single_bytes"],"type":"object"},"SyncRequest":{"properties":{"epoch":{"description":"Local sync epoch hex.","type":"string"},"merkle":{"properties":{"buckets":{"items":{"type":"integer"},"type":"array"},"depth":{"type":"integer"},"root":{"type":"string"}},"required":["root","depth"],"type":"object"},"mode":{"enum":["steady","catchup"],"type":"string"},"pull":{"properties":{"cursor":{"format":"int64","type":"integer"},"limit":{"maximum":100,"minimum":1,"type":"integer"}},"required":["cursor","limit"],"type":"object"},"push":{"properties":{"events":{"items":{"type":"object"},"type":"array"}},"required":["events"],"type":"object"},"request_id":{"type":"string"}},"required":["epoch","mode","pull","push","merkle","request_id"],"type":"object"},"SyncResponse":{"properties":{"accepted":{"minimum":0,"type":"integer"},"battery":{"properties":{"cost":{"type":"number"},"max":{"type":"number"},"regen_per_min":{"type":"number"},"remaining":{"type":"number"},"retry_after_s":{"type":"integer"}},"required":["remaining","max","regen_per_min","cost","retry_after_s"],"type":"object"},"epoch":{"type":"string"},"events":{"items":{"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"merkle":{"properties":{"asked":{"items":{"type":"integer"},"type":"array"},"buckets":{"items":{"type":"object"},"type":"array"},"depth":{"type":"integer"},"ids":{"items":{"type":"object"},"type":"array"},"root":{"type":"string"},"threshold_exceeded":{"type":"boolean"}},"required":["root","depth","threshold_exceeded"],"type":"object"},"missing_blobs":{"items":{"type":"string"},"type":"array"},"next_pull":{"format":"int64","type":"integer"},"peer":{"properties":{"next_poll_after_ms":{"type":"integer"},"penalty":{"type":"number"}},"required":["penalty","next_poll_after_ms"],"type":"object"},"rejected":{"items":{"properties":{"code":{"type":"string"},"id":{"type":"string"}},"required":["id","code"],"type":"object"},"type":"array"}},"required":["epoch","events","accepted","rejected","next_pull","has_more","missing_blobs","merkle","battery","peer"],"type":"object"}}},"info":{"description":"Signed-event relay with local content-addressed blobs. Clients canonicalize, hash, and sign envelopes; the node verifies signatures, stores opaque JSON, and expires data on a TTL. Every failure uses the Error schema.","title":"Rabta API","version":"v1"},"openapi":"3.1.0","paths":{"/blobs":{"put":{"description":"Streams the raw body to a temp file while computing SHA-256, then installs it at a content-addressed path. There is no filename, extension, or multipart form. Re-uploading the same bytes is deduplicated.","operationId":"uploadBlob","requestBody":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobUpload"}}},"description":"The blob already existed; access metadata was refreshed."},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobUpload"}}},"description":"Blob stored.","headers":{"Location":{"description":"Versioned download path for this blob.","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Empty body or a failed body stream (`empty_body`, `bad_body`)."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The blob plane is disabled (`blobs_disabled`)."},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The body stalled for 30 seconds (`timeout`)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The blob exceeds 1% of `STORAGE_LIMIT` (`too_large`)."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No upload slot or temp-file budget is available (`busy`)."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage failure (`internal`)."},"507":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage is at the watermark or below the free-space floor (`at_watermark`, `disk_full`)."}},"summary":"Upload raw blob bytes","tags":["blobs"]}},"/blobs/{hash}":{"get":{"description":"Streams the blob with ETag, cache, and range support. A successful read records access but never extends the blob deadline.","operationId":"downloadBlob","parameters":[{"$ref":"#/components/parameters/BlobHashPath"},{"$ref":"#/components/parameters/Range"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The full blob, or the full blob when a range is unsatisfiable.","headers":{"Accept-Ranges":{"description":"Always `bytes`.","schema":{"const":"bytes","type":"string"}},"Cache-Control":{"description":"Always `public, max-age=3600`.","schema":{"const":"public, max-age=3600","type":"string"}},"Content-Length":{"description":"Blob size in bytes.","schema":{"format":"int64","minimum":0,"type":"integer"}},"Content-Type":{"description":"Always `application/octet-stream`.","schema":{"const":"application/octet-stream","type":"string"}},"ETag":{"description":"Quoted blob hash.","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"Always `nosniff`.","schema":{"const":"nosniff","type":"string"}}}},"206":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The requested byte range.","headers":{"Content-Length":{"description":"Range length in bytes.","schema":{"format":"int64","minimum":0,"type":"integer"}},"Content-Range":{"description":"The served byte range and full size.","schema":{"type":"string"}}}},"304":{"description":"The client's ETag matches; no body.","headers":{"Cache-Control":{"description":"Always `public, max-age=3600`.","schema":{"const":"public, max-age=3600","type":"string"}},"ETag":{"description":"Quoted blob hash.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown, expired, or malformed hash, or the blob plane is disabled (`not_found`, `blobs_disabled`)."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage failure (`internal`)."}},"summary":"Download a blob","tags":["blobs"]},"head":{"description":"Same headers and miss behavior as GET, with no body. A hit records access.","operationId":"headBlob","parameters":[{"$ref":"#/components/parameters/BlobHashPath"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The blob exists; headers describe it.","headers":{"Accept-Ranges":{"description":"Always `bytes`.","schema":{"const":"bytes","type":"string"}},"Cache-Control":{"description":"Always `public, max-age=3600`.","schema":{"const":"public, max-age=3600","type":"string"}},"Content-Length":{"description":"Blob size in bytes.","schema":{"format":"int64","minimum":0,"type":"integer"}},"Content-Type":{"description":"Always `application/octet-stream`.","schema":{"const":"application/octet-stream","type":"string"}},"ETag":{"description":"Quoted blob hash.","schema":{"type":"string"}}}},"304":{"description":"The client's ETag matches; no body.","headers":{"Cache-Control":{"description":"Always `public, max-age=3600`.","schema":{"const":"public, max-age=3600","type":"string"}},"ETag":{"description":"Quoted blob hash.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown, expired, or malformed hash, or the blob plane is disabled (`not_found`, `blobs_disabled`)."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage failure (`internal`)."}},"summary":"Blob metadata","tags":["blobs"]}},"/events":{"post":{"description":"Validates the canonical envelope, its SHA-256 id, and its Ed25519 signature, then stores it. Republishing the same id is idempotent and adds no bytes.","operationId":"publishEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEnvelope"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResponse"}}},"description":"Event already stored; no bytes added."},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResponse"}}},"description":"Event stored."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed JSON or an invalid field (`bad_json`, `bad_collection`, `bad_label`, `bad_blobs`, `bad_owner`, `ttl_range`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The signature does not verify (`bad_sig`)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The envelope exceeds 100,000 bytes (`too_large`)."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage failure (`internal`)."},"507":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage is at the admission watermark (`at_watermark`)."}},"summary":"Publish a signed envelope","tags":["events"]}},"/events/query":{"post":{"description":"Returns live, unexpired envelopes ordered by `created_at DESC, id DESC`. All supplied labels must be present (AND). Poll this endpoint to observe new events; there is no push stream.","operationId":"queryEvents","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventQuery"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}},"description":"One page of matching envelopes."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid label, owner, cursor, or body (`bad_label`, `bad_owner`, `bad_json`)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The query exceeds 8,192 bytes (`too_large`)."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage failure (`internal`)."}},"summary":"List live events","tags":["events"]}},"/events/{id}":{"get":{"description":"Returns the exact stored canonical envelope. Invalid, unknown, and expired ids all return 404.","operationId":"getEvent","parameters":[{"$ref":"#/components/parameters/EventIdPath"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEnvelope"}}},"description":"The stored canonical envelope.","headers":{"ETag":{"description":"Quoted event id.","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"Always `nosniff`.","schema":{"const":"nosniff","type":"string"}}}},"304":{"description":"The client's ETag matches; no body.","headers":{"ETag":{"description":"Quoted event id.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid, unknown, or expired event id (`not_found`)."}},"summary":"Fetch one stored envelope","tags":["events"]}},"/events/{id}/size":{"get":{"description":"The stored envelope size plus the sizes of the live blobs named in `blobs`. Dangling and repeated references add nothing.","operationId":"getEventSize","parameters":[{"$ref":"#/components/parameters/EventIdPath"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSize"}}},"description":"Envelope and total attached size."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid, unknown, or expired event id (`not_found`)."}},"summary":"Event size metadata","tags":["events"]}},"/health":{"get":{"description":"Returns 200 when the process and embedded SQLite are usable.","operationId":"getHealth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"The node is alive."}},"summary":"Liveness probe","tags":["ops"]}},"/node":{"get":{"description":"Ed25519 identity for identification and multi-node operations, generated fresh at boot. Identification only: it is not an authorization key, and events remain owner-signed. The same id appears in `GET /api/v1/`, `GET /api/v1/health`, and the `X-Rabta-Node-Id` response header.","operationId":"getNodeIdentity","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeIdentity"}}},"description":"The node identity."}},"summary":"This node's identity","tags":["ops"]}},"/openapi.json":{"get":{"description":"This document. Paths are relative to the `/api/v1` server URL.","operationId":"getOpenApi","responses":{"200":{"content":{"application/json":{"schema":{"description":"An OpenAPI 3.1 document.","type":"object"}}},"description":"The OpenAPI 3.1 document."}},"summary":"OpenAPI description of this API","tags":["meta"]}},"/stats":{"get":{"description":"Live counts, the storage budget and pinned totals, reaper state, lifetime eviction counters, and what pressure eviction could reclaim right now.","operationId":"getStats","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}},"description":"The current node snapshot."}},"summary":"Storage and runtime snapshot","tags":["ops"]}},"/sync":{"post":{"description":"Authenticated push and pull of live events, missing blob hashes, and Merkle tree state. Authenticated via Ed25519 signature headers (`x-rabta-node`, `x-rabta-timestamp`, `x-rabta-nonce`, `x-rabta-signature`). Regulated by node battery accounting.","operationId":"peerSync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponse"}}},"description":"Sync batch result."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed JSON (`bad_json`)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Ed25519 node signature or stale timestamp (`unauthorized`)."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Replay nonce already seen (`replay`)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Sync wire payload exceeds 2 MB (`too_large`)."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Node battery exhausted; rate limited (`battery_empty`)."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Storage failure (`internal`)."}},"summary":"Server-to-server peer synchronization","tags":["sync"]}}},"security":[],"servers":[{"description":"This node.","url":"/api/v1"}],"tags":[{"description":"Liveness and monitoring.","name":"ops"},{"description":"Signed event envelopes and queried listing.","name":"events"},{"description":"Server-to-server peer synchronization.","name":"sync"},{"description":"Raw content-addressed blob upload and download.","name":"blobs"},{"description":"Machine-readable API description.","name":"meta"}]}