< EMQX Dedicated latest API Documentation Submit API issue

EMQX Dedicated REST API (v5)

Download OpenAPI specification:

EMQX Dedicated REST API

Actions

List action types

Lists the available action types.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
[
  • "emqx_tables",
  • "alloydb",
  • "sqlserver",
  • "gcp_pubsub_producer",
  • "iotdb",
  • "mysql",
  • "doris",
  • "rabbitmq",
  • "tdengine",
  • "elasticsearch",
  • "kafka_producer",
  • "s3tables",
  • "oracle",
  • "timescale",
  • "s3",
  • "azure_blob_storage",
  • "clickhouse",
  • "disk_log",
  • "tablestore",
  • "snowflake",
  • "datalayers",
  • "kinesis",
  • "pgsql",
  • "influxdb",
  • "http",
  • "redis",
  • "opents",
  • "syskeeper_forwarder",
  • "confluent_producer",
  • "rocketmq",
  • "snowflake_streaming",
  • "dynamo",
  • "cassandra",
  • "greptimedb",
  • "pulsar",
  • "mqtt",
  • "couchbase",
  • "bigquery",
  • "mongodb",
  • "cockroachdb",
  • "matrix",
  • "aws_timestream",
  • "redshift",
  • "azure_event_hub_producer"
]

List Actions

List all created actions.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
only_global
boolean
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Create Action

Create a new action by type and name.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
One of
connector
required
string

Name of the connector specified by the action, used for external resource selection.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this action.

Array of actions_and_sources.fallback_action_republish (object) or actions_and_sources.fallback_action_reference (object)
Default: []

List of fallback actions that will be triggered if a query to this action fails.

name
required
string

Name of the resource.

required
object (bridge_greptimedb.action_parameters)
object (action_emqx_tables.action_resource_opts)
tags
Array of strings

Tags to annotate this config entry.

type
required
string
Value: "emqx_tables"

Type of the resource.

Responses

Request samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my action",
  • "enable": true,
  • "name": "my_action",
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "type": "azure_blob_storage"
}

Response samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my action",
  • "enable": true,
  • "node_status": [
    ],
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "status": "connected"
}

Delete Action

Delete an action by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
also_delete_dep_actions
boolean
Default: false

Whether to cascade delete dependent actions.

ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string",
  • "rules": [
    ]
}

Get Action

Get an action by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my action",
  • "enable": true,
  • "node_status": [
    ],
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "status": "connected"
}

Update Action

Update an action by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string
Request Body schema: application/json
One of
connector
required
string

Name of the connector specified by the action, used for external resource selection.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this action.

Array of actions_and_sources.fallback_action_republish (object) or actions_and_sources.fallback_action_reference (object)
Default: []

List of fallback actions that will be triggered if a query to this action fails.

required
object (bridge_greptimedb.action_parameters)
object (action_emqx_tables.action_resource_opts)
tags
Array of strings

Tags to annotate this config entry.

Responses

Request samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my action",
  • "enable": true,
  • "parameters": {
    },
  • "resource_opts": {
    }
}

Response samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my action",
  • "enable": true,
  • "node_status": [
    ],
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "status": "connected"
}

Cluster Action Enable

Enable or disable action on all nodes in the cluster.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

enable
required
boolean
Example: true

Whether to enable this bridge.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Get Action Metrics

Get action metrics by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "metrics": {
    },
  • "node_metrics": [
    ]
}

Reset Action Metrics

Reset action metrics by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Cluster Action Operation

Start action on all nodes in the cluster.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

operation
required
string
Value: "start"
Example: start

Operation can be one of: 'start'.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Test Action Creation

Test creating a new action.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
One of
connector
required
string

Name of the connector specified by the action, used for external resource selection.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this action.

Array of actions_and_sources.fallback_action_republish (object) or actions_and_sources.fallback_action_reference (object)
Default: []

List of fallback actions that will be triggered if a query to this action fails.

name
required
string

Name of the resource.

required
object (bridge_greptimedb.action_parameters)
object (action_emqx_tables.action_resource_opts)
tags
Array of strings

Tags to annotate this config entry.

type
required
string
Value: "emqx_tables"

Type of the resource.

Responses

Request samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my action",
  • "enable": true,
  • "name": "my_action",
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "type": "azure_blob_storage"
}

Response samples

Content type
application/json
{
  • "code": "TEST_FAILED",
  • "message": "string"
}

Summarize Actions

Summarize actions.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
only_global
boolean
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Authentication

Global import users into authenticator

Import users into built-in database authenticator.

Authorizations:
basicAuthbearerAuth
query Parameters
type
required
string
Enum: "plain" "hash"
Example: type=hash

The import file template type, enum with plain, hash

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "failed": 0,
  • "override": 0,
  • "skipped": 0,
  • "success": 0,
  • "total": 0
}

List users in authenticator

List users in built-in database authenticator.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

like_user_id
string

Fuzzy search user_id (username or clientid).

is_superuser
boolean

Is superuser

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Create users for authenticator

Create users for built-in database authenticator.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
is_superuser
boolean
Default: false
namespace
string
password
required
string
user_id
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "password": "******",
  • "user_id": "user1"
}

Response samples

Content type
application/json
Example
{
  • "user_id": "user1"
}

Delete user in authenticator

Delete user in built-in database authenticator.

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
string

User ID.

query Parameters
ns
string
Request Body schema: application/json
namespace
string

Responses

Request samples

Content type
application/json
{
  • "namespace": "ns1"
}

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Get user from authenticator

Get user from built-in database authenticator.

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
string

User ID.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
Example
{
  • "user_id": "user1"
}

Update user in authenticator

Update user in built-in database authenticator.

Authorizations:
basicAuthbearerAuth
path Parameters
user_id
required
string

User ID.

query Parameters
ns
string
Request Body schema: application/json
is_superuser
boolean
Default: false
namespace
string
password
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "password": "******"
}

Response samples

Content type
application/json
{
  • "regular_user": {
    },
  • "super_user": {
    }
}

Authorization

Reset node-wise authorization cache

Reset node-wise authorization cache.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": "INTERNAL_ERROR",
  • "message": "string"
}

Delete all rules

Delete all rules for all 'users', 'clients' and 'all'

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Delete rules for 'all'

Delete rules for 'all'

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "FORBIDDEN",
  • "message": "string"
}

Show rules for 'all'

Show the list of rules for 'all'

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "rules": [
    ]
}

Update rules for 'all'

Create/Update the list of rules for 'all'.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
Array of objects (emqx_authz_api_mnesia.rule_item)

Responses

Request samples

Content type
application/json
{
  • "rules": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Show rules for clients

Show the list of rules for clients

Authorizations:
basicAuthbearerAuth
query Parameters
page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

like_clientid
string

Fuzzy search clientid as substring

ns
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Add rule for 'clientid'

Add new rule for 'clientid'

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
Array
clientid
required
string

ClientID

Array of objects (emqx_authz_api_mnesia.rule_item)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Delete rule for 'clientid'

Delete rule for 'clientid'

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Example: client1

ClientID

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Get rule for 'clientid'

Get rule for 'clientid'

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Example: client1

ClientID

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "clientid": "client1",
  • "rules": [
    ]
}

Set rule for 'clientid'

Set rule for 'clientid'

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Example: client1

ClientID

query Parameters
ns
string
Request Body schema: application/json
clientid
required
string

ClientID

Array of objects (emqx_authz_api_mnesia.rule_item)

Responses

Request samples

Content type
application/json
{
  • "clientid": "client1",
  • "rules": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Show rules for users

Show the list of rules for users

Authorizations:
basicAuthbearerAuth
query Parameters
page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

like_username
string

Fuzzy search username as substring

ns
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Add rule for 'username'

Add new rule for 'username'

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
Array
Array of objects (emqx_authz_api_mnesia.rule_item)
username
required
string

Username

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Delete rule for 'username'

Delete rule for 'username'

Authorizations:
basicAuthbearerAuth
path Parameters
username
required
string
Example: user1

Username

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Get rule for 'username'

Get rule for 'username'

Authorizations:
basicAuthbearerAuth
path Parameters
username
required
string
Example: user1

Username

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "rules": [
    ],
  • "username": "user1"
}

Set rule for 'username'

Set rule for 'username'

Authorizations:
basicAuthbearerAuth
path Parameters
username
required
string
Example: user1

Username

query Parameters
ns
string
Request Body schema: application/json
Array of objects (emqx_authz_api_mnesia.rule_item)
username
required
string

Username

Responses

Request samples

Content type
application/json
{
  • "rules": [
    ],
  • "username": "user1"
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Banned

Clear

Clear all banned data.

Authorizations:
basicAuthbearerAuth

Responses

List all currently banned client IDs, usernames and IP addresses.

List all currently banned client IDs, usernames and IP addresses.
Filters are supported. Since filters are mutually exclusive, only one filter is allowed in a query.

Authorizations:
basicAuthbearerAuth
query Parameters
page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

clientid
string

Query the banning rules with an exact client ID.

username
string

Query the banning rules with an exact username.

peerhost
string
Example: peerhost=127.0.0.1

Query the banning rules with an exact IP address.

like_clientid
string

Fuzzy query banning rules with a regular expression for client ID.

like_username
string

Fuzzy query banning rules with a regular expression for username.

like_peerhost
string
Example: like_peerhost=127.0.0.1

Fuzzy query banning rules with a regular expression for IP address.

like_peerhost_net
string
Example: like_peerhost_net=192.1.0.0/16

Fuzzy query banning rules with a regular expression for CIDR.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Add a client ID, username or IP address to the blacklist.

Add a client ID, username or IP address to the blacklist.

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
as
required
string
Enum: "clientid" "username" "peerhost" "clientid_re" "username_re" "peerhost_net"

Ban method, which can be exact client ID, client ID regular expression, exact username, username regular expression,
IP address or an IP address range.

integer or string

The start time of the ban, the format is rfc3339, the default is the time when the operation was initiated.

by
string

Initiator of the ban.

reason
string

Ban reason, record the reason why the current object was banned.

(integer or string) or string
Default: "infinity"

The end time of the ban, the format is rfc3339, the default is the time when the operation was initiated + 1 year.

who
required
string

Ban object, specific client ID, username or IP address.

Responses

Request samples

Content type
application/json
{
  • "as": "username",
  • "at": "2021-10-25T21:48:47+08:00",
  • "by": "mgmt_api",
  • "reason": "Too many requests",
  • "until": "2030-11-11T10:24:00+08:00",
  • "who": "Banned name"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Remove a client ID, username or IP address from the blacklist.

Remove a client ID, username or IP address from the blacklist.

Authorizations:
basicAuthbearerAuth
path Parameters
as
required
string
Enum: "clientid" "username" "peerhost" "clientid_re" "username_re" "peerhost_net"
Example: username

Ban method, which can be exact client ID, client ID regular expression, exact username, username regular expression,
IP address or an IP address range.

who
required
string
Example: Badass

Ban object, specific client ID, username or IP address.

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Clients

List clients

List clients

Authorizations:
basicAuthbearerAuth
query Parameters
page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

node
string
Example: node=emqx@127.0.0.1

Node name

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

username
Array of strings

User name of client when connecting

ip_address
string
Example: ip_address=127.0.0.1

Client's IP address

conn_state
string
Enum: "connected" "idle" "disconnected"

The current connection status of the client, the possible values are connected,idle,disconnected

clean_start
boolean

Indicate whether the client is using a brand new session

proto_ver
string

Protocol version

like_clientid
string

Fuzzy search clientid as substring

like_username
string

Fuzzy search username as substring

integer or string

Search client session creation time by greater than or equal method, rfc3339 or timestamp(millisecond)

integer or string

Search client session creation time by less than or equal method, rfc3339 or timestamp(millisecond)

integer or string

Search client connection creation time by greater than or equal method, rfc3339 or timestamp(epoch millisecond)

integer or string

Search client connection creation time by less than or equal method, rfc3339 or timestamp(epoch millisecond)

clientid
Array of strings

Client ID

Array of strings or string
Default: "all"

Comma separated list of client fields to return in the response

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

List clients (V2)

List clients

Authorizations:
basicAuthbearerAuth
query Parameters
cursor
string

Opaque value representing the current iteration state.

node
string
Example: node=emqx@127.0.0.1

Node name

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

username
Array of strings

User name of client when connecting

ip_address
string
Example: ip_address=127.0.0.1

Client's IP address

conn_state
string
Enum: "connected" "idle" "disconnected"

The current connection status of the client, the possible values are connected,idle,disconnected

clean_start
boolean

Indicate whether the client is using a brand new session

proto_ver
string

Protocol version

like_clientid
string

Fuzzy search clientid as substring

like_username
string

Fuzzy search username as substring

integer or string

Search client session creation time by greater than or equal method, rfc3339 or timestamp(millisecond)

integer or string

Search client session creation time by less than or equal method, rfc3339 or timestamp(millisecond)

integer or string

Search client connection creation time by greater than or equal method, rfc3339 or timestamp(epoch millisecond)

integer or string

Search client connection creation time by less than or equal method, rfc3339 or timestamp(epoch millisecond)

clientid
Array of strings

Client ID

Array of strings or string
Default: "all"

Comma separated list of client fields to return in the response

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Kick out a batch of client by client IDs

Kick out a batch of client by client IDs

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
Array
string

Responses

Request samples

Content type
application/json
[
  • "emqx_clientid_985bb09d",
  • "emqx_clientid_211cc01c"
]

Kick out client by client ID

Kick out client by client ID

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string

Responses

Response samples

Content type
application/json
{
  • "code": "CLIENTID_NOT_FOUND",
  • "message": "string"
}

Get clients info by client ID

Get clients info by client ID

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string

Responses

Response samples

Content type
application/json
{
  • "awaiting_rel_cnt": 0,
  • "awaiting_rel_max": 100,
  • "clean_start": true,
  • "clientid": "01",
  • "connected": true,
  • "connected_at": "2024-01-01T12:34:56.789+08:00",
  • "created_at": "2024-01-01T12:34:56.789+08:00",
  • "durable": false,
  • "enable_authn": true,
  • "expiry_interval": 0,
  • "heap_size": 610,
  • "inflight_cnt": 0,
  • "inflight_max": 32,
  • "ip_address": "127.0.0.1",
  • "is_bridge": false,
  • "is_persistent": false,
  • "keepalive": 60,
  • "listener": "tcp:default",
  • "mailbox_len": 0,
  • "mountpoint": "null",
  • "mqueue_dropped": 0,
  • "mqueue_len": 0,
  • "mqueue_max": 1000,
  • "node": "emqx@127.0.0.1",
  • "peerport": 52571,
  • "port": 52571,
  • "proto_name": "MQTT",
  • "proto_ver": 5,
  • "recv_cnt": 4,
  • "recv_msg": 0,
  • "recv_msg.dropped": 0,
  • "recv_msg.dropped.await_pubrel_timeout": 0,
  • "recv_msg.qos0": 0,
  • "recv_msg.qos1": 0,
  • "recv_msg.qos2": 0,
  • "recv_oct": 49,
  • "recv_pkt": 4,
  • "reductions": 6836,
  • "send_cnt": 4,
  • "send_msg": 0,
  • "send_msg.dropped": 0,
  • "send_msg.dropped.expired": 0,
  • "send_msg.dropped.queue_full": 0,
  • "send_msg.dropped.too_large": 0,
  • "send_msg.qos0": 0,
  • "send_msg.qos1": 0,
  • "send_msg.qos2": 0,
  • "send_oct": 31,
  • "send_pkt": 4,
  • "subscriptions_cnt": 1,
  • "subscriptions_max": "infinity",
  • "username": null
}

Clean client authz cache in the cluster

Clean client authz cache in the cluster.

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string

Responses

Response samples

Content type
application/json
{
  • "code": "CLIENTID_NOT_FOUND",
  • "message": "string"
}

Get client authz cache in the cluster

Get client authz cache in the cluster.

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string

Responses

Response samples

Content type
application/json
{
  • "access": "string",
  • "result": "allow",
  • "topic": "string",
  • "updated_time": 1687850712989
}

Get client in-flight messages

Get client in-flight messages

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
query Parameters
payload
string
Default: "base64"
Enum: "none" "base64" "plain"

Client's inflight/mqueue messages payload encoding.

max_payload_bytes
string
Default: "1MB"
Example: max_payload_bytes=32MB

Client's inflight/mqueue messages payload limit. The total payload size of all messages in the response will not exceed this value. When the limit is reached, the response may contain fewer messages than limit; meta.position points to the last returned message, so the omitted messages can be fetched by requesting the next page from that position. The only exception to this rule is when the first message payload is already larger than the limit, in this case, only the first message will be returned in the response.

string or string or string
Example: position=none

An opaque token returned in meta.position that can be used in a subsequent request to get the next chunk of results: ?position={prev_response.meta.position}.
It is used instead of the page parameter to traverse highly volatile data. It can be omitted or set to none to get the first chunk of data.
If meta.position is end_of_data, there are no more results. Do not send end_of_data in a subsequent request.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get client mqueue messages

Get client mqueue messages

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
query Parameters
payload
string
Default: "base64"
Enum: "none" "base64" "plain"

Client's inflight/mqueue messages payload encoding.

max_payload_bytes
string
Default: "1MB"
Example: max_payload_bytes=32MB

Client's inflight/mqueue messages payload limit. The total payload size of all messages in the response will not exceed this value. When the limit is reached, the response may contain fewer messages than limit; meta.position points to the last returned message, so the omitted messages can be fetched by requesting the next page from that position. The only exception to this rule is when the first message payload is already larger than the limit, in this case, only the first message will be returned in the response.

string or string or string
Example: position=none

An opaque token returned in meta.position that can be used in a subsequent request to get the next chunk of results: ?position={prev_response.meta.position}.
It is used instead of the page parameter to traverse highly volatile data. It can be omitted or set to none to get the first chunk of data.
If meta.position is end_of_data, there are no more results. Do not send end_of_data in a subsequent request.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Subscribe

Force the broker to add a subscription on the named client's behalf.
The subscription is installed directly in the client's channel and persists for the channel's lifetime, just like a client-issued SUBSCRIBE.
This operation bypasses MQTT authorization (ACL) rules by design: the REST API key / dashboard role is the authorization boundary, not the broker's authorization configuration.

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Request Body schema: application/json
nl
integer
Default: 0

No local

qos
integer [ 0 .. 2 ]
Default: 0

QoS

rap
integer
Default: 0

Retain as published

rh
integer
Default: 0

Retain handling

topic
required
string

Topic name

Responses

Request samples

Content type
application/json
{
  • "nl": 0,
  • "qos": 0,
  • "rap": 0,
  • "rh": 0,
  • "topic": "testtopic/#"
}

Response samples

Content type
application/json
{
  • "clientid": "emqx_clientid_xx128cdhfc",
  • "durable": false,
  • "nl": 0,
  • "node": "emqx@127.0.0.1",
  • "qos": 0,
  • "rap": 0,
  • "rh": 0,
  • "topic": "testtopic/1"
}

Subscribe bulk

Force the broker to add multiple subscriptions on the named client's behalf, in a single request.
Each subscription is installed directly in the client's channel and persists for the channel's lifetime, just like a client-issued SUBSCRIBE.
This operation bypasses MQTT authorization (ACL) rules by design: the REST API key / dashboard role is the authorization boundary, not the broker's authorization configuration.

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Request Body schema: application/json
Array
nl
integer
Default: 0

No local

qos
integer [ 0 .. 2 ]
Default: 0

QoS

rap
integer
Default: 0

Retain as published

rh
integer
Default: 0

Retain handling

topic
required
string

Topic name

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Get client subscriptions

Get client subscriptions

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unsubscribe

Force the broker to remove a subscription on the named client's behalf.
This operation bypasses MQTT authorization (ACL) rules by design: the REST API key / dashboard role is the authorization boundary, not the broker's authorization configuration.

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Request Body schema: application/json
topic
string

Topic name

Responses

Request samples

Content type
application/json
{
  • "topic": "testtopic/#"
}

Response samples

Content type
application/json
{
  • "code": "CLIENTID_NOT_FOUND",
  • "message": "string"
}

Unsubscribe bulk

Force the broker to remove multiple subscriptions on the named client's behalf, in a single request.
This operation bypasses MQTT authorization (ACL) rules by design: the REST API key / dashboard role is the authorization boundary, not the broker's authorization configuration.

Authorizations:
basicAuthbearerAuth
path Parameters
clientid
required
string
Request Body schema: application/json
Array
topic
string

Topic name

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": "CLIENTID_NOT_FOUND",
  • "message": "string"
}

Connectors

List Connectors

List connectors.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
only_global
boolean
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {},
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {},
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • [
    ],
  • {
    }
]

Create Connector

Create connector.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
One of
allow_auto_topic_creation
boolean
Default: false

Set to true to allow automatic Kafka topic creation with metadata fetch request.

bridge_kafka.auth_gssapi_kerberos (object) or bridge_kafka.auth_username_password (object) or bridge_kafka.auth_oauth_client_credentials (object) or string or string
Default: "none"

Authentication configs.
- none: No authentication.
- msk_iam: Use MSK IAM authentication. Note: This only works when EMQX is running on an EC2 instance.
- basic auth: Simple username and password authentication.
- kerberos: Use Kerberos GSSAPI authentication.

bootstrap_hosts
required
string

A comma separated list of Kafka host:port endpoints to bootstrap the client.

connect_timeout
string
Default: "5s"

Maximum wait time for TCP connection establishment (including authentication time if enabled).

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this connector.

metadata_request_timeout
string
Default: "5s"

Maximum wait time when fetching topic metadata.

min_metadata_refresh_interval
string
Default: "3s"

Minimum time interval the client has to wait before refreshing Kafka broker and topic metadata. Setting too small a value may add extra load on Kafka.

name
required
string

The name of the connector.

request_timeout
string
Default: "30s"

Maximum duration to wait for a reply from Kafka for a pending request.
When exceeded, the connection is considered stale and is re-established.
Note: if set too small, Kafka may have ingested a produce request while the acknowledgement is delayed; EMQX then resends the already-accepted batch after reconnecting, which can result in duplicates and an overwhelming data volume for downstream consumers.

object (bridge_kafka.connector_resource_opts)
object (bridge_kafka.socket_opts)
object (bridge_kafka.ssl_client_opts)
tags
Array of strings

Tags to annotate this config entry.

type
required
string
Value: "kafka_consumer"

The type of the connector.

Responses

Request samples

Content type
application/json
Example
{
  • "account_key": "******",
  • "account_name": "my_account_name",
  • "description": "My connector",
  • "enable": true,
  • "name": "my_connector",
  • "resource_opts": {
    },
  • "type": "azure_blob_storage"
}

Response samples

Content type
application/json
Example
{
  • "account_key": "******",
  • "account_name": "my_account_name",
  • "description": "My connector",
  • "enable": true,
  • "node_status": [
    ],
  • "resource_opts": {
    },
  • "status": "connected"
}

Delete Connector

Delete connector.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_connector

Connector ID.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Get Connector

Get connector.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_connector

Connector ID.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
Example
{
  • "account_key": "******",
  • "account_name": "my_account_name",
  • "description": "My connector",
  • "enable": true,
  • "node_status": [
    ],
  • "resource_opts": {
    },
  • "status": "connected"
}

Update Connector

Update connector.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_connector

Connector ID.

query Parameters
ns
string
Request Body schema: application/json
One of
allow_auto_topic_creation
boolean
Default: false

Set to true to allow automatic Kafka topic creation with metadata fetch request.

bridge_kafka.auth_gssapi_kerberos (object) or bridge_kafka.auth_username_password (object) or bridge_kafka.auth_oauth_client_credentials (object) or string or string
Default: "none"

Authentication configs.
- none: No authentication.
- msk_iam: Use MSK IAM authentication. Note: This only works when EMQX is running on an EC2 instance.
- basic auth: Simple username and password authentication.
- kerberos: Use Kerberos GSSAPI authentication.

bootstrap_hosts
required
string

A comma separated list of Kafka host:port endpoints to bootstrap the client.

connect_timeout
string
Default: "5s"

Maximum wait time for TCP connection establishment (including authentication time if enabled).

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this connector.

metadata_request_timeout
string
Default: "5s"

Maximum wait time when fetching topic metadata.

min_metadata_refresh_interval
string
Default: "3s"

Minimum time interval the client has to wait before refreshing Kafka broker and topic metadata. Setting too small a value may add extra load on Kafka.

request_timeout
string
Default: "30s"

Maximum duration to wait for a reply from Kafka for a pending request.
When exceeded, the connection is considered stale and is re-established.
Note: if set too small, Kafka may have ingested a produce request while the acknowledgement is delayed; EMQX then resends the already-accepted batch after reconnecting, which can result in duplicates and an overwhelming data volume for downstream consumers.

object (bridge_kafka.connector_resource_opts)
object (bridge_kafka.socket_opts)
object (bridge_kafka.ssl_client_opts)
tags
Array of strings

Tags to annotate this config entry.

Responses

Request samples

Content type
application/json
Example
{
  • "account_key": "******",
  • "account_name": "my_account_name",
  • "description": "My connector",
  • "enable": true,
  • "resource_opts": {
    }
}

Response samples

Content type
application/json
Example
{
  • "account_key": "******",
  • "account_name": "my_account_name",
  • "description": "My connector",
  • "enable": true,
  • "node_status": [
    ],
  • "resource_opts": {
    },
  • "status": "connected"
}

Enable/Disable Connector

Enable or disable connector.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_connector

Connector ID.

enable
required
boolean
Example: true

Enable or disable.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Start Connector

Manually start a connector.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_connector

Connector ID.

operation
required
string
Value: "start"
Example: start

Operation.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Test Connector

Test creating connector.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
One of
allow_auto_topic_creation
boolean
Default: false

Set to true to allow automatic Kafka topic creation with metadata fetch request.

bridge_kafka.auth_gssapi_kerberos (object) or bridge_kafka.auth_username_password (object) or bridge_kafka.auth_oauth_client_credentials (object) or string or string
Default: "none"

Authentication configs.
- none: No authentication.
- msk_iam: Use MSK IAM authentication. Note: This only works when EMQX is running on an EC2 instance.
- basic auth: Simple username and password authentication.
- kerberos: Use Kerberos GSSAPI authentication.

bootstrap_hosts
required
string

A comma separated list of Kafka host:port endpoints to bootstrap the client.

connect_timeout
string
Default: "5s"

Maximum wait time for TCP connection establishment (including authentication time if enabled).

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this connector.

metadata_request_timeout
string
Default: "5s"

Maximum wait time when fetching topic metadata.

min_metadata_refresh_interval
string
Default: "3s"

Minimum time interval the client has to wait before refreshing Kafka broker and topic metadata. Setting too small a value may add extra load on Kafka.

name
required
string

The name of the connector.

request_timeout
string
Default: "30s"

Maximum duration to wait for a reply from Kafka for a pending request.
When exceeded, the connection is considered stale and is re-established.
Note: if set too small, Kafka may have ingested a produce request while the acknowledgement is delayed; EMQX then resends the already-accepted batch after reconnecting, which can result in duplicates and an overwhelming data volume for downstream consumers.

object (bridge_kafka.connector_resource_opts)
object (bridge_kafka.socket_opts)
object (bridge_kafka.ssl_client_opts)
tags
Array of strings

Tags to annotate this config entry.

type
required
string
Value: "kafka_consumer"

The type of the connector.

Responses

Request samples

Content type
application/json
Example
{
  • "account_key": "******",
  • "account_name": "my_account_name",
  • "description": "My connector",
  • "enable": true,
  • "name": "my_connector",
  • "resource_opts": {
    },
  • "type": "azure_blob_storage"
}

Response samples

Content type
application/json
{
  • "code": "TEST_FAILED",
  • "message": "string"
}

Message Transformation

List Transformations

List transformations

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Append Transformation

Append a new transformation to the list of transformations

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Whether this feature is enabled.

failure_action
required
string
Enum: "drop" "disconnect" "ignore"

Action when transformation fails.

object (message_transformation.log_failure)
name
required
string

Transformation name.

Array of objects (message_transformation.operation)
Default: []

List of transformation operations.

string or string or string or string or string
Default: {"type":"none"}

Payload decoder configuration.

string or string or string or string or string
Default: {"type":"none"}

Payload encoder configuration.

tags
Array of strings

Tags to annotate this config entry.

required
Array of strings or string

Topic filters to apply this transformation.

Responses

Request samples

Content type
application/json
{
  • "description": "my transformation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_transformation",
  • "operations": [
    ],
  • "payload_decoder": {
    },
  • "payload_encoder": {
    },
  • "tags": [
    ],
  • "topics": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "my transformation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_transformation",
  • "operations": [
    ],
  • "payload_decoder": {
    },
  • "payload_encoder": {
    },
  • "tags": [
    ],
  • "topics": [
    ]
}

Update Transformation

Update a transformation

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Whether this feature is enabled.

failure_action
required
string
Enum: "drop" "disconnect" "ignore"

Action when transformation fails.

object (message_transformation.log_failure)
name
required
string

Transformation name.

Array of objects (message_transformation.operation)
Default: []

List of transformation operations.

string or string or string or string or string
Default: {"type":"none"}

Payload decoder configuration.

string or string or string or string or string
Default: {"type":"none"}

Payload encoder configuration.

tags
Array of strings

Tags to annotate this config entry.

required
Array of strings or string

Topic filters to apply this transformation.

Responses

Request samples

Content type
application/json
{
  • "description": "my transformation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_transformation",
  • "operations": [
    ],
  • "payload_decoder": {
    },
  • "payload_encoder": {
    },
  • "tags": [
    ],
  • "topics": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "my transformation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_transformation",
  • "operations": [
    ],
  • "payload_decoder": {
    },
  • "payload_encoder": {
    },
  • "tags": [
    ],
  • "topics": [
    ]
}

Dryrun Transformation

Test an input against a transformation

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
required
object (message_transformation_http_api.dryrun_input_message)
required
object (message_transformation.transformation)

Responses

Request samples

Content type
application/json
{
  • "message": {
    },
  • "transformation": {
    }
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Reorder Transformations

Reorder of all transformations

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
order
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "order": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "duplicated": [
    ],
  • "message": "string",
  • "not_found": [
    ],
  • "not_reordered": [
    ]
}

Delete Transformation

Delete a transformation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_transformation

Transformation name

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Lookup Transformation

Lookup a transformation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_transformation

Transformation name

Responses

Response samples

Content type
application/json
{
  • "description": "my transformation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_transformation",
  • "operations": [
    ],
  • "payload_decoder": {
    },
  • "payload_encoder": {
    },
  • "tags": [
    ],
  • "topics": [
    ]
}

Enable Disable Transformation

Enable or disable a particular transformation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_transformation

Transformation name

enable
required
boolean

Enable or disable transformation

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Get Transformation Metrics

Get metrics for a particular transformation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_transformation

Transformation name

Responses

Response samples

Content type
application/json
{
  • "metrics": {
    },
  • "node_metrics": [
    ]
}

Reset Transformation Metrics

Reset metrics for a particular transformation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_transformation

Transformation name

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Metrics

Cluster runtime stats

Current monitor (statistics) data, e.g. number of connections and connection rate in the whole cluster.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "actions_executed_rate": 0,
  • "actions_messages_rate": 0,
  • "cluster_sessions": 0,
  • "connections": 0,
  • "disconnected_durable_sessions": 0,
  • "dropped_msg_rate": 0,
  • "license_quota": 0,
  • "live_connections": 0,
  • "persisted_rate": 0,
  • "received_msg_rate": 0,
  • "retained_msg_count": 0,
  • "rules_matched_rate": 0,
  • "sent_msg_rate": 0,
  • "sessions_hist_hwmark": {
    },
  • "shared_subscriptions": 0,
  • "subscriptions": 0,
  • "subscriptions_durable": 0,
  • "topics": 0,
  • "transformation_failed_rate": 0,
  • "transformation_succeeded_rate": 0,
  • "validation_failed_rate": 0,
  • "validation_succeeded_rate": 0
}

Node runtime stats

Node monitor (statistics) data, e.g. number of connections and connection rate on the specified node.

Authorizations:
basicAuthbearerAuth
path Parameters
node
required
string
Example: emqx@127.0.0.1

Node name

Responses

Response samples

Content type
application/json
{
  • "actions_executed_rate": 0,
  • "actions_messages_rate": 0,
  • "cluster_sessions": 0,
  • "connections": 0,
  • "disconnected_durable_sessions": 0,
  • "dropped_msg_rate": 0,
  • "license_quota": 0,
  • "live_connections": 0,
  • "node_uptime": 0,
  • "persisted_rate": 0,
  • "received_msg_rate": 0,
  • "retained_msg_count": 0,
  • "rules_matched_rate": 0,
  • "sent_msg_rate": 0,
  • "sessions_hist_hwmark": {
    },
  • "shared_subscriptions": 0,
  • "subscriptions": 0,
  • "subscriptions_durable": 0,
  • "topics": 0,
  • "transformation_failed_rate": 0,
  • "transformation_succeeded_rate": 0,
  • "validation_failed_rate": 0,
  • "validation_succeeded_rate": 0
}

Retainer

Delete matching messages

Delete matching messages.

Authorizations:
basicAuthbearerAuth
path Parameters
topic
required
string

Topic.

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Lookup a message

Lookup a message by a topic without wildcards.

Authorizations:
basicAuthbearerAuth
path Parameters
topic
required
string

Topic.

Responses

Response samples

Content type
application/json
{
  • "from_clientid": "string",
  • "from_username": "string",
  • "msgid": "string",
  • "payload": "string",
  • "publish_at": "string",
  • "qos": 0,
  • "topic": "string"
}

Delete Retained Messages

Delete all retained messages

Authorizations:
basicAuthbearerAuth

Responses

List retained messages

List retained messages.

Authorizations:
basicAuthbearerAuth
query Parameters
topic
string

Topic filter, supports wildcards, omit this to match all messages.

page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Publish

Publish a message

Possible HTTP status response codes are:

200: The message is delivered to at least one subscriber;

202: No matched subscribers;

400: Message is invalid. for example bad topic name, or QoS is out of range;

503: Failed to deliver the message to subscriber(s)

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
clientid
string
Deprecated
payload
required
string

The MQTT message payload.

payload_encoding
string
Default: "plain"
Enum: "plain" "base64"

MQTT Payload Encoding, base64 or plain. When set to base64, the message is decoded before it is published.

object (emqx_mgmt_api_publish.message_properties)
qos
integer [ 0 .. 2 ]
Default: 0

MQTT message QoS

retain
boolean
Default: false

A boolean field to indicate if this message should be retained.

topic
required
string

Topic Name

Responses

Request samples

Content type
application/json
{
  • "clientid": "string",
  • "payload": "hello emqx api",
  • "payload_encoding": "plain",
  • "properties": {
    },
  • "qos": 0,
  • "retain": false,
  • "topic": "api/example/topic"
}

Response samples

Content type
application/json
{
  • "id": "string"
}

Publish a batch of messages

Possible HTTP response status code are:

200: All messages are delivered to at least one subscriber;

202: At least one message was not delivered to any subscriber;

400: At least one message is invalid. For example bad topic name, or QoS is out of range;

503: Failed to deliver at least one of the messages;


In case there is at lest one invalid message in the batch, the HTTP response body
is the same as for /publish API.

Otherwise the HTTP response body is an array of JSON objects indicating the publish
result of each individual message in the batch.

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
Array
clientid
string
Deprecated
payload
required
string

The MQTT message payload.

payload_encoding
string
Default: "plain"
Enum: "plain" "base64"

MQTT Payload Encoding, base64 or plain. When set to base64, the message is decoded before it is published.

object (emqx_mgmt_api_publish.message_properties)
qos
integer [ 0 .. 2 ]
Default: 0

MQTT message QoS

retain
boolean
Default: false

A boolean field to indicate if this message should be retained.

topic
required
string

Topic Name

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Rules

List All Events Can Be Used In Rule

List all events can be used in rules

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
{
  • "columns": { },
  • "description": "some desc",
  • "event": "$events/sys/alarm_activated",
  • "sql_example": "string",
  • "test_columns": { },
  • "title": "some title"
}

List All Rules

List all rules

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
only_global
boolean
Default: false
enable
boolean

Filter enable/disable rules

from
string

Filter rules by from(topic), exact match

like_id
string

Filter rules by id, Substring matching

like_from
string

Filter rules by from(topic), Substring matching

like_description
string

Filter rules by description, Substring matching

match_from
string

Filter rules by from(topic), Mqtt topic matching

action
Array of strings

Filters rules that contain any of the given action id(s). When used in conjunction with source id filtering, the rules must contain sources and actions that match some of the criteria.

source
Array of strings

Filters rules that contain any of the given source id(s). When used in conjunction with action id filtering, the rules must contain sources and actions that match some of the criteria.

page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Create Rule By ID

Create a new rule using given Id

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
Array of rule_engine.user_provided_function (object) or rule_engine.builtin_action_console (object) or rule_engine.builtin_action_republish (object) or strings
Default: []

A list of actions of the rule.
An action can be a string that refers to the channel ID of an EMQX bridge, or an object
that refers to a function.
There a some built-in functions like "republish" and "console", and we also support user
provided functions in the format: "{module}:{function}".
The actions in the list are executed sequentially.
This means that if one of the action is executing slowly, all the following actions will not
be executed until it returns.
If one of the action crashed, all other actions come after it will still be executed, in the
original order.
If there's any error when running an action, there will be an error message, and the 'failure'
counter of the function action or the bridge channel will increase.

description
string
Default: ""

The description of the rule

enable
boolean
Default: true

Enable or disable the rule

metadata
object

Rule metadata, do not change manually

name
string
Default: ""

The name of the rule

sql
required
string

SQL query to transform the messages.
Example: SELECT * FROM "test/topic" WHERE payload.x = 1

Responses

Request samples

Content type
application/json
{
  • "actions": [
    ],
  • "description": "Some description",
  • "enable": true,
  • "metadata": { },
  • "name": "foo",
  • "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1"
}

Response samples

Content type
application/json
{
  • "action_details": [
    ],
  • "actions": [
    ],
  • "created_at": "2021-12-01T15:00:43.153+08:00",
  • "description": "Some description",
  • "enable": true,
  • "from": "t/#",
  • "id": "293fb66f",
  • "last_modified_at": "2021-12-24T15:00:44.153+08:00",
  • "metadata": { },
  • "name": "foo",
  • "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1"
}

Delete Cluster Rule

Delete a rule by given Id from all nodes in the cluster

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: my_rule_id
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Get Rule

Get a rule by given Id

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: my_rule_id
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "action_details": [
    ],
  • "actions": [
    ],
  • "created_at": "2021-12-01T15:00:43.153+08:00",
  • "description": "Some description",
  • "enable": true,
  • "from": "t/#",
  • "id": "293fb66f",
  • "last_modified_at": "2021-12-24T15:00:44.153+08:00",
  • "metadata": { },
  • "name": "foo",
  • "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1"
}

Update Cluster Rule

Update a rule by given Id to all nodes in the cluster

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: my_rule_id
query Parameters
ns
string
Request Body schema: application/json
Array of rule_engine.user_provided_function (object) or rule_engine.builtin_action_console (object) or rule_engine.builtin_action_republish (object) or strings
Default: []

A list of actions of the rule.
An action can be a string that refers to the channel ID of an EMQX bridge, or an object
that refers to a function.
There a some built-in functions like "republish" and "console", and we also support user
provided functions in the format: "{module}:{function}".
The actions in the list are executed sequentially.
This means that if one of the action is executing slowly, all the following actions will not
be executed until it returns.
If one of the action crashed, all other actions come after it will still be executed, in the
original order.
If there's any error when running an action, there will be an error message, and the 'failure'
counter of the function action or the bridge channel will increase.

description
string
Default: ""

The description of the rule

enable
boolean
Default: true

Enable or disable the rule

metadata
object

Rule metadata, do not change manually

name
string
Default: ""

The name of the rule

sql
required
string

SQL query to transform the messages.
Example: SELECT * FROM "test/topic" WHERE payload.x = 1

Responses

Request samples

Content type
application/json
{
  • "actions": [
    ],
  • "description": "Some description",
  • "enable": true,
  • "metadata": { },
  • "name": "foo",
  • "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1"
}

Response samples

Content type
application/json
{
  • "action_details": [
    ],
  • "actions": [
    ],
  • "created_at": "2021-12-01T15:00:43.153+08:00",
  • "description": "Some description",
  • "enable": true,
  • "from": "t/#",
  • "id": "293fb66f",
  • "last_modified_at": "2021-12-24T15:00:44.153+08:00",
  • "metadata": { },
  • "name": "foo",
  • "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1"
}

Get Metric

Get a rule's metrics by given Id

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: my_rule_id
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "id": "293fb66f",
  • "metrics": {
    },
  • "node_metrics": [
    ]
}

Reset Rule Metrics

Reset a rule metrics

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: my_rule_id
query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Apply Rule

Apply a rule with the given message and environment

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: my_rule_id
query Parameters
ns
string
Request Body schema: application/json
rule_engine.ctx_unsub (object) or rule_engine.ctx_sub (object) or rule_engine.ctx_schema_validation_failed (object) or rule_engine.ctx_message_transformation_failed (object) or rule_engine.ctx_pub (object) or rule_engine.ctx_dropped (object) or rule_engine.ctx_delivered (object) or rule_engine.ctx_acked (object) or rule_engine.ctx_delivery_dropped (object) or rule_engine.ctx_ping (object) or rule_engine.ctx_disconnected (object) or rule_engine.ctx_connected (object) or rule_engine.ctx_connack (object) or rule_engine.ctx_check_authz_complete (object) or rule_engine.ctx_check_authn_complete (object) or rule_engine.ctx_alarm_deactivated (object) or rule_engine.ctx_alarm_activated (object) or rule_engine.ctx_bridge_mqtt (object)
Default: {}

The context of the event for testing

stop_action_after_template_rendering
boolean
Default: true

Set this to true if the action should be stopped after its template has been rendered (default is true).

Responses

Request samples

Content type
application/json
{
  • "context": { },
  • "stop_action_after_template_rendering": true
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Schema Registry

List schemas

List all registered schemas

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Register schema

Register a new schema

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
One of
description
string
Default: ""

A description for this schema.

name
required
string

A name for the schema that will serve as its identifier.

required
object (schema_registry.external_http_params)
type
required
string
Value: "external_http"

Must be external_http for External HTTP.

Responses

Request samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "name": "my_avro_schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Response samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "name": "my_avro_schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Delete schema

Delete a schema

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_schema

The schema name

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Get schema

Get a schema by its name

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_schema

The schema name

Responses

Response samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "name": "my_avro_schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Update schema

Update an existing schema

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_schema

The schema name

Request Body schema: application/json
One of
description
string
Default: ""

A description for this schema.

required
object (schema_registry.external_http_params)
type
required
string
Value: "external_http"

Must be external_http for External HTTP.

Responses

Request samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Response samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "name": "my_avro_schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Protobuf Bundle Create

Upload a Protobuf bundle for a new schema

Authorizations:
basicAuthbearerAuth
Request Body schema: multipart/form-data
bundle
string <binary>
description
string
name
string
root_proto_file
string

Responses

Response samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "name": "my_avro_schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Protobuf Bundle Update

Upload a Protobuf bundle for an existing schema

Authorizations:
basicAuthbearerAuth
Request Body schema: multipart/form-data
bundle
string <binary>
description
string
name
string
root_proto_file
string

Responses

Response samples

Content type
application/json
{
  • "description": "My Avro Schema",
  • "source": "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}",
  • "type": "avro"
}

Schema Validation

List Validations

List validations

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Append Validation

Append a new validation to the list of validations

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
required
Array of schema_validation.check_external_http (object) or schema_validation.check_protobuf (object) or schema_validation.check_avro (object) or schema_validation.check_json (object) or schema_validation.check_sql (object)

Checks that will be performed during validation. They are evaluated in the same order as defined.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Whether this feature is enabled.

failure_action
required
string
Enum: "drop" "disconnect" "ignore"

How to proceed if the validation fails.

drop: The offending message is simply dropped without further processing.
disconnect: The message is not published, and the publishing client is disconnected.
ignore: Only the failure is logged and traced. No other action is taken.

object (schema_validation.log_failure)
name
required
string

The name for this validation. Must be unique among all validations. It must be a combination of alphanumeric characters and underscores, and cannot start with neither number nor an underscore.

strategy
required
string
Enum: "any_pass" "all_pass"

How the validation should consider the checks to be successful.

all_pass: All checks will be evaluated and must pass.
any_pass: Any passing check will suffice. Stops at the first success.

tags
Array of strings

Tags to annotate this config entry.

required
Array of strings or string

A single topic filter or list of topic filters that this validation should validate.

Responses

Request samples

Content type
application/json
Example
{
  • "checks": [
    ],
  • "description": "my validation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_validation",
  • "strategy": "all_pass",
  • "tags": [
    ],
  • "topics": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "checks": [
    ],
  • "description": "my validation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_validation",
  • "strategy": "all_pass",
  • "tags": [
    ],
  • "topics": [
    ]
}

Update Validation

Update a validation

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
required
Array of schema_validation.check_external_http (object) or schema_validation.check_protobuf (object) or schema_validation.check_avro (object) or schema_validation.check_json (object) or schema_validation.check_sql (object)

Checks that will be performed during validation. They are evaluated in the same order as defined.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Whether this feature is enabled.

failure_action
required
string
Enum: "drop" "disconnect" "ignore"

How to proceed if the validation fails.

drop: The offending message is simply dropped without further processing.
disconnect: The message is not published, and the publishing client is disconnected.
ignore: Only the failure is logged and traced. No other action is taken.

object (schema_validation.log_failure)
name
required
string

The name for this validation. Must be unique among all validations. It must be a combination of alphanumeric characters and underscores, and cannot start with neither number nor an underscore.

strategy
required
string
Enum: "any_pass" "all_pass"

How the validation should consider the checks to be successful.

all_pass: All checks will be evaluated and must pass.
any_pass: Any passing check will suffice. Stops at the first success.

tags
Array of strings

Tags to annotate this config entry.

required
Array of strings or string

A single topic filter or list of topic filters that this validation should validate.

Responses

Request samples

Content type
application/json
{
  • "checks": [
    ],
  • "description": "my validation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_validation",
  • "strategy": "all_pass",
  • "tags": [
    ],
  • "topics": [
    ]
}

Response samples

Content type
application/json
{
  • "checks": [
    ],
  • "description": "my validation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_validation",
  • "strategy": "all_pass",
  • "tags": [
    ],
  • "topics": [
    ]
}

Reorder Validations

Reorder of all validations

Authorizations:
basicAuthbearerAuth
Request Body schema: application/json
order
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "order": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "duplicated": [
    ],
  • "message": "string",
  • "not_found": [
    ],
  • "not_reordered": [
    ]
}

Delete Validation

Delete a validation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_validation

Validation name

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Lookup Validation

Lookup a validation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_validation

Validation name

Responses

Response samples

Content type
application/json
Example
{
  • "checks": [
    ],
  • "description": "my validation",
  • "enable": true,
  • "failure_action": "drop",
  • "log_failure": {
    },
  • "name": "my_validation",
  • "strategy": "all_pass",
  • "tags": [
    ],
  • "topics": [
    ]
}

Enable Disable Validation

Enable or disable a particular validation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_validation

Validation name

enable
required
boolean

Enable or disable validation

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Get Validation Metrics

Get metrics for a particular validation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_validation

Validation name

Responses

Response samples

Content type
application/json
{
  • "metrics": {
    },
  • "node_metrics": [
    ]
}

Reset Validation Metrics

Reset metrics for a particular validation

Authorizations:
basicAuthbearerAuth
path Parameters
name
required
string
Example: my_validation

Validation name

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Sources

List source types

Lists the available source types.

Authorizations:
basicAuthbearerAuth

Responses

Response samples

Content type
application/json
[
  • "mqtt",
  • "kafka_consumer",
  • "gcp_pubsub_consumer",
  • "rabbitmq"
]

List Sources

List all created sources.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
only_global
boolean
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Create Source

Create a new source by type and name.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
One of
connector
required
string

Name of the connector specified by the action, used for external resource selection.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this action.

name
required
string

Name of the resource.

required
object (bridge_rabbitmq.source_parameters)
object (actions_and_sources.source_resource_opts)
tags
Array of strings

Tags to annotate this config entry.

type
required
string
Value: "rabbitmq"

Type of the resource.

Responses

Request samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my source",
  • "enable": true,
  • "name": "my_action",
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "type": "gcp_pubsub_consumer"
}

Response samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my source",
  • "enable": true,
  • "node_status": [
    ],
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "status": "connected"
}

Delete Source

Delete a source by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
also_delete_dep_actions
boolean
Default: false

Whether to cascade delete dependent actions.

ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string",
  • "rules": [
    ]
}

Get Source

Get a source by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my source",
  • "enable": true,
  • "node_status": [
    ],
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "status": "connected"
}

Update Source

Update a source by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string
Request Body schema: application/json
One of
connector
required
string

Name of the connector specified by the action, used for external resource selection.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this action.

required
object (bridge_rabbitmq.source_parameters)
object (actions_and_sources.source_resource_opts)
tags
Array of strings

Tags to annotate this config entry.

Responses

Request samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my source",
  • "enable": true,
  • "parameters": {
    },
  • "resource_opts": {
    }
}

Response samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my source",
  • "enable": true,
  • "node_status": [
    ],
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "status": "connected"
}

Cluster Source Enable

Enable or disable source on all nodes in the cluster.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

enable
required
boolean
Example: true

Whether to enable this bridge.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Get Source Metrics

Get source metrics by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "metrics": {
    },
  • "node_metrics": [
    ]
}

Reset Source Metrics

Reset source metrics by id.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "NOT_FOUND",
  • "message": "string"
}

Cluster Source Operation

Start source on all nodes in the cluster.

Authorizations:
basicAuthbearerAuth
path Parameters
id
required
string
Example: http:my_http_action

The bridge id. Must be of format {type}:{name}.

operation
required
string
Value: "start"
Example: start

Operation can be one of: 'start'.

query Parameters
ns
string

Responses

Response samples

Content type
application/json
{
  • "code": "BAD_REQUEST",
  • "message": "string"
}

Test Source Creation

Test creating a new source.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
Request Body schema: application/json
One of
connector
required
string

Name of the connector specified by the action, used for external resource selection.

description
string
Default: ""

Descriptive text.

enable
boolean
Default: true

Enable (true) or disable (false) this action.

name
required
string

Name of the resource.

required
object (bridge_rabbitmq.source_parameters)
object (actions_and_sources.source_resource_opts)
tags
Array of strings

Tags to annotate this config entry.

type
required
string
Value: "rabbitmq"

Type of the resource.

Responses

Request samples

Content type
application/json
Example
{
  • "connector": "my_connector",
  • "description": "my source",
  • "enable": true,
  • "name": "my_action",
  • "parameters": {
    },
  • "resource_opts": {
    },
  • "type": "gcp_pubsub_consumer"
}

Response samples

Content type
application/json
{
  • "code": "TEST_FAILED",
  • "message": "string"
}

Summarize Sources

Summarize sources.

Authorizations:
basicAuthbearerAuth
query Parameters
ns
string
only_global
boolean
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Subscriptions

List Subscriptions

List subscriptions.

Authorizations:
basicAuthbearerAuth
query Parameters
page
integer >= 1
Default: 1
Example: page=1

Page number of the results to fetch.

limit
integer [ 1 .. 10000 ]
Default: 100
Example: limit=50

Results per page

node
string
Example: node=emqx@127.0.0.1

Node name.

clientid
string

Client ID.

qos
integer [ 0 .. 2 ]
Example: qos=0

QoS.

topic
string

Topic, url encoding.

match_topic
string

Match topic string, url encoding.

share_group
string

Shared subscription group name.

durable
boolean

Filter subscriptions by durability.

Responses

Response samples

Content type
application/json
[
  • {
    }
]