Home | API

Watcher

Query event data

Method

watcher.getEvents

Parameters

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
method string The method name. Yes
params object The parameters of the request. Yes
params.query object Query. Yes
params.query.$limit number Data limit. No
params.query.$offset number Data offset. No
params.query.event string Event name. No
params.query.data object Query nested event data. No

Result

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
result object Result. Yes
result.total number Total number of entries matching given query. Yes
result.limit number Data limit. Yes
result.offset number Data offset. Yes
result.data array Query response data. Yes

Request

{
    "id": "unique-request-id",
	"jsonrpc": "2.0",
	"method": "watcher.getEvents",
	"params": { "query": { "$limit": 100, "$offset": 0, "data": { "value": { "username": "genesis_9" } } } }
}

Response

{
    "id": "unique-request-id",
    "jsonrpc": "2.0",
    "result": {
        "total": 0,
        "limit": 100,
        "offset": 0,
        "data": []
    }
}

Supported query parameters

Name Type
$eq equal
$ne not equal
$lt less than
$lte less than or equal
$gt greater than
$gte greater than or equal
$like like

Query example

"data": {
    name: { $like: "starts_with_string%" }
}
2020 © ARK.io | All rights reserved An ARK.io Product