HTTP API
{kind} is oracles or contracts. Administrative endpoints (admin) need Authorization: Bearer <ADMIN_TOKEN>. Other requests with a body are authenticated by their signatures.
Both
| Method and path |
Access |
Purpose |
POST /{kind} |
admin |
Create. Returns aid, policy, ready |
GET /{kind} |
open |
List |
GET /{kind}/{aid} |
open |
Policy, state, latest entry |
GET /{kind}/{aid}/kel |
open |
Key event log |
GET /{kind}/{aid}/tel |
open |
Entries. after, limit (at most 200) |
GET /{kind}/{aid}/oobi |
open |
Introduction: address, policy, witnesses |
POST /{kind}/{aid}/rotate |
admin |
Rotate keys |
POST /{kind}/{aid}/resume |
admin |
Continue an interrupted entry |
POST /{kind}/{aid}/engage |
admin |
Accept an agreement |
GET /{kind}/{aid}/engagements |
admin |
List engagements |
POST /{kind}/{aid}/engagements/{id}/revoke |
admin |
Revoke |
POST /{kind}/{aid}/engagements/{id}/withdraw |
signed |
Withdraw |
POST /{kind}/{aid}/agreement |
admin |
Sign an agreement as caller |
POST /{kind}/{aid}/call |
admin |
Call another subject |
POST /{kind}/{aid}/invoke |
signed |
Call this subject |
Oracles
| Method and path |
Access |
Purpose |
POST /oracles/{aid}/observe |
signed |
Submit an observation |
POST /oracles/{aid}/aggregate |
admin |
Publish a value |
GET /oracles/{aid}/latest |
open |
Latest entry |
Contracts
| Method and path |
Access |
Purpose |
POST /contracts/{aid}/submit |
signed |
Submit |
POST /contracts/{aid}/dispute |
admin |
Dispute: submissions with two items |
POST /contracts/{aid}/timeout |
admin |
Time out |
Errors
Errors are {"error", "message"}.
| Status |
Meaning |
| 401 |
Token is missing or wrong |
| 404 |
Unknown subject |
| 409 |
Conflict of identities |
| 413 |
Body exceeds 8 MiB or has no length |
| 422 |
Refused |
| 503 |
unavailable, pending or no_quorum. Retry |
GET /health and GET /healthz report the number of subjects.