{"openapi":"3.1.0","info":{"title":"Replica Snapshot Agreement","version":"1.0.0","description":"Find shards with an expected-generation quorum of replicas reporting the same snapshot identifier, and flag stale or conflicting replicas.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/replica-snapshot-agreement/v1/check":{"post":{"operationId":"replica_snapshot_agreement","summary":"Find shards with an expected-generation quorum of replicas reporting the same snapshot identifier, and flag stale or conflicting replicas.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"required_replicas":{"type":"integer","minimum":1,"maximum":30},"expected_generation":{"type":"integer","minimum":0,"maximum":1000000000000},"shards":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"replicas":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"generation":{"type":"integer","minimum":0,"maximum":1000000000000},"snapshot":{"type":"string","minLength":1,"maxLength":100}},"required":["id","generation","snapshot"],"additionalProperties":false}}},"required":["id","replicas"],"additionalProperties":false}}},"required":["required_replicas","expected_generation","shards"],"additionalProperties":false},"example":{"required_replicas":2,"expected_generation":7,"shards":[{"id":"a","replicas":[{"id":"1","generation":7,"snapshot":"x"},{"id":"2","generation":7,"snapshot":"x"},{"id":"3","generation":6,"snapshot":"z"},{"id":"4","generation":7,"snapshot":"y"}]},{"id":"b","replicas":[]}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"ready":false,"shards":[{"id":"a","status":"quorum","agreed_snapshot":"x","in_sync":["1","2"],"conflicting":["4"],"other_generation":["3"]},{"id":"b","status":"insufficient","agreed_snapshot":null,"in_sync":[],"conflicting":[],"other_generation":[]}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}