{"openapi":"3.1.0","info":{"title":"Praecise RPC","version":"0.1.0","description":"Early and unproven. One JSON-RPC 2.0 call at a time; no caching; writes only where enabled."},"servers":[{"url":"https://rpc.praecise.com"}],"tags":[{"name":"Accounts","description":"Made by a Praecise product with the admin key."},{"name":"Network","description":"With an account key."}],"components":{"securitySchemes":{"admin":{"type":"http","scheme":"bearer","description":"The admin key, held by a Praecise product."},"accountKey":{"type":"http","scheme":"bearer","description":"The account key (prk_…), shown once."}}},"paths":{"/networks":{"get":{"operationId":"networks","tags":["Network"],"summary":"What is offered","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string","description":""},"reads":{},"writes":{"type":"array","items":{"type":"string"}}},"required":[]}},"limits":{"type":"object"}},"required":[]}}}}}}},"/rpc/{network}":{"post":{"operationId":"rpc","tags":["Network"],"summary":"One JSON-RPC 2.0 call","security":[{"accountKey":[]}],"parameters":[{"name":"network","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{},"method":{"type":"string","description":""},"params":{}},"required":["jsonrpc","method"]}}}},"responses":{"200":{"description":"The network's answer, unchanged"},"401":{"description":"No or unknown key"},"403":{"description":"A write that is not enabled, or a method not offered"},"413":{"description":"Body too large"},"429":{"description":"Over the ceiling per minute"},"502":{"description":"The network could not be reached"},"504":{"description":"The network did not answer in time"}}}},"/usage":{"get":{"operationId":"usage","tags":["Network"],"summary":"Today and the last seven days","security":[{"accountKey":[]}],"responses":{"200":{"description":"requests, reads, writes, errors, rejected per network and day"}}}},"/accounts":{"post":{"operationId":"accounts-create","tags":["Accounts"],"summary":"Add an account","security":[{"admin":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"type":"string","description":"The project or organisation id."},"name":{"type":"string","description":""}},"required":["owner"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","description":""},"key":{"type":"string","description":"Shown this once."},"owner":{"type":"string","description":""},"name":{"type":"string","description":""}},"required":[]}}}}}},"get":{"operationId":"accounts-list","tags":["Accounts"],"summary":"List accounts, optionally of one owner","security":[{"admin":[]}],"parameters":[{"name":"owner","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The accounts"}}}},"/accounts/{account}":{"get":{"operationId":"accounts-read","tags":["Accounts"],"summary":"Read an account and its last seven days","security":[{"admin":[]}],"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"},"description":"The account id (pra_…)."}],"responses":{"200":{"description":"The account and its counts"}}},"post":{"operationId":"accounts-rotate","tags":["Accounts"],"summary":"Rotate the key","security":[{"admin":[]}],"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"},"description":"The account id (pra_…)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rotate":{"type":"boolean","const":true}},"required":["rotate"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Shown this once."}},"required":[]}}}}}},"delete":{"operationId":"accounts-delete","tags":["Accounts"],"summary":"Remove an account","security":[{"admin":[]}],"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string"},"description":"The account id (pra_…)."}],"responses":{"200":{"description":"Removed"}}}}}}