{ "opencollection": "1.0.0", "info": { "name": "HTTP API Console ABCI Events API" }, "items": [ { "info": { "name": "Events", "type": "folder" }, "items": [ { "info": { "name": "Fetch events posted by the consensus node.", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/events", "params": [ { "name": "filter", "value": "", "type": "query" }, { "name": "maxItems", "value": "", "type": "query" }, { "name": "after", "value": "", "type": "query" }, { "name": "before", "value": "", "type": "query" }, { "name": "waitTime", "value": "", "type": "query" } ] }, "docs": "Fetch a batch of events posted by the consensus node and matching a\nspecified query string.\n\nThe query grammar is defined in [pubsub/query/syntax](https://godoc.org/github.com/tendermint/tendermint/internal/pubsub/query/syntax).\nAn empty query matches all events; otherwise a query comprises one or\nmore terms comparing event metadata to target values. For example, to\nselect new block events:\n\n tm.event = 'NewBlock'\n\nMultiple terms can be combined with AND, for example to match the\ntransaction " }, { "info": { "name": "Subscribe for events via WebSocket.", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/subscribe", "params": [ { "name": "query", "value": "", "type": "query", "description": "query is a string, which has a form: \"condition AND condition ...\" (no OR at the\nmoment). condition has a form: \"key operation operand\". key is a string with\na restricted set of possible symbols ( \\t\\n\\r\\\\()\"'=>< are not allowed).\noperation can be \"=\", \"<\", \"<=\", \">\", \">=\", \"CONTAINS\". operand can be a\nstring (escaped with single quotes), number, date or time.\n" } ] }, "docs": "To tell which events you want, you need to provide a query. query is a\nstring, which has a form: \"condition AND condition ...\" (no OR at the\nmoment). condition has a form: \"key operation operand\". key is a string with\na restricted set of possible symbols ( \\t\\n\\r\\\\()\"'=>< are not allowed).\noperation can be \"=\", \"<\", \"<=\", \">\", \">=\", \"CONTAINS\" AND \"EXISTS\". operand\ncan be a string (escaped with single quotes), number, date or time.\n\nExamples:\n tm.event = 'NewBlock' # new block" }, { "info": { "name": "Unsubscribe from event on Websocket", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/unsubscribe", "params": [ { "name": "query", "value": "", "type": "query", "description": "query is a string, which has a form: \"condition AND condition ...\" (no OR at the\nmoment). condition has a form: \"key operation operand\". key is a string with\na restricted set of possible symbols ( \\t\\n\\r\\\\()\"'=>< are not allowed).\noperation can be \"=\", \"<\", \"<=\", \">\", \">=\", \"CONTAINS\". operand can be a\nstring (escaped with single quotes), number, date or time.\n" } ] }, "docs": "```go\nclient, err := rpchttp.New(\"tcp://0.0.0.0:26657\", \"/websocket\")\nif err != nil {\n // handle error\n}\n\nerr := client.Start()\nif err != nil {\n // handle error\n}\ndefer client.Stop()\nquery := \"tm.event = 'Tx' AND tx.height = 3\"\nerr = client.Unsubscribe(context.Background(), \"test-client\", query)\nif err != nil {\n // handle error\n}\n```\n" }, { "info": { "name": "Unsubscribe from all events via WebSocket", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/unsubscribe_all" }, "docs": "Unsubscribe from all events via WebSocket\n" } ] } ], "bundled": true }