Crossbar API tunneling

This API provide a way to send requests to Crossbar (tunneling Crossbar HTTP request through WebSocket) and receive its response later.

Authorization

Your WebSocket auth_token will be used to perform the Crossbar request.

Your auth_token requires to have api:tunnel scope.

Request Payload

KeyDescriptionTypeDefaultRequired
actionto send request to HTTP APIstring('api')true
datadata objectobject()true
data.verbHTTP method to perform (in lower case)string()getfalse
data.endpointthe HTTP API endpoint URL to use, e.g: /v2/account/123/users/123string()true
data.bodyHTTP body data to useany()false

For example to send a GET /v2/accounts/156e05e8a12fd138540cd2017a97e371/users:

{
    "action": "api",
    "auth_token": "{AUTH_TOKEN}",
    "request_id": "{REQUEST_ID}",
    "data": {
        "verb": "get",
        "endpoint": "/v2/accounts/156e05e8a12fd138540cd2017a97e371/users"
    }
}

Response

data is regular Crossbar response for that endpoint:

{
    "action": "reply",
    "request_id": "{REQUEST_ID}",
    "status": "success",
    "data": {
    }
}