Download OpenAPI specification:Download
Move authenticator in global authentication chain.
id required | string Authenticator ID. |
position required | string Example: before:password_based:built_in_database Position of authenticator in chain. Possible values are 'front', 'rear', 'before:{other_authenticator}', 'after:{other_authenticator}'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get user from authenticator in global authentication chain.
id required | string Authenticator ID. |
user_id required | string User ID. |
{- "user_id": "user1"
}
Update user in authenticator in global authentication chain.
id required | string Authenticator ID. |
user_id required | string User ID. |
password required | string |
is_superuser | boolean Default: false |
{- "password": "******"
}
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Delete user in authenticator in global authentication chain.
id required | string Authenticator ID. |
user_id required | string User ID. |
{- "code": "NOT_FOUND",
- "message": "string"
}
Import users into authenticator in global authentication chain.
id required | string Authenticator ID. |
type required | string Enum: "plain" "hash" Example: type=hash The import file template type, enum with |
Import body
filename | string <binary> |
{- "code": "BAD_REQUEST",
- "message": "string"
}
List users in authenticator in global authentication chain.
id required | string Authenticator ID. |
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(max 10000) |
like_user_id | string Fuzzy search user_id (username or clientid). |
is_superuser | boolean Is superuser |
{- "data": [
- {
- "user_id": "user1"
}, - {
- "is_superuser": true,
- "user_id": "user2"
}
], - "meta": {
- "count": 300,
- "limit": 20,
- "page": 0
}
}
Create users for authenticator in global authentication chain.
id required | string Authenticator ID. |
user_id required | string |
password required | string |
is_superuser | boolean Default: false |
{- "password": "******",
- "user_id": "user1"
}
{- "user_id": "user1"
}
Get authenticator status from global authentication chain.
id required | string Authenticator ID. |
{- "status": "connected",
- "metrics": {
- "nomatch": 0,
- "total": 0,
- "success": 0,
- "failed": 0,
- "rate": 0,
- "rate_last5m": 0,
- "rate_max": 0
}, - "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": "connected"
}
], - "resource_metrics": {
- "success": 0,
- "matched": 0,
- "failed": 0,
- "rate": 0,
- "rate_last5m": 0,
- "rate_max": 0
}, - "node_error": [ ],
- "node_metrics": [
- {
- "node": "emqx@127.0.0.1",
- "metrics": {
- "nomatch": 0,
- "total": 0,
- "matched": 0,
- "failed": 0,
- "rate": 0,
- "rate_last5m": 0,
- "rate_max": 0
}
}
], - "node_resource_metrics": [
- {
- "node": "emqx@127.0.0.1",
- "metrics": {
- "success": 0,
- "matched": 0,
- "failed": 0,
- "rate": 0,
- "rate_last5m": 0,
- "rate_max": 0
}
}
]
}
Get authenticator from global authentication chain.
id required | string Authenticator ID. |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Update authenticator from global authentication chain.
id required | string Authenticator ID. |
mechanism required | string Value: "gcp_device" Authentication mechanism. |
enable | boolean Default: true Set to |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
List authenticators for global authentication.
[- {
- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}, - {
- "mechanism": "password_based",
- "backend": "built_in_database",
- "password_hash_algorithm": {
- "name": "sha256",
- "salt_position": "suffix"
}, - "user_id_type": "username"
}, - {
- "ssl": {
- "enable": false
}, - "connect_timeout": "5s",
- "mechanism": "password_based",
- "pool_size": 8,
- "body": {
- "password": "${password}",
- "username": "${username}"
}, - "headers": {
- "content-type": "application/json"
}, - "method": "post",
- "backend": "http",
- "request_timeout": "5s",
- "enable_pipelining": 100
}, - {
- "mechanism": "password_based",
- "filter": {
- "username": "${username}"
}, - "server": "127.0.0.1:27017",
- "database": "example",
- "backend": "mongodb",
- "password_hash_algorithm": {
- "name": "sha256",
- "salt_position": "suffix"
}, - "collection": "users",
- "is_superuser_field": "is_superuser",
- "password_hash_field": "password_hash",
- "salt_field": "salt"
}, - {
- "mechanism": "password_based",
- "cmd": "HMGET ${username} password_hash salt",
- "server": "127.0.0.1:6379",
- "database": 0,
- "backend": "redis",
- "password_hash_algorithm": {
- "name": "sha256",
- "salt_position": "suffix"
}, - "redis_type": "single"
}
]
Create authenticator for global authentication.
mechanism required | string Value: "gcp_device" Authentication mechanism. |
enable | boolean Default: true Set to |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Reorder all authenticators in global authentication chain.
id required | string Authenticator ID. |
[- {
- "id": "password_based:built_in_database"
}
]
{- "code": "BAD_REQUEST",
- "message": "string"
}
Start bridge on all nodes in the cluster.
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'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Enable or Disable bridge on all nodes in the cluster.
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. |
{- "code": "NOT_FOUND",
- "message": "string"
}
[- {
- "name": "my_azure_event_hub_producer_action",
- "status": "connected",
- "type": "azure_event_hub_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "local_topic": "mqtt/local/topic"
}, - {
- "name": "cassandra_action",
- "status": "connected",
- "type": "cassandra",
- "description": "My example cassandra action",
- "enable": true,
- "parameters": {
- "cql": "insert into mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, ${timestamp})"
}, - "connector": "cassandra_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "clickhouse_action",
- "status": "connected",
- "type": "clickhouse",
- "description": "My example clickhouse action",
- "enable": true,
- "parameters": {
- "sql": "INSERT INTO messages(data, arrived) VALUES ('${payload}', ${timestamp})",
- "batch_value_separator": ", "
}, - "connector": "clickhouse_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "my_confluent_producer_action",
- "status": "connected",
- "type": "confluent_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_confluent_producer_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "local_topic": "mqtt/local/topic"
}, - {
- "name": "dynamo_action",
- "status": "connected",
- "type": "dynamo",
- "description": "My example dynamo action",
- "enable": true,
- "connector": "dynamo_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}, - "parameters": {
- "table": "mqtt_msg",
- "template": ""
}
}, - {
- "name": "elasticsearch_action",
- "status": "connected",
- "type": "elasticsearch",
- "description": "My example elasticsearch action",
- "enable": true,
- "parameters": {
- "index": "${payload.index}",
- "action": "create",
- "doc": "${payload.doc}",
- "overwrite": true
}, - "connector": "elasticsearch_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "status": "connected",
- "description": "My action",
- "enable": true,
- "parameters": {
- "payload_template": "${payload}",
- "attributes_template": [
- {
- "value": "${payload.attrs.v}",
- "key": "${payload.attrs.k}"
}
], - "ordering_key_template": "${payload.ok}",
- "pubsub_topic": "mytopic"
}, - "connector": "my_connector_name",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "batch_size": 5
}, - "local_topic": "local/topic"
}, - {
- "name": "greptimedb_action",
- "status": "connected",
- "type": "greptimedb",
- "description": "My example greptimedb action",
- "enable": true,
- "parameters": {
- "precision": "ms",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}"
}, - "connector": "greptimedb_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "hstreamdb_action",
- "status": "connected",
- "type": "hstreamdb",
- "description": "My example hstreamdb action",
- "enable": true,
- "connector": "hstreamdb_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}, - "parameters": {
- "aggregation_pool_size": 8,
- "partition_key": "hej",
- "record_template": "${payload}",
- "stream": "mqtt_message",
- "writer_pool_size": 8
}
}, - {
- "name": "my_http_action",
- "status": "connected",
- "type": "http",
- "enable": true,
- "parameters": {
- "path": "/room/${room_no}",
- "body": "${.}",
- "headers": { },
- "method": "post"
}, - "connector": "my_http_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "worker_pool_size": 16,
- "query_mode": "async",
- "health_check_interval": "15s"
}
}, - {
- "name": "influxdb_action",
- "status": "connected",
- "type": "influxdb",
- "description": "My example influxdb action",
- "enable": true,
- "parameters": {
- "precision": "ms",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,bool=${payload.bool}"
}, - "connector": "influxdb_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "iotdb_action",
- "status": "connected",
- "type": "iotdb",
- "description": "My example iotdb action",
- "enable": true,
- "parameters": {
- "data": [
- {
- "timestamp": "now",
- "value": "${st}",
- "data_type": "BOOLEAN",
- "measurement": "status"
}
], - "device_id": "my_device",
- "is_aligned": false
}, - "connector": "iotdb_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "my_kafka_producer_action",
- "status": "connected",
- "type": "kafka_producer",
- "enable": true,
- "parameters": {
- "message": {
- "timestamp": "${.timestamp}",
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "compression": "no_compression",
- "topic": "kafka-topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partitions_limit": "all_partitions",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_kafka_producer_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "32s"
}, - "local_topic": "mqtt/local/topic"
}, - {
- "name": "kinesis_action",
- "status": "connected",
- "type": "kinesis",
- "description": "My example kinesis action",
- "enable": true,
- "parameters": {
- "partition_key": "any_key",
- "payload_template": "${.}",
- "stream_name": "my_stream"
}, - "connector": "kinesis_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "my_action",
- "status": "connected",
- "type": "matrix",
- "enable": true,
- "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 16,
- "inflight_window": 100,
- "request_ttl": "45s",
- "batch_time": "50ms",
- "max_buffer_bytes": "256MB"
}, - "parameters": {
- "sql": "INSERT INTO client_events(clientid, event, created_at)VALUES (\n ${clientid},\n ${event},\n TO_TIMESTAMP((${timestamp} :: bigint))\n)"
}
}, - {
- "name": "mongodb_action",
- "status": "connected",
- "type": "mongodb",
- "description": "My example mongodb action",
- "enable": true,
- "parameters": {
- "collection": "mycol"
}, - "connector": "mongodb_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "mqtt_action",
- "status": "connected",
- "type": "mqtt",
- "description": "My example mqtt action",
- "enable": true,
- "parameters": {
- "retain": false,
- "payload": "${.payload}",
- "topic": "remote/topic",
- "qos": 2
}, - "connector": "mqtt_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "mysql_action",
- "status": "connected",
- "type": "mysql",
- "description": "My example mysql action",
- "enable": true,
- "parameters": {
- "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, FROM_UNIXTIME(${timestamp}/1000))"
}, - "connector": "mysql_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "opents_action",
- "status": "connected",
- "type": "opents",
- "description": "My example opents action",
- "enable": true,
- "parameters": {
- "data": [
- {
- "value": "${value}",
- "tags": "${tags}",
- "metric": "${metric}"
}
]
}, - "connector": "opents_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "oracle_action",
- "status": "connected",
- "type": "oracle",
- "description": "My example oracle action",
- "enable": true,
- "parameters": {
- "sql": "insert into t_mqtt_msgs(msgid, topic, qos, payload) values (${id}, ${topic}, ${qos}, ${payload})"
}, - "connector": "oracle_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "my_action",
- "status": "connected",
- "type": "pgsql",
- "enable": true,
- "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 16,
- "inflight_window": 100,
- "request_ttl": "45s",
- "batch_time": "50ms",
- "max_buffer_bytes": "256MB"
}, - "parameters": {
- "sql": "INSERT INTO client_events(clientid, event, created_at)VALUES (\n ${clientid},\n ${event},\n TO_TIMESTAMP((${timestamp} :: bigint))\n)"
}
}, - {
- "name": "pulsar_action",
- "status": "connected",
- "type": "pulsar",
- "description": "My example pulsar action",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "sync_timeout": "5s",
- "pulsar_topic": "test_topic"
}, - "connector": "pulsar_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "rabbitmq_action",
- "status": "connected",
- "type": "rabbitmq",
- "description": "My example rabbitmq action",
- "enable": true,
- "parameters": {
- "exchange": "test_exchange",
- "payload_template": "${.payload}",
- "routing_key": "/",
- "wait_for_publish_confirmations": true,
- "delivery_mode": "non_persistent",
- "publish_confirmation_timeout": "30s"
}, - "connector": "rabbitmq_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "status": "connected",
- "description": "My action",
- "enable": true,
- "parameters": {
- "command_template": [
- "LPUSH",
- "MSGS",
- "${payload}"
]
}, - "connector": "my_connector_name",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "batch_size": 1
}
}, - {
- "name": "rocketmq_action",
- "status": "connected",
- "type": "rocketmq",
- "description": "My example rocketmq action",
- "enable": true,
- "connector": "rocketmq_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}, - "parameters": {
- "refresh_interval": "3s",
- "send_buffer": "1024KB",
- "sync_timeout": "3s",
- "template": "",
- "topic": "TopicTest"
}
}, - {
- "status": "connected",
- "description": "My action",
- "enable": true,
- "parameters": {
- "key": "${topic}",
- "content": "${payload}",
- "bucket": "${clientid}",
- "acl": "public_read"
}, - "connector": "my_s3_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "query_mode": "sync",
- "inflight_window": 10
}
}, - {
- "name": "sqlserver_action",
- "status": "connected",
- "type": "sqlserver",
- "description": "My example sqlserver action",
- "enable": true,
- "connector": "sqlserver_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}, - "parameters": {
- "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload) values ( ${id}, ${topic}, ${qos}, ${payload} )"
}
}, - {
- "name": "syskeeper_forwarder",
- "status": "connected",
- "type": "syskeeper_forwarder",
- "enable": true,
- "parameters": {
- "template": "${payload}",
- "target_topic": "${topic}"
}, - "connector": "syskeeper_forwarder",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "worker_pool_size": 16
}
}, - {
- "name": "tdengine_action",
- "status": "connected",
- "type": "tdengine",
- "description": "My example tdengine action",
- "enable": true,
- "parameters": {
- "database": "mqtt",
- "sql": "insert into t_mqtt_msg(ts, msgid, mqtt_topic, qos, payload, arrived) values (${ts}, '${id}', '${topic}', ${qos}, '${payload}', ${timestamp})"
}, - "connector": "tdengine_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "my_action",
- "status": "connected",
- "type": "timescale",
- "enable": true,
- "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 16,
- "inflight_window": 100,
- "request_ttl": "45s",
- "batch_time": "50ms",
- "max_buffer_bytes": "256MB"
}, - "parameters": {
- "sql": "INSERT INTO client_events(clientid, event, created_at)VALUES (\n ${clientid},\n ${event},\n TO_TIMESTAMP((${timestamp} :: bigint))\n)"
}
}
]
Create a new bridge by type and name.
type required | string Value: "timescale" The Bridge Type |
name required | string Bridge name. |
local_topic | string MQTT topic or topic filter as data source (action input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in the remote system. |
enable | boolean Default: true Enable (true) or disable (false) this action. |
connector required | string Name of the connector specified by the action, used for external resource selection. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
required | object (bridge_pgsql.action_parameters) |
object (actions_and_sources.action_resource_opts) |
{- "name": "my_azure_event_hub_producer_action",
- "type": "azure_event_hub_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "local_topic": "mqtt/local/topic"
}
{- "name": "my_azure_event_hub_producer_action",
- "status": "connected",
- "type": "azure_event_hub_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "local_topic": "mqtt/local/topic"
}
Test creating a new bridge.
type required | string Value: "timescale" The Bridge Type |
name required | string Bridge name. |
local_topic | string MQTT topic or topic filter as data source (action input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in the remote system. |
enable | boolean Default: true Enable (true) or disable (false) this action. |
connector required | string Name of the connector specified by the action, used for external resource selection. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
required | object (bridge_pgsql.action_parameters) |
object (actions_and_sources.action_resource_opts) |
{- "name": "my_azure_event_hub_producer_action",
- "type": "azure_event_hub_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "local_topic": "mqtt/local/topic"
}
{- "code": "TEST_FAILED",
- "message": "string"
}
Lists the available action types.
[- "http",
- "rocketmq",
- "cassandra",
- "rabbitmq",
- "pulsar",
- "greptimedb",
- "hstreamdb",
- "influxdb",
- "mongodb",
- "azure_event_hub_producer",
- "confluent_producer",
- "gcp_pubsub_producer",
- "iotdb",
- "kafka_producer",
- "sqlserver",
- "syskeeper_forwarder",
- "kinesis",
- "opents",
- "redis",
- "s3",
- "mqtt",
- "clickhouse",
- "tdengine",
- "oracle",
- "timescale",
- "elasticsearch",
- "matrix",
- "mysql",
- "pgsql",
- "dynamo"
]
Get a bridge by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
{- "name": "my_azure_event_hub_producer_action",
- "status": "connected",
- "type": "azure_event_hub_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "local_topic": "mqtt/local/topic"
}
Update a bridge by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
local_topic | string MQTT topic or topic filter as data source (action input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in the remote system. |
enable | boolean Default: true Enable (true) or disable (false) this action. |
connector required | string Name of the connector specified by the action, used for external resource selection. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
required | object (bridge_pgsql.action_parameters) |
object (actions_and_sources.action_resource_opts) |
{- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "local_topic": "mqtt/local/topic"
}
{- "name": "my_azure_event_hub_producer_action",
- "status": "connected",
- "type": "azure_event_hub_producer",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "connector": "my_azure_event_hub_producer_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "local_topic": "mqtt/local/topic"
}
Delete a bridge by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
also_delete_dep_actions | boolean Default: false Whether to cascade delete dependent actions. |
{- "rules": [
- "string"
], - "code": "BAD_REQUEST",
- "message": "string"
}
Get bridge metrics by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
{- "metrics": {
- "dropped": 0,
- "dropped.other": 0,
- "dropped.queue_full": 0,
- "dropped.resource_not_found": 0,
- "dropped.resource_stopped": 0,
- "matched": 0,
- "queuing": 0,
- "retried": 0,
- "failed": 0,
- "inflight": 0,
- "success": 0,
- "rate": 0,
- "rate_max": 0,
- "rate_last5m": 0,
- "received": 0
}, - "node_metrics": [
- {
- "node": "emqx@127.0.0.1",
- "metrics": {
- "dropped": 0,
- "dropped.other": 0,
- "dropped.queue_full": 0,
- "dropped.resource_not_found": 0,
- "dropped.resource_stopped": 0,
- "matched": 0,
- "queuing": 0,
- "retried": 0,
- "failed": 0,
- "inflight": 0,
- "success": 0,
- "rate": 0,
- "rate_max": 0,
- "rate_last5m": 0,
- "received": 0
}
}
]
}
Start bridge on a specific node.
node required | |
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'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Current monitor (statistics) data, e.g. number of connections and connection rate in the whole cluster.
{- "dropped_msg_rate": 0,
- "sent_msg_rate": 0,
- "received_msg_rate": 0,
- "subscriptions": 0,
- "topics": 0,
- "connections": 0,
- "live_connections": 0,
- "retained_msg_count": 0,
- "shared_subscriptions": 0,
- "license_quota": 0
}
Node monitor (statistics) data, e.g. number of connections and connection rate on the specified node.
node required | string Example: emqx@127.0.0.1 EMQX node name. |
{- "dropped_msg_rate": 0,
- "sent_msg_rate": 0,
- "received_msg_rate": 0,
- "subscriptions": 0,
- "topics": 0,
- "connections": 0,
- "live_connections": 0,
- "node_uptime": 0,
- "retained_msg_count": 0,
- "shared_subscriptions": 0,
- "license_quota": 0
}
List the monitor (statistics) data on the specified node.
node required | string Example: emqx@127.0.0.1 EMQX node name. |
latest | integer >= 1 Example: latest=300 The latest N seconds data. Like 300 for 5 min. |
[- {
- "time_stamp": 0,
- "subscriptions": 0,
- "topics": 0,
- "connections": 0,
- "live_connections": 0,
- "received": 0,
- "sent": 0,
- "dropped": 0
}
]
List monitor (statistics) data for the whole cluster.
latest | integer >= 1 Example: latest=300 The latest N seconds data. Like 300 for 5 min. |
[- {
- "time_stamp": 0,
- "subscriptions": 0,
- "topics": 0,
- "connections": 0,
- "live_connections": 0,
- "received": 0,
- "sent": 0,
- "dropped": 0
}
]
Enable or disable delayed, set max delayed messages
enable | boolean Default: true Enable this feature |
max_delayed_messages | integer Default: 0 Maximum number of delayed messages (0 is no limit). |
{- "enable": true,
- "max_delayed_messages": 0
}
{- "enable": true,
- "max_delayed_messages": 0
}
View delayed message
node required | string The node where message from |
msgid required | string Delayed Message ID |
{- "msgid": 0,
- "node": "string",
- "publish_at": "string",
- "delayed_interval": 1,
- "delayed_remaining": 0,
- "expected_at": "string",
- "topic": "/sys/#",
- "qos": 0,
- "from_clientid": "string",
- "from_username": "string"
}
Update all rewrite rules
action required | string Enum: "subscribe" "publish" "all" Topic rewriting takes effect on the type of operation: |
source_topic required | string Source topic, specified by the client. |
dest_topic required | string Destination topic. |
re required | string Regular expressions |
[- {
- "action": "publish",
- "source_topic": "x/#",
- "dest_topic": "z/y/$1",
- "re": "^x/y/(.+)$"
}
]
[- {
- "action": "publish",
- "source_topic": "x/#",
- "dest_topic": "z/y/$1",
- "re": "^x/y/(.+)$"
}
]
Get topic metrics
topic required | string Example: testtopic/1 Topic string. Notice: Topic string in url path must be encoded |
{- "topic": "testtopic/1",
- "create_time": "2022-01-14T21:48:47+08:00",
- "reset_time": "2022-01-14T21:48:47+08:00",
- "metrics": {
- "message.dropped.count": 0,
- "message.in.count": 0,
- "message.out.count": 0,
- "message.qos0.in.count": 0,
- "message.qos0.out.count": 0,
- "message.qos1.in.count": 0,
- "message.qos1.out.count": 0,
- "message.qos2.in.count": 0,
- "message.qos2.out.count": 0,
- "message.dropped.rate": 0,
- "message.in.rate": 0,
- "message.out.rate": 0,
- "message.qos0.in.rate": 0,
- "message.qos0.out.rate": 0,
- "message.qos1.in.rate": 0,
- "message.qos1.out.rate": 0,
- "message.qos2.in.rate": 0,
- "message.qos2.out.rate": 0
}
}
[- {
- "topic": "testtopic/1",
- "create_time": "2022-01-14T21:48:47+08:00",
- "reset_time": "2022-01-14T21:48:47+08:00",
- "metrics": {
- "message.dropped.count": 0,
- "message.in.count": 0,
- "message.out.count": 0,
- "message.qos0.in.count": 0,
- "message.qos0.out.count": 0,
- "message.qos1.in.count": 0,
- "message.qos1.out.count": 0,
- "message.qos2.in.count": 0,
- "message.qos2.out.count": 0,
- "message.dropped.rate": 0,
- "message.in.rate": 0,
- "message.out.rate": 0,
- "message.qos0.in.rate": 0,
- "message.qos0.out.rate": 0,
- "message.qos1.in.rate": 0,
- "message.qos1.out.rate": 0,
- "message.qos2.in.rate": 0,
- "message.qos2.out.rate": 0
}
}
]
Reset telemetry status
topic | string Topic Name. If this parameter is not present,all created topic metrics will be reset. |
action required | string Action. Only support reset |
{- "action": "reset"
}
{- "code": "TOPIC_NOT_FOUND",
- "message": "string"
}
Create topic metrics
topic required | string Raw topic string |
{- "topic": "testtopic/1"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
List delayed 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(max 10000) |
{- "data": [
- {
- "msgid": 0,
- "node": "string",
- "publish_at": "string",
- "delayed_interval": 1,
- "delayed_remaining": 0,
- "expected_at": "string",
- "topic": "/sys/#",
- "qos": 0,
- "from_clientid": "string",
- "from_username": "string",
- "payload": "string"
}
], - "meta": {
- "page": 1,
- "limit": 1,
- "count": 0
}
}
Observe or Cancel observe a resource
clientid required | string Example: urn:oma:lwm2m:oma:2 |
path required | string Example: path=/3/0/7 |
enable required | boolean Example: enable=true |
{- "code": "CLIENT_NOT_FOUND",
- "message": "string"
}
Look up a resource
clientid required | string Example: urn:oma:lwm2m:oma:2 |
path required | string Example: path=/3/0/7 |
action required | string Example: action=discover |
{- "clientid": "urn:oma:lwm2m:oma:2",
- "path": "/3/0/7",
- "action": "discover",
- "codeMsg": "reply_not_received",
- "content": [
- {
- "operations": "E",
- "dataType": "Integer",
- "path": "urn:oma:lwm2m:oma:2",
- "name": "lwm2m-test"
}
]
}
Send a read command to a resource
clientid required | string Example: urn:oma:lwm2m:oma:2 |
path required | string Example: path=/3/0/7 |
{- "code": "CLIENT_NOT_FOUND",
- "message": "string"
}
Send a write command to a resource
clientid required | string Example: urn:oma:lwm2m:oma:2 |
path required | string Example: path=/3/0/7 |
type required | string Enum: "Integer" "Float" "Time" "String" "Boolean" "Opaque" "Objlnk" Example: type=Integer |
value required | string Example: value=123 |
{- "code": "CLIENT_NOT_FOUND",
- "message": "string"
}
Describs plugin according to its release.json
and README.md
.
name required | string Example: emqx_plugin_template-5.0-rc.1 ^[A-Za-z]+[A-Za-z0-9-_.]*$ |
{- "name": "emqx_plugin_template-5.0-rc.1",
- "author": [
- "EMQX Team"
], - "builder": {
- "contact": "emqx-support@emqx.io",
- "name": "EMQX Team",
- "website": "www.emqx.com"
}, - "built_on_otp_release": "24",
- "compatibility": {
- "emqx": "~>5.0"
}, - "git_commit_or_build_date": "2021-12-25",
- "functionality": [
- "Demo"
], - "git_ref": "ddab50fafeed6b1faea70fc9ffd8c700d7e26ec1",
- "metadata_vsn": "0.1.0",
- "rel_vsn": "5.0-rc.1",
- "rel_apps": [
- "emqx_plugin_template-5.0.0",
- "map_sets-1.1.0"
], - "description": "This is an demo plugin description",
- "running_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": "running"
}
], - "readme": "This is an demo plugin."
}
Uninstalls a previously uploaded plugin package.
name required | string Example: emqx_plugin_template-5.0-rc.1 ^[A-Za-z]+[A-Za-z0-9-_.]*$ |
{- "code": "PARAM_ERROR",
- "message": "string"
}
start/stop a installed plugin.
- start: start the plugin.
- stop: stop the plugin.
name required | string Example: emqx_plugin_template-5.0-rc.1 ^[A-Za-z]+[A-Za-z0-9-_.]*$ |
action required | string Enum: "start" "stop" Action |
{- "code": "NOT_FOUND",
- "message": "string"
}
Plugins are launched in top-down order.
Use POST /plugins/{name}/move
to change the boot order.
[- {
- "name": "emqx_plugin_template-5.0-rc.1",
- "author": [
- "EMQX Team"
], - "builder": {
- "contact": "emqx-support@emqx.io",
- "name": "EMQX Team",
- "website": "www.emqx.com"
}, - "built_on_otp_release": "24",
- "compatibility": {
- "emqx": "~>5.0"
}, - "git_commit_or_build_date": "2021-12-25",
- "functionality": [
- "Demo"
], - "git_ref": "ddab50fafeed6b1faea70fc9ffd8c700d7e26ec1",
- "metadata_vsn": "0.1.0",
- "rel_vsn": "5.0-rc.1",
- "rel_apps": [
- "emqx_plugin_template-5.0.0",
- "map_sets-1.1.0"
], - "description": "This is an demo plugin description",
- "running_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": "running"
}
], - "readme": "This is an demo plugin."
}
]
Setting the boot order of plugins.
name required | string Example: emqx_plugin_template-5.0-rc.1 ^[A-Za-z]+[A-Za-z0-9-_.]*$ |
string or string or string
|
{- "position": "after:emqx_plugin_demo-5.1-rc.2"
}
{- "code": "MOVE_FAILED",
- "message": "string"
}
Upload a plugin tarball (plugin-vsn.tar.gz).Follow emqx-plugin-template to develop plugin.
plugin | string <binary> |
{- "code": "UNEXPECTED_ERROR",
- "message": "string"
}
Stop/Restart bridges on a specific node.
node required | |
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
operation required | string Enum: "start" "stop" "restart" Example: start Operations can be one of: stop, restart |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Test creating a new bridge by given ID
The ID must be of format '{type}:{name}'
type required | string Enum: "kafka" "kafka_producer" "kafka_consumer" The Action Type |
name required | string Action name, used as a human-readable identifier. |
enable | boolean Default: true Enable (true) or disable (false) this connector. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
bootstrap_hosts required | string A comma separated list of Kafka |
connect_timeout | string Default: "5s" Maximum wait time for TCP connection establishment (including authentication time if enabled). |
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 value may add extra load on Kafka. |
metadata_request_timeout | string Default: "5s" Maximum wait time when fetching topic metadata. |
bridge_kafka.auth_gssapi_kerberos (object) or bridge_kafka.auth_username_password (object) or string Default: "none" Authentication configs. | |
object (bridge_kafka.socket_opts) | |
object (bridge_kafka.ssl_client_opts) | |
object (bridge_kafka.connector_resource_opts) | |
local_topic | string MQTT topic or topic filter as data source (action input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in Kafka. |
required | object (bridge_kafka.producer_kafka_opts) |
{- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}
{- "code": "TEST_FAILED",
- "message": "string"
}
Enable or Disable bridges on all nodes in the cluster.
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
enable required | boolean Example: true Whether to enable this bridge |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get bridge metrics by Id
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
{- "metrics": {
- "dropped": 0,
- "dropped.other": 0,
- "dropped.queue_full": 0,
- "dropped.resource_not_found": 0,
- "dropped.resource_stopped": 0,
- "matched": 0,
- "queuing": 0,
- "retried": 0,
- "failed": 0,
- "inflight": 0,
- "success": 0,
- "rate": 0,
- "rate_max": 0,
- "rate_last5m": 0,
- "received": 0
}, - "node_metrics": [
- {
- "node": "emqx@127.0.0.1",
- "metrics": {
- "dropped": 0,
- "dropped.other": 0,
- "dropped.queue_full": 0,
- "dropped.resource_not_found": 0,
- "dropped.resource_stopped": 0,
- "matched": 0,
- "queuing": 0,
- "retried": 0,
- "failed": 0,
- "inflight": 0,
- "success": 0,
- "rate": 0,
- "rate_max": 0,
- "rate_last5m": 0,
- "received": 0
}
}
]
}
Get a bridge by Id
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
{- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}
Update a bridge by Id
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
enable | boolean Default: true Enable (true) or disable (false) this connector. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
bootstrap_hosts required | string A comma separated list of Kafka |
connect_timeout | string Default: "5s" Maximum wait time for TCP connection establishment (including authentication time if enabled). |
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 value may add extra load on Kafka. |
metadata_request_timeout | string Default: "5s" Maximum wait time when fetching topic metadata. |
bridge_kafka.auth_gssapi_kerberos (object) or bridge_kafka.auth_username_password (object) or string Default: "none" Authentication configs. | |
object (bridge_kafka.socket_opts) | |
object (bridge_kafka.ssl_client_opts) | |
object (bridge_kafka.connector_resource_opts) | |
local_topic | string MQTT topic or topic filter as data source (action input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in Kafka. |
required | object (bridge_kafka.producer_kafka_opts) |
{- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}
{- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}
Delete a bridge by Id
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
{- "rules": [
- "string"
], - "code": "BAD_REQUEST",
- "message": "string"
}
Stop/Restart bridges on all nodes in the cluster.
id required | string Example: http:http_example The bridge Id. Must be of format {type}:{name} |
operation required | string Enum: "start" "stop" "restart" Example: start Operations can be one of: stop, restart |
{- "code": "BAD_REQUEST",
- "message": "string"
}
[- {
- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}, - {
- "name": "My IoTDB Bridge",
- "type": "iotdb",
- "ssl": {
- "enable": false
}, - "authentication": {
- "password": "*****",
- "username": "root"
}, - "connect_timeout": "15s",
- "pool_size": 8,
- "enable": true,
- "pool_type": "random",
- "resource_opts": {
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "max_buffer_bytes": 268435456
}, - "enable_pipelining": 100,
- "iotdb_version": "v1.1.x",
- "device_id": "my_device",
- "is_aligned": false
}, - {
- "name": "my_azure_event_hub_producer",
- "status": "connected",
- "type": "azure_event_hub_producer",
- "authentication": {
- "password": "******"
}, - "connect_timeout": "5s",
- "enable": true,
- "parameters": {
- "message": {
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "topic": "topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${.pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "socket_opts": {
- "nodelay": true,
- "recbuf": "1024KB",
- "sndbuf": "1024KB",
- "tcp_keepalive": "none"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "local_topic": "mqtt/local/topic",
- "min_metadata_refresh_interval": "3s",
- "bootstrap_hosts": "namespace.servicebus.windows.net:9093",
- "metadata_request_timeout": "4s"
}, - {
- "name": "my_kafka_producer_action",
- "status": "connected",
- "type": "kafka_producer",
- "authentication": {
- "mechanism": "plain",
- "password": "******",
- "username": "username"
}, - "connect_timeout": "5s",
- "enable": true,
- "socket_opts": {
- "nodelay": true,
- "recbuf": "1024KB",
- "sndbuf": "1024KB",
- "tcp_keepalive": "none"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "kafka": {
- "message": {
- "timestamp": "${.timestamp}",
- "value": "${.}",
- "key": "${.clientid}"
}, - "buffer": {
- "mode": "hybrid",
- "segment_bytes": "100MB",
- "per_partition_limit": "2GB",
- "memory_overload_protection": true
}, - "compression": "no_compression",
- "topic": "kafka-topic",
- "max_inflight": 10,
- "required_acks": "all_isr",
- "max_batch_bytes": "896KB",
- "kafka_headers": "${pub_props}",
- "kafka_ext_headers": [
- {
- "kafka_ext_header_value": "${clientid}",
- "kafka_ext_header_key": "clientid"
}, - {
- "kafka_ext_header_value": "${topic}",
- "kafka_ext_header_key": "topic"
}
], - "kafka_header_value_encode_mode": "none",
- "partitions_limit": "all_partitions",
- "partition_strategy": "random",
- "partition_count_refresh_interval": "60s"
}, - "local_topic": "mqtt/local/topic",
- "min_metadata_refresh_interval": "3s",
- "bootstrap_hosts": "localhost:9092",
- "metadata_request_timeout": "4s"
}, - {
- "name": "redis_bridge",
- "type": "redis_sentinel",
- "ssl": {
- "enable": false
}, - "pool_size": 8,
- "enable": true,
- "password": "******",
- "database": 1,
- "resource_opts": {
- "batch_size": 1,
- "batch_time": "20ms"
}, - "sentinel": "mymaster",
- "servers": [
- "127.0.0.1:26379"
], - "redis_type": "sentinel",
- "local_topic": "local/topic/#",
- "command_template": [
- "LPUSH",
- "MSGS",
- "${payload}"
]
}, - {
- "authentication": "none",
- "batch_size": 1,
- "buffer": {
- "memory_overload_protection": true,
- "mode": "memory",
- "per_partition_limit": "10MB",
- "segment_bytes": "5MB"
}, - "compression": "no_compression",
- "enable": true,
- "local_topic": "mqtt/topic/-576460752303423482",
- "max_batch_bytes": "900KB",
- "message": {
- "key": "${.clientid}",
- "value": "${.}"
}, - "name": "pulsar_example_name",
- "pulsar_topic": "pulsar_example_topic",
- "retention_period": "infinity",
- "send_buffer": "1MB",
- "servers": "pulsar://127.0.0.1:6650",
- "ssl": {
- "enable": false,
- "server_name_indication": "auto",
- "verify": "verify_none"
}, - "strategy": "key_dispatch",
- "sync_timeout": "5s",
- "type": "pulsar_producer"
}, - {
- "name": "foo",
- "status": "connected",
- "type": "pgsql",
- "pool_size": 8,
- "server": "127.0.0.1:5432",
- "enable": true,
- "password": "******",
- "username": "root",
- "database": "mqtt",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, TO_TIMESTAMP((${timestamp} :: bigint)/1000))",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}, - {
- "name": "redis_bridge",
- "type": "redis_cluster",
- "ssl": {
- "enable": false
}, - "pool_size": 8,
- "enable": true,
- "password": "******",
- "resource_opts": { },
- "servers": [
- "127.0.0.1:6379"
], - "redis_type": "cluster",
- "local_topic": "local/topic/#",
- "command_template": [
- "LPUSH",
- "MSGS",
- "${payload}"
]
}, - {
- "name": "foo",
- "type": "mysql",
- "pool_size": 8,
- "server": "127.0.0.1:3306",
- "enable": true,
- "password": "******",
- "username": "root",
- "database": "test",
- "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, FROM_UNIXTIME(${timestamp}/1000))",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 1,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}, - {
- "name": "foo",
- "type": "kinesis_producer",
- "enable": true,
- "max_retries": 3,
- "aws_secret_access_key": "******",
- "resource_opts": {
- "worker_pool_size": 1,
- "query_mode": "async",
- "inflight_window": 100,
- "health_check_interval": 15000,
- "max_buffer_bytes": 104857600
}, - "partition_key": "key",
- "aws_access_key_id": "aws_access_key_id",
- "stream_name": "stream_name"
}, - {
- "name": "http_example",
- "type": "http",
- "ssl": {
- "enable": false
}, - "connect_timeout": "15s",
- "pool_size": 4,
- "enable": true,
- "body": "${payload}",
- "method": "post",
- "max_retries": 3,
- "request_timeout": "15s",
- "pool_type": "random",
- "resource_opts": {
- "worker_pool_size": 1,
- "query_mode": "async",
- "inflight_window": 100,
- "health_check_interval": 15000,
- "max_buffer_bytes": 104857600
}, - "enable_pipelining": 100,
- "local_topic": "emqx_http/#"
}, - {
- "timeout": 5,
- "name": "foo",
- "port": 5672,
- "type": "rabbitmq",
- "exchange": "messages",
- "pool_size": 8,
- "server": "localhost",
- "enable": true,
- "password": "******",
- "username": "guest",
- "heartbeat": "30s",
- "auto_reconnect": "2s",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "payload_template": "",
- "durable": false,
- "routing_key": "my_routing_key",
- "virtual_host": "/",
- "exchange_type": "topic"
}, - {
- "name": "foo",
- "table": "mqtt",
- "type": "dynamo",
- "pool_size": 8,
- "enable": true,
- "template": "",
- "aws_secret_access_key": "******",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "sync",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#",
- "aws_access_key_id": "root"
}, - {
- "name": "foo",
- "type": "tdengine",
- "pool_size": 8,
- "server": "127.0.0.1:6041",
- "enable": true,
- "password": "******",
- "username": "root",
- "database": "mqtt",
- "sql": "insert into t_mqtt_msg(ts, msgid, mqtt_topic, qos, payload, arrived) values (${ts}, '${id}', '${topic}', ${qos}, '${payload}', ${timestamp})",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "sync",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}, - {
- "name": "mongodb_single_demo",
- "type": "mongodb_single",
- "pool_size": 8,
- "server": "localhost:27017",
- "enable": true,
- "password": "******",
- "username": "myuser",
- "database": "mqtt",
- "collection": "mycol",
- "w_mode": "safe",
- "srv_record": false,
- "mongo_type": "single"
}, - {
- "name": "demo",
- "type": "greptimedb",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:4001",
- "enable": true,
- "precision": "ms",
- "password": "******",
- "username": "example_username",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "dbname": "example_db",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}"
}, - {
- "name": "foo",
- "type": "opents",
- "pool_size": 8,
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 1,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "enabledb": true
}, - {
- "name": "mongodb_sharded_demo",
- "type": "mongodb_sharded",
- "pool_size": 8,
- "enable": true,
- "password": "******",
- "username": "myuser",
- "database": "mqtt",
- "servers": "localhost:27017, localhost:27018",
- "collection": "mycol",
- "w_mode": "safe",
- "srv_record": false,
- "mongo_type": "sharded"
}, - {
- "name": "mongodb_rs_demo",
- "type": "mongodb_rs",
- "pool_size": 8,
- "enable": true,
- "password": "******",
- "username": "myuser",
- "database": "mqtt",
- "servers": "localhost:27017, localhost:27018",
- "collection": "mycol",
- "r_mode": "safe",
- "w_mode": "safe",
- "replica_set_name": "rs",
- "srv_record": false,
- "mongo_type": "rs"
}, - {
- "name": "foo",
- "type": "oracle",
- "pool_size": 8,
- "server": "127.0.0.1:1521",
- "enable": true,
- "password": "******",
- "username": "root",
- "service_name": "ORCL",
- "sql": "insert into t_mqtt_msgs(msgid, topic, qos, payload) values (${id}, ${topic}, ${qos}, ${payload})",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#",
- "sid": "ORCL"
}, - {
- "name": "demo",
- "stream": "stream",
- "type": "hstreamdb",
- "ssl": {
- "enable": false
}, - "pool_size": 8,
- "direction": "egress",
- "resource_opts": {
- "batch_size": 100,
- "query_mode": "sync",
- "batch_time": "20ms"
}, - "record_template": "{ \"temperature\": ${payload.temperature}, \"humidity\": ${payload.humidity} }"
}, - {
- "name": "demo",
- "type": "influxdb_api_v1",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "password": "******",
- "username": "example_username",
- "database": "example_database",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v1"
}, - {
- "service_account_json": {
- "type": "service_account",
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQI...",
- "client_id": "123812831923812319190",
- "client_email": "test@myproject.iam.gserviceaccount.com",
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test%40myproject.iam.gserviceaccount.com",
- "private_key_id": "kid",
- "project_id": "myproject",
}, - "pubsub_topic": "mytopic"
}, - {
- "name": "redis_bridge",
- "type": "redis_single",
- "ssl": {
- "enable": false
}, - "pool_size": 8,
- "server": "127.0.0.1:6379",
- "enable": true,
- "password": "******",
- "database": 1,
- "resource_opts": {
- "batch_size": 1,
- "batch_time": "20ms"
}, - "redis_type": "single",
- "local_topic": "local/topic/#",
- "command_template": [
- "LPUSH",
- "MSGS",
- "${payload}"
]
}, - {
- "name": "mqtt_example",
- "type": "mqtt",
- "keepalive": "300s",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:1883",
- "enable": true,
- "password": "******",
- "username": "foo",
- "proto_ver": "v4",
- "clean_start": true,
- "retry_interval": "15s",
- "max_inflight": 100,
- "resource_opts": {
- "query_mode": "sync",
- "health_check_interval": "15s",
- "max_buffer_bytes": 104857600
}, - "ingress": {
- "local": {
- "retain": "${retain}",
- "payload": "${payload}",
- "topic": "from_aws/${topic}",
- "qos": "${qos}"
}, - "remote": {
- "topic": "aws/#",
- "qos": 1
}
}, - "egress": {
- "local": {
- "topic": "emqx/#"
}, - "remote": {
- "retain": false,
- "payload": "${payload}",
- "topic": "from_emqx/${topic}",
- "qos": "${qos}"
}
}
}, - {
- "name": "foo",
- "type": "cassandra",
- "pool_size": 8,
- "enable": true,
- "password": "******",
- "username": "root",
- "cql": "insert into mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, ${timestamp})",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "sync",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "servers": "127.0.0.1:9042",
- "local_topic": "local/topic/#",
- "keyspace": "mqtt"
}, - {
- "connect_timeout": "15s",
- "consumer": {
- "topic_mapping": [
- {
- "qos": 1,
- "mqtt_topic": "mqtt/topic/1",
- "payload_template": "${.}",
- "pubsub_topic": "pubsub-topic-1"
}, - {
- "qos": 2,
- "mqtt_topic": "mqtt/topic/2",
- "payload_template": "v = ${.value}, a = ${.attributes}, o = ${.ordering_key}",
- "pubsub_topic": "pubsub-topic-2"
}
], - "pull_max_messages": 100
}, - "resource_opts": {
- "request_ttl": "20s"
}, - "service_account_json": {
- "type": "service_account",
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQI...",
- "client_id": "123812831923812319190",
- "client_email": "test@myproject.iam.gserviceaccount.com",
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test%40myproject.iam.gserviceaccount.com",
- "private_key_id": "kid",
- "project_id": "myproject",
}
}, - {
- "name": "foo",
- "type": "clickhouse",
- "pool_size": 8,
- "server": "127.0.0.1:8123",
- "enable": true,
- "password": "******",
- "username": "default",
- "database": "mqtt",
- "sql": "INSERT INTO messages(data, arrived) VALUES ('${payload}', ${timestamp})",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#",
- "batch_value_separator": ", "
}, - {
- "driver": "ms-sql",
- "name": "bar",
- "type": "sqlserver",
- "pool_size": 8,
- "server": "127.0.0.1:1433",
- "enable": true,
- "password": "******",
- "username": "sa",
- "database": "test",
- "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload) values ( ${id}, ${topic}, ${qos}, ${payload} )",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 1,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}, - {
- "name": "foo",
- "status": "connected",
- "type": "matrix",
- "pool_size": 8,
- "server": "127.0.0.1:5432",
- "enable": true,
- "password": "******",
- "username": "root",
- "database": "mqtt",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, TO_TIMESTAMP((${timestamp} :: bigint)/1000))",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}, - {
- "name": "my_kafka_producer_action",
- "status": "connected",
- "type": "kafka_producer",
- "authentication": {
- "mechanism": "plain",
- "password": "******",
- "username": "username"
}, - "connect_timeout": "5s",
- "enable": true,
- "socket_opts": {
- "nodelay": true,
- "recbuf": "1024KB",
- "sndbuf": "1024KB",
- "tcp_keepalive": "none"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "kafka": {
- "max_batch_bytes": "896KB",
- "offset_reset_policy": "latest",
- "offset_commit_interval_seconds": 5
}, - "min_metadata_refresh_interval": "3s",
- "topic_mapping": [
- {
- "qos": 1,
- "mqtt_topic": "mqtt/topic/${.offset}",
- "kafka_topic": "kafka-topic-1",
- "payload_template": "${.}"
}, - {
- "qos": 2,
- "mqtt_topic": "mqtt/topic/2",
- "kafka_topic": "kafka-topic-2",
- "payload_template": "v = ${.value}"
}
], - "bootstrap_hosts": "localhost:9092",
- "value_encoding_mode": "none",
- "key_encoding_mode": "none",
- "metadata_request_timeout": "4s"
}, - {
- "name": "foo",
- "type": "rocketmq",
- "server": "127.0.0.1:9876",
- "enable": true,
- "template": "",
- "topic": "TopicTest",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 1,
- "query_mode": "sync",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}, - {
- "name": "foo",
- "status": "connected",
- "type": "timescale",
- "pool_size": 8,
- "server": "127.0.0.1:5432",
- "enable": true,
- "password": "******",
- "username": "root",
- "database": "mqtt",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "sql": "insert into t_mqtt_msg(msgid, topic, qos, payload, arrived) values (${id}, ${topic}, ${qos}, ${payload}, TO_TIMESTAMP((${timestamp} :: bigint)/1000))",
- "resource_opts": {
- "batch_size": 1,
- "worker_pool_size": 8,
- "query_mode": "async",
- "health_check_interval": "15s",
- "batch_time": 0,
- "max_buffer_bytes": 268435456
}, - "local_topic": "local/topic/#"
}
]
Create a new bridge by type and name
type required | string Enum: "kafka" "kafka_producer" "kafka_consumer" The Action Type |
name required | string Action name, used as a human-readable identifier. |
enable | boolean Default: true Enable (true) or disable (false) this connector. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
bootstrap_hosts required | string A comma separated list of Kafka |
connect_timeout | string Default: "5s" Maximum wait time for TCP connection establishment (including authentication time if enabled). |
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 value may add extra load on Kafka. |
metadata_request_timeout | string Default: "5s" Maximum wait time when fetching topic metadata. |
bridge_kafka.auth_gssapi_kerberos (object) or bridge_kafka.auth_username_password (object) or string Default: "none" Authentication configs. | |
object (bridge_kafka.socket_opts) | |
object (bridge_kafka.ssl_client_opts) | |
object (bridge_kafka.connector_resource_opts) | |
local_topic | string MQTT topic or topic filter as data source (action input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in Kafka. |
required | object (bridge_kafka.producer_kafka_opts) |
{- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}
{- "name": "demo",
- "type": "influxdb_api_v2",
- "ssl": {
- "enable": false
}, - "server": "127.0.0.1:8086",
- "enable": true,
- "precision": "ms",
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "write_syntax": "${topic},clientid=${clientid} payload=${payload},${clientid}_int_value=${payload.int_key}i,uint_value=${payload.uint_key}u,bool=${payload.bool}",
- "influxdb_type": "influxdb_api_v2"
}
Serves as a health check for the node.
Returns response to describe the status of the node and the application.
This endpoint requires no authentication.
Returns status code 200 if the EMQX application is up and running, 503 otherwise.
This API was introduced in v5.0.10.
The GET /status
endpoint (without the /api/...
prefix) is also an alias to this endpoint and works in the same way.
This alias has been available since v5.0.0.
Starting from v5.0.25 or e5.0.4, you can also use 'format' parameter to get JSON format information.
format | string Default: "text" Specify the response format, 'text' (default) to return the HTTP body in free text, |
Topics list
topic | string Topic Name |
node | string Example: node=emqx@127.0.0.1 Node Name |
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(max 10000) |
{- "data": [
- {
- "topic": "string",
- "node": "string",
- "session": "string"
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
Get a file by its id.
node required | string Example: node=emqx@127.0.0.1 Node under which the file is located |
fileref required | string Example: fileref=file1 File reference |
{- "code": "NOT_FOUND",
- "message": "string"
}
List all uploaded files.
following | string Cursor to start listing files from |
limit | integer [ 1 .. 10000 ] Default: 100 Example: limit=50 Results per page(max 10000) |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Show current File Transfer configuration.
{- "enable": false,
- "init_timeout": "32s",
- "store_segment_timeout": "32s",
- "assemble_timeout": "32s",
- "storage": {
- "local": {
- "segments": {
- "root": "string",
- "gc": {
- "interval": "32s",
- "maximum_segments_ttl": "1h",
- "minimum_segments_ttl": "1h"
}
}, - "exporter": {
- "local": {
- "root": "string",
- "enable": true
}, - "s3": {
- "access_key_id": "string",
- "secret_access_key": "R4ND0M/S∃CЯ∃T",
- "host": "string",
- "port": 1,
- "transport_options": {
- "ipv6_probe": false,
- "connect_timeout": "32s",
- "pool_type": "random",
- "pool_size": 8,
- "enable_pipelining": 100,
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "headers": { },
- "max_retries": 0,
- "request_timeout": "32s"
}, - "min_part_size": "32MB",
- "max_part_size": "32MB",
- "url_expire_time": "1h",
- "bucket": "string",
- "acl": "private",
- "enable": true
}
}, - "enable": true
}
}
}
Replace File Transfer configuration.
enable | boolean Default: false Enable the File Transfer feature. |
init_timeout | string Default: "10s" Timeout for EMQX to initialize the file transfer. |
store_segment_timeout | string Default: "5m" Timeout for storing a file segment. |
assemble_timeout | string Default: "5m" Timeout for assembling and exporting file segments into a final file. |
object (file_transfer.storage_backend) |
{- "enable": false,
- "init_timeout": "32s",
- "store_segment_timeout": "32s",
- "assemble_timeout": "32s",
- "storage": {
- "local": {
- "segments": {
- "root": "string",
- "gc": {
- "interval": "32s",
- "maximum_segments_ttl": "1h",
- "minimum_segments_ttl": "1h"
}
}, - "exporter": {
- "local": {
- "root": "string",
- "enable": true
}, - "s3": {
- "access_key_id": "string",
- "secret_access_key": "R4ND0M/S∃CЯ∃T",
- "host": "string",
- "port": 1,
- "transport_options": {
- "ipv6_probe": false,
- "connect_timeout": "32s",
- "pool_type": "random",
- "pool_size": 8,
- "enable_pipelining": 100,
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "headers": { },
- "max_retries": 0,
- "request_timeout": "32s"
}, - "min_part_size": "32MB",
- "max_part_size": "32MB",
- "url_expire_time": "1h",
- "bucket": "string",
- "acl": "private",
- "enable": true
}
}, - "enable": true
}
}
}
{- "enable": false,
- "init_timeout": "32s",
- "store_segment_timeout": "32s",
- "assemble_timeout": "32s",
- "storage": {
- "local": {
- "segments": {
- "root": "string",
- "gc": {
- "interval": "32s",
- "maximum_segments_ttl": "1h",
- "minimum_segments_ttl": "1h"
}
}, - "exporter": {
- "local": {
- "root": "string",
- "enable": true
}, - "s3": {
- "access_key_id": "string",
- "secret_access_key": "R4ND0M/S∃CЯ∃T",
- "host": "string",
- "port": 1,
- "transport_options": {
- "ipv6_probe": false,
- "connect_timeout": "32s",
- "pool_type": "random",
- "pool_size": 8,
- "enable_pipelining": 100,
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "headers": { },
- "max_retries": 0,
- "request_timeout": "32s"
}, - "min_part_size": "32MB",
- "max_part_size": "32MB",
- "url_expire_time": "1h",
- "bucket": "string",
- "acl": "private",
- "enable": true
}
}, - "enable": true
}
}
}
List a file uploaded during specified transfer, identified by client id and file id.
clientid required | string MQTT Client ID |
fileid required | string File ID |
{- "code": "FILES_NOT_FOUND",
- "message": "string"
}
Get node run-time stats. Such as the number of topics, connections, etc.
node required | string Example: emqx@127.0.0.1 Node name |
{- "channels.count": 0,
- "channels.max": 0,
- "connections.count": 0,
- "connections.max": 0,
- "delayed.count": 0,
- "delayed.max": 0,
- "live_connections.count": 0,
- "live_connections.max": 0,
- "cluster_sessions.count": 0,
- "cluster_sessions.max": 0,
- "retained.count": 0,
- "retained.max": 0,
- "sessions.count": 0,
- "sessions.max": 0,
- "suboptions.count": 0,
- "suboptions.max": 0,
- "subscribers.count": 0,
- "subscribers.max": 0,
- "subscriptions.count": 0,
- "subscriptions.max": 0,
- "subscriptions.shared.count": 0,
- "subscriptions.shared.max": 0,
- "topics.count": 0,
- "topics.max": 0
}
Get node run-time counter metrics. Such as received or sent bytes or messages, the number of succeeded or failed authentications or authorizations, etc.
node required | string Example: emqx@127.0.0.1 Node name |
{- "node": "string",
- "actions.failure": 0,
- "actions.success": 0,
- "bytes.received": 0,
- "bytes.sent": 0,
- "client.auth.anonymous": 0,
- "client.authenticate": 0,
- "client.check_authz": 0,
- "client.connack": 0,
- "client.connect": 0,
- "client.connected": 0,
- "client.disconnected": 0,
- "client.subscribe": 0,
- "client.unsubscribe": 0,
- "delivery.dropped": 0,
- "delivery.dropped.expired": 0,
- "delivery.dropped.no_local": 0,
- "delivery.dropped.qos0_msg": 0,
- "delivery.dropped.queue_full": 0,
- "delivery.dropped.too_large": 0,
- "messages.acked": 0,
- "messages.delayed": 0,
- "messages.delivered": 0,
- "messages.dropped": 0,
- "messages.dropped.await_pubrel_timeout": 0,
- "messages.dropped.no_subscribers": 0,
- "messages.forward": 0,
- "messages.publish": 0,
- "messages.qos0.received": 0,
- "messages.qos0.sent": 0,
- "messages.qos1.received": 0,
- "messages.qos1.sent": 0,
- "messages.qos2.received": 0,
- "messages.qos2.sent": 0,
- "messages.received": 0,
- "messages.sent": 0,
- "packets.auth.received": 0,
- "packets.auth.sent": 0,
- "packets.connack.auth_error": 0,
- "packets.connack.error": 0,
- "packets.connack.sent": 0,
- "packets.connect.received": 0,
- "packets.disconnect.received": 0,
- "packets.disconnect.sent": 0,
- "packets.pingreq.received": 0,
- "packets.pingresp.sent": 0,
- "packets.puback.inuse": 0,
- "packets.puback.missed": 0,
- "packets.puback.received": 0,
- "packets.puback.sent": 0,
- "packets.pubcomp.inuse": 0,
- "packets.pubcomp.missed": 0,
- "packets.pubcomp.received": 0,
- "packets.pubcomp.sent": 0,
- "packets.publish.auth_error": 0,
- "packets.publish.dropped": 0,
- "packets.publish.error": 0,
- "packets.publish.inuse": 0,
- "packets.publish.received": 0,
- "packets.publish.sent": 0,
- "packets.pubrec.inuse": 0,
- "packets.pubrec.missed": 0,
- "packets.pubrec.received": 0,
- "packets.pubrec.sent": 0,
- "packets.pubrel.missed": 0,
- "packets.pubrel.received": 0,
- "packets.pubrel.sent": 0,
- "packets.received": 0,
- "packets.sent": 0,
- "packets.suback.sent": 0,
- "packets.subscribe.auth_error": 0,
- "packets.subscribe.error": 0,
- "packets.subscribe.received": 0,
- "packets.unsuback.sent": 0,
- "packets.unsubscribe.error": 0,
- "packets.unsubscribe.received": 0,
- "rules.matched": 0,
- "session.created": 0,
- "session.discarded": 0,
- "session.resumed": 0,
- "session.takenover": 0,
- "session.terminated": 0
}
Get node info
node required | string Example: emqx@127.0.0.1 Node name |
{- "node": "emqx@127.0.0.1",
- "connections": 0,
- "live_connections": 0,
- "cluster_sessions": 0,
- "load1": 2.66,
- "load5": 2.66,
- "load15": 2.66,
- "max_fds": 1024,
- "memory_total": "512.00M",
- "memory_used": "256.00M",
- "node_status": "running",
- "otp_release": "24.2/12.2",
- "process_available": 2097152,
- "process_used": 1024,
- "uptime": 5120000,
- "version": "5.0.0",
- "edition": "Opensource",
- "sys_path": "path/to/emqx",
- "log_path": "path/to/log | The log path is not yet set",
- "role": "core"
}
[- {
- "node": "emqx@127.0.0.1",
- "connections": 0,
- "live_connections": 0,
- "cluster_sessions": 0,
- "load1": 2.66,
- "load5": 2.66,
- "load15": 2.66,
- "max_fds": 1024,
- "memory_total": "512.00M",
- "memory_used": "256.00M",
- "node_status": "running",
- "otp_release": "24.2/12.2",
- "process_available": 2097152,
- "process_used": 1024,
- "uptime": 5120000,
- "version": "5.0.0",
- "edition": "Opensource",
- "sys_path": "path/to/emqx",
- "log_path": "path/to/log | The log path is not yet set",
- "role": "core"
}
]
Get the detail information of Exhook server
name required | string Example: default The Exhook server name |
{- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}, - "node_metrics": [
- {
- "node": "string",
- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}
}
], - "node_status": [
- {
- "node": "string",
- "status": "connected"
}
], - "hooks": [
- {
- "name": "string",
- "params": {
- "$name": "string"
}
}
], - "name": "default",
- "enable": true,
- "request_timeout": "12m",
- "failed_action": "deny",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "socket_options": {
- "keepalive": true,
- "nodelay": true,
- "recbuf": "64KB",
- "sndbuf": "16KB"
}, - "auto_reconnect": "60s",
- "pool_size": 8
}
Update the server
name required | string Example: default The Exhook server name |
name required | string Name of the exhook server |
enable | boolean Default: true Enable this Exhook server |
url required | string URL of the gRPC server |
request_timeout | string Default: "5s" The timeout of request gRPC server |
failed_action | string Default: "deny" Enum: "deny" "ignore" The value that is returned when the request to the gRPC server fails for any reason |
object (exhook.ssl_conf) | |
object (exhook.socket_options) | |
string or string Default: "60s" Whether to automatically reconnect (initialize) the gRPC server. | |
pool_size | integer >= 1 Default: 8 The process pool size for gRPC client |
{- "name": "default",
- "ssl": {
- "cacertfile": "/etc/emqx/certs/cacert.pem",
- "certfile": "/etc/emqx/certs/cert.pem",
- "keyfile": "/etc/emqx/certs/key.pem",
- "enable": false
}, - "pool_size": 8,
- "enable": true,
- "request_timeout": "5s",
- "auto_reconnect": "60s",
- "failed_action": "deny"
}
{- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}, - "node_metrics": [
- {
- "node": "string",
- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}
}
], - "node_status": [
- {
- "node": "string",
- "status": "connected"
}
], - "hooks": [
- {
- "name": "string",
- "params": {
- "$name": "string"
}
}
], - "name": "default",
- "enable": true,
- "request_timeout": "12m",
- "failed_action": "deny",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "socket_options": {
- "keepalive": true,
- "nodelay": true,
- "recbuf": "64KB",
- "sndbuf": "16KB"
}, - "auto_reconnect": "60s",
- "pool_size": 8
}
Move the server.
NOTE: The position should be "front | rear | before:{name} | after:{name}
name required | string Example: default The Exhook server name |
position required | string The target position to be moved |
{- "position": "rear"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
[- {
- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}, - "node_metrics": [
- {
- "node": "string",
- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}
}
], - "node_status": [
- {
- "node": "string",
- "status": "connected"
}
], - "hooks": [
- {
- "name": "string",
- "params": {
- "$name": "string"
}
}
], - "name": "default",
- "enable": true,
- "request_timeout": "12m",
- "failed_action": "deny",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "socket_options": {
- "keepalive": true,
- "nodelay": true,
- "recbuf": "64KB",
- "sndbuf": "16KB"
}, - "auto_reconnect": "60s",
- "pool_size": 8
}
]
Add a server
name required | string Name of the exhook server |
enable | boolean Default: true Enable this Exhook server |
url required | string URL of the gRPC server |
request_timeout | string Default: "5s" The timeout of request gRPC server |
failed_action | string Default: "deny" Enum: "deny" "ignore" The value that is returned when the request to the gRPC server fails for any reason |
object (exhook.ssl_conf) | |
object (exhook.socket_options) | |
string or string Default: "60s" Whether to automatically reconnect (initialize) the gRPC server. | |
pool_size | integer >= 1 Default: 8 The process pool size for gRPC client |
{- "name": "default",
- "ssl": {
- "cacertfile": "/etc/emqx/certs/cacert.pem",
- "certfile": "/etc/emqx/certs/cert.pem",
- "keyfile": "/etc/emqx/certs/key.pem",
- "enable": false
}, - "pool_size": 8,
- "enable": true,
- "request_timeout": "5s",
- "auto_reconnect": "60s",
- "failed_action": "deny"
}
{- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}, - "node_metrics": [
- {
- "node": "string",
- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}
}
], - "node_status": [
- {
- "node": "string",
- "status": "connected"
}
], - "hooks": [
- {
- "name": "string",
- "params": {
- "$name": "string"
}
}
], - "name": "default",
- "enable": true,
- "request_timeout": "12m",
- "failed_action": "deny",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "socket_options": {
- "keepalive": true,
- "nodelay": true,
- "recbuf": "64KB",
- "sndbuf": "16KB"
}, - "auto_reconnect": "60s",
- "pool_size": 8
}
Get the hooks information of server
name required | string Example: default The Exhook server name |
[- {
- "name": "string",
- "params": {
- "$name": "string"
}, - "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}, - "node_metrics": [
- {
- "node": "string",
- "metrics": {
- "succeed": 0,
- "failed": 0,
- "rate": 0,
- "max_rate": 0
}
}
]
}
]
{- "collectors": {
- "mnesia": "disabled",
- "vm_msacc": "disabled",
- "vm_memory": "disabled",
- "vm_system_info": "disabled",
- "vm_statistics": "disabled",
- "vm_dist": "disabled"
}, - "push_gateway": {
- "interval": "15s",
- "headers": {
- "Authorization": "Basic YWRtaW46Y2JraG55eWd5QDE="
}, - "job_name": "${name}/instance/${name}~${host}"
}, - "enable_basic_auth": false
}
Update Prometheus config
push_gateway_server required | string Default: "http://127.0.0.1:9091" Deprecated since 5.4.0, use |
interval required | string Default: "15s" Deprecated since 5.4.0, use |
headers | object Default: {} Deprecated since 5.4.0, use |
job_name required | string Default: "${name}/instance/${name}~${host}" Deprecated since 5.4.0, use |
enable required | boolean Default: false Deprecated since 5.4.0, use |
vm_dist_collector required | string Default: "disabled" Enum: "disabled" "enabled" Deprecated since 5.4.0, use |
mnesia_collector required | string Default: "disabled" Enum: "enabled" "disabled" Deprecated since 5.4.0, use |
vm_statistics_collector required | string Default: "disabled" Enum: "enabled" "disabled" Deprecated since 5.4.0, use |
vm_system_info_collector required | string Default: "disabled" Enum: "enabled" "disabled" Deprecated, use |
vm_memory_collector required | string Default: "disabled" Enum: "enabled" "disabled" Deprecated since 5.4.0, use |
vm_msacc_collector required | string Default: "disabled" Enum: "enabled" "disabled" Deprecated since 5.4.0, use |
{- "collectors": {
- "mnesia": "disabled",
- "vm_msacc": "disabled",
- "vm_memory": "disabled",
- "vm_system_info": "disabled",
- "vm_statistics": "disabled",
- "vm_dist": "disabled"
}, - "push_gateway": {
- "interval": "15s",
- "headers": {
- "Authorization": "Basic YWRtaW46Y2JraG55eWd5QDE="
}, - "job_name": "${name}/instance/${name}~${host}"
}, - "enable_basic_auth": false
}
{- "collectors": {
- "mnesia": "disabled",
- "vm_msacc": "disabled",
- "vm_memory": "disabled",
- "vm_system_info": "disabled",
- "vm_statistics": "disabled",
- "vm_dist": "disabled"
}, - "push_gateway": {
- "interval": "15s",
- "headers": {
- "Authorization": "Basic YWRtaW46Y2JraG55eWd5QDE="
}, - "job_name": "${name}/instance/${name}~${host}"
}, - "enable_basic_auth": false
}
Get Prometheus Metrics for Data Integration
mode | string Default: "node" Enum: "node" "all_nodes_aggregated" "all_nodes_unaggregated" Example: mode=node
|
Get Prometheus Metrics
mode | string Default: "node" Enum: "node" "all_nodes_aggregated" "all_nodes_unaggregated" Example: mode=node
|
Get Prometheus Metrics for AuthN, AuthZ and Banned
mode | string Default: "node" Enum: "node" "all_nodes_aggregated" "all_nodes_unaggregated" Example: mode=node
|
Update opentelmetry configuration
object (opentelemetry.otel_metrics) | |
object (opentelemetry.otel_logs) | |
object (opentelemetry.otel_traces) | |
object (opentelemetry.otel_exporter) |
{- "metrics": {
- "enable": true
}, - "traces": {
- "filter": {
- "trace_all": false
}, - "enable": true
}, - "logs": {
- "level": "warning",
- "enable": true
},
}
{- "metrics": {
- "enable": true
}, - "traces": {
- "filter": {
- "trace_all": false
}, - "enable": true
}, - "logs": {
- "level": "warning",
- "enable": true
},
}
Update auto subscribe topic list
topic required | string Topic name, placeholders are supported. For example: client/${clientid}/username/${username}/host/${host}/port/${port} |
qos | integer [ 0 .. 2 ] Default: 0 Default value 0. Quality of service. |
rh | integer [ 0 .. 2 ] Default: 0 Default value 0. This option is used to specify whether the server forwards the retained message to the client when establishing a subscription. |
rap | integer [ 0 .. 1 ] Default: 0 Default value 0. This option is used to specify whether the server retains the RETAIN mark when forwarding messages to the client, and this option does not affect the RETAIN mark in the retained message. Therefore, when the option Retain As Publish is set to 0, the client will directly distinguish whether this is a normal forwarded message or a retained message according to the RETAIN mark in the message, instead of judging whether this message is the first received after subscribing(the forwarded message may be sent before the retained message, which depends on the specific implementation of different brokers). |
nl | integer [ 0 .. 1 ] Default: 0 Default value 0. |
[- {
- "topic": "/clientid/${clientid}/username/${username}/host/${host}/port/${port}",
- "qos": 0,
- "rh": 0,
- "rap": 0,
- "nl": 0
}
]
[- {
- "topic": "/clientid/${clientid}/username/${username}/host/${host}/port/${port}",
- "qos": 0,
- "rh": 0,
- "rap": 0,
- "nl": 0
}
]
Start evacuation process
node required | string Node name |
wait_health_check | string Time to wait before starting the rebalance/evacuation process, in seconds |
conn_evict_rate | integer >= 1 The rate of evicting connections, in connections per second |
sess_evict_rate | integer >= 1 The rate of evicting sessions, in sessions per second |
redirect_to | string Server reference to redirect clients to (MQTTv5 Server redirection) |
wait_takeover | string Time to wait before starting session evacuation process, in seconds |
migrate_to | Array of strings Nodes to migrate sessions to |
null
{ }
Get rebalance status of the current node
{- "status": "enabled",
- "process": "rebalance",
- "state": "string",
- "coordinator_node": "string",
- "connection_eviction_rate": 1,
- "session_eviction_rate": 1,
- "connection_goal": 0,
- "session_goal": 0,
- "disconnected_session_goal": 0,
- "session_recipients": [
- "string"
], - "recipients": [
- "string"
], - "stats": {
- "initial_connected": 0,
- "current_connected": 0,
- "initial_sessions": 0,
- "current_sessions": 0,
- "current_disconnected_sessions": 0
}
}
Start rebalance process
node required | string Node name |
wait_health_check | string Time to wait before starting the rebalance/evacuation process, in seconds |
conn_evict_rate | integer >= 1 The rate of evicting connections, in connections per second |
sess_evict_rate | integer >= 1 The rate of evicting sessions, in sessions per second |
abs_conn_threshold | integer >= 1 Maximum desired difference between the number of connections on the node and the average number of connections on the recipient nodes. Difference lower than this is the goal of the rebalance process. |
rel_conn_threshold | number Maximum desired fraction between the number of connections on the node and the average number of connections on the recipient nodes. Fraction lower than this is the goal of the rebalance process. |
abs_sess_threshold | integer >= 1 Maximum desired difference between the number of sessions on the node and the average number of sessions on the recipient nodes. Difference lower than this is the goal of the evacuation process. |
rel_sess_threshold | number Maximum desired fraction between the number of sessions on the node and the average number of sessions on the recipient nodes. Fraction lower than this is the goal of the evacuation process |
wait_takeover | string Time to wait before starting session evacuation process, in seconds |
nodes | Array of strings Nodes to participate in rebalance |
null
{ }
Get status of all rebalance/evacuation processes across the cluster
{- "evacuations": [
- {
- "state": "string",
- "coordinator_node": "string",
- "connection_eviction_rate": 1,
- "session_eviction_rate": 1,
- "connection_goal": 0,
- "session_goal": 0,
- "disconnected_session_goal": 0,
- "session_recipients": [
- "string"
], - "recipients": [
- "string"
], - "stats": {
- "initial_connected": 0,
- "current_connected": 0,
- "initial_sessions": 0,
- "current_sessions": 0,
- "current_disconnected_sessions": 0
}, - "node": "string"
}
], - "purges": [
- {
- "state": "string",
- "coordinator_node": "string",
- "session_goal": 0,
- "stats": {
- "initial_connected": 0,
- "current_connected": 0,
- "initial_sessions": 0,
- "current_sessions": 0,
- "current_disconnected_sessions": 0
}, - "purge_rate": 1,
- "node": "string"
}
], - "rebalances": [
- {
- "state": "string",
- "coordinator_node": "string",
- "connection_eviction_rate": 1,
- "session_eviction_rate": 1,
- "connection_goal": 0,
- "disconnected_session_goal": 0,
- "recipients": [
- "string"
], - "donors": [
- "string"
], - "donor_conn_avg": 0,
- "donor_sess_avg": 0,
- "node": "string"
}
]
}
Get the listener's authenticator configs.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Update authenticator configs for the listener, or disable/enable it.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
mechanism required | string Value: "gcp_device" Authentication mechanism. |
enable | boolean Default: true Set to |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Remove authenticator for the listener.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Enable authenticator for specified listener for client authentication.
When authenticator is enabled for a listener, all clients connecting to that listener will use that authenticator for authentication.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
mechanism required | string Value: "gcp_device" Authentication mechanism. |
enable | boolean Default: true Set to |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Gets a list of gateway listeners. This interface returns all the configs of the listener (including the authenticator on that listener), as well as the status of that listener running in the cluster.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
[- {
- "name": "udp-def",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}, - "type": "udp",
- "bind": "22212",
- "udp_options": {
- "buffer": "10KB",
- "recbuf": "10KB",
- "reuseaddr": true,
- "sndbuf": "10KB",
- "active_n": 100
}, - "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
]
}, - {
- "name": "dtls-def",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}, - "type": "dtls",
- "bind": "22213",
- "udp_options": {
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 1024000,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
], - "acceptors": 16,
- "dtls_options": {
- "cacertfile": "/etc/emqx/certs/cacert.pem",
- "certfile": "/etc/emqx/certs/cert.pem",
- "keyfile": "/etc/emqx/certs/key.pem",
- "verify": "verify_none",
- "versions": [
- "dtlsv1.2",
- "dtlsv1"
], - "fail_if_no_peer_cert": false
}, - "access_rules": [
- "allow all"
], - "max_conn_rate": 1000
}, - {
- "name": "ssl-def",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}, - "type": "ssl",
- "bind": "22211",
- "tcp_options": {
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 1024000,
- "ssl_options": {
- "cacertfile": "/etc/emqx/certs/cacert.pem",
- "certfile": "/etc/emqx/certs/cert.pem",
- "keyfile": "/etc/emqx/certs/key.pem",
- "verify": "verify_none",
- "versions": [
- "tlsv1.3",
- "tlsv1.2",
- "tlsv1.1",
- "tlsv1"
], - "fail_if_no_peer_cert": false
}, - "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
], - "acceptors": 16,
- "access_rules": [
- "allow all"
], - "max_conn_rate": 1000
}, - {
- "name": "tcp-def",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}, - "type": "tcp",
- "bind": "22210",
- "tcp_options": {
- "buffer": "10KB",
- "high_watermark": "1MB",
- "keepalive": "none",
- "nodelay": false,
- "recbuf": "10KB",
- "reuseaddr": true,
- "send_timeout": "15s",
- "send_timeout_close": true,
- "sndbuf": "10KB",
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 1024000,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
], - "acceptors": 16,
- "max_conn_rate": 1000
}, - {
- "name": "dtls-psk",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}, - "type": "dtls",
- "bind": "22214",
- "max_connections": 1024000,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
], - "acceptors": 16,
- "dtls_options": {
- "cacertfile": "/etc/emqx/certs/cacert.pem",
- "certfile": "/etc/emqx/certs/cert.pem",
- "keyfile": "/etc/emqx/certs/key.pem",
- "verify": "verify_none",
- "ciphers": "RSA-PSK-AES256-GCM-SHA384,RSA-PSK-AES256-CBC-SHA384,RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256,RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA",
- "versions": [
- "dtlsv1.2",
- "dtlsv1"
], - "fail_if_no_peer_cert": false,
- "user_lookup_fun": "emqx_tls_psk:lookup"
}, - "max_conn_rate": 1000
}, - {
- "name": "tcp-with-authn",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}, - "type": "tcp",
- "bind": "22215",
- "authentication": {
- "mechanism": "password_based",
- "backend": "built_in_database",
- "password_hash_algorithm": {
- "name": "sha256"
}, - "user_id_type": "username"
}, - "max_connections": 1024000,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
], - "acceptors": 16,
- "max_conn_rate": 1000
}
]
Create the gateway listener.
Note: For listener types not supported by a gateway, this API returns 400: BAD_REQUEST
.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id | string Listener ID |
type | string Value: "wss" Listener Type |
name | string Listener Name |
running | boolean Listener Running status |
acceptors | integer Default: 16 Size of the acceptor pool. |
object (emqx.tcp_opts) | |
proxy_protocol | boolean Default: false Enable the Proxy Protocol V1/2 if the EMQX cluster is deployed behind HAProxy or Nginx. |
proxy_protocol_timeout | string Default: "3s" Timeout for proxy protocol. |
enable | boolean Default: true Enable the listener. |
bind | string The IP address and port that the listener will bind. |
string or integer Default: 1024 Maximum number of concurrent connections. | |
max_conn_rate | integer Default: 1000 Maximum connections per second. |
enable_authn | boolean Default: true Set |
mountpoint | string When publishing or subscribing, prefix all topics with a mountpoint string. |
access_rules | Array of strings Default: [] The access control rules for this listener. |
object (emqx.listener_wss_opts) | |
object (gateway.websocket) |
{- "name": "udp-def",
- "type": "udp",
- "bind": "22212",
- "udp_options": {
- "buffer": "10KB",
- "recbuf": "10KB",
- "reuseaddr": true,
- "sndbuf": "10KB",
- "active_n": 100
}
}
{- "name": "udp-def",
- "type": "udp",
- "bind": "22212",
- "udp_options": {
- "buffer": "10KB",
- "recbuf": "10KB",
- "reuseaddr": true,
- "sndbuf": "10KB",
- "active_n": 100
}
}
Get the gateway listener configs
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
{- "name": "udp-def",
- "type": "udp",
- "bind": "22212",
- "udp_options": {
- "buffer": "10KB",
- "recbuf": "10KB",
- "reuseaddr": true,
- "sndbuf": "10KB",
- "active_n": 100
}
}
Update the gateway listener. The listener being updated performs a restart and all clients connected to that listener will be disconnected.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
id | string Listener ID |
type | string Value: "wss" Listener Type |
name | string Listener Name |
running | boolean Listener Running status |
acceptors | integer Default: 16 Size of the acceptor pool. |
object (emqx.tcp_opts) | |
proxy_protocol | boolean Default: false Enable the Proxy Protocol V1/2 if the EMQX cluster is deployed behind HAProxy or Nginx. |
proxy_protocol_timeout | string Default: "3s" Timeout for proxy protocol. |
enable | boolean Default: true Enable the listener. |
bind | string The IP address and port that the listener will bind. |
string or integer Default: 1024 Maximum number of concurrent connections. | |
max_conn_rate | integer Default: 1000 Maximum connections per second. |
enable_authn | boolean Default: true Set |
mountpoint | string When publishing or subscribing, prefix all topics with a mountpoint string. |
access_rules | Array of strings Default: [] The access control rules for this listener. |
object (emqx.listener_wss_opts) | |
object (gateway.websocket) |
{- "name": "udp-def",
- "type": "udp",
- "bind": "22212",
- "udp_options": {
- "buffer": "10KB",
- "recbuf": "10KB",
- "reuseaddr": true,
- "sndbuf": "10KB",
- "active_n": 100
}
}
{- "name": "udp-def",
- "type": "udp",
- "bind": "22212",
- "udp_options": {
- "buffer": "10KB",
- "recbuf": "10KB",
- "reuseaddr": true,
- "sndbuf": "10KB",
- "active_n": 100
}
}
Delete the gateway listener. All connected clients under the deleted listener will be disconnected.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get user info from the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
uid required | string User ID |
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Update the user info for the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
uid required | string User ID |
password required | string |
is_superuser | boolean Default: false |
{- "password": "******"
}
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Delete the user for the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
uid required | string User ID |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get the users for the authenticator (only supported by built_in_database
)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
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(max 10000) |
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Add user for the authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Listener ID |
user_id required | string |
password required | string |
is_superuser | boolean Default: false |
{- "password": "******",
- "user_id": "user1"
}
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Get the sub-configurations under sys_topics
{- "sys_msg_interval": "1m",
- "sys_heartbeat_interval": "30s",
- "sys_event_messages": {
- "client_connected": true,
- "client_disconnected": true,
- "client_subscribed": false,
- "client_unsubscribed": false
}
}
Update the sub-configurations under sys_topics
string or string Default: "1m" Time interval for publishing following system messages: | |
string or string Default: "30s" Time interval for publishing following heartbeat messages: | |
object (emqx.event_names) |
{- "sys_msg_interval": "1m",
- "sys_heartbeat_interval": "30s",
- "sys_event_messages": {
- "client_connected": true,
- "client_disconnected": true,
- "client_subscribed": false,
- "client_unsubscribed": false
}
}
{- "sys_msg_interval": "1m",
- "sys_heartbeat_interval": "30s",
- "sys_event_messages": {
- "client_connected": true,
- "client_disconnected": true,
- "client_subscribed": false,
- "client_unsubscribed": false
}
}
Get the sub-configurations under sysmon
{- "vm": {
- "process_check_interval": "12m",
- "process_high_watermark": "12%",
- "process_low_watermark": "12%",
- "long_gc": "disabled",
- "long_schedule": "240ms",
- "large_heap": "32MB",
- "busy_dist_port": true,
- "busy_port": true
}, - "os": {
- "cpu_check_interval": "12m",
- "cpu_high_watermark": "12%",
- "cpu_low_watermark": "12%",
- "mem_check_interval": "60s",
- "sysmem_high_watermark": "12%",
- "procmem_high_watermark": "12%"
}
}
Update the sub-configurations under sysmon
object (emqx.sysmon_vm) | |
object (emqx.sysmon_os) |
{- "vm": {
- "process_check_interval": "12m",
- "process_high_watermark": "12%",
- "process_low_watermark": "12%",
- "long_gc": "disabled",
- "long_schedule": "240ms",
- "large_heap": "32MB",
- "busy_dist_port": true,
- "busy_port": true
}, - "os": {
- "cpu_check_interval": "12m",
- "cpu_high_watermark": "12%",
- "cpu_low_watermark": "12%",
- "mem_check_interval": "60s",
- "sysmem_high_watermark": "12%",
- "procmem_high_watermark": "12%"
}
}
{- "vm": {
- "process_check_interval": "12m",
- "process_high_watermark": "12%",
- "process_low_watermark": "12%",
- "long_gc": "disabled",
- "long_schedule": "240ms",
- "large_heap": "32MB",
- "busy_dist_port": true,
- "busy_port": true
}, - "os": {
- "cpu_check_interval": "12m",
- "cpu_high_watermark": "12%",
- "cpu_low_watermark": "12%",
- "mem_check_interval": "60s",
- "sysmem_high_watermark": "12%",
- "procmem_high_watermark": "12%"
}
}
Get the MQTT-related configuration
{- "mqtt": {
- "idle_timeout": "15s",
- "max_packet_size": "32MB",
- "max_clientid_len": 65535,
- "max_topic_levels": 128,
- "max_topic_alias": 65535,
- "retain_available": true,
- "wildcard_subscription": true,
- "shared_subscription": true,
- "shared_subscription_strategy": "random",
- "exclusive_subscription": false,
- "ignore_loop_deliver": false,
- "strict_mode": false,
- "response_information": "",
- "server_keepalive": "disabled",
- "keepalive_multiplier": 1.5,
- "retry_interval": "12m",
- "use_username_as_clientid": false,
- "peer_cert_as_username": "disabled",
- "peer_cert_as_clientid": "disabled",
- "session_expiry_interval": "12m",
- "message_expiry_interval": "infinity",
- "max_awaiting_rel": 100,
- "max_qos_allowed": 0,
- "mqueue_priorities": "disabled",
- "mqueue_default_priority": "highest",
- "mqueue_store_qos0": true,
- "max_mqueue_len": 1000,
- "max_inflight": 32,
- "max_subscriptions": "infinity",
- "upgrade_qos": false,
- "await_rel_timeout": "12m"
}, - "flapping_detect": {
- "enable": false,
- "window_time": "12m",
- "max_count": 15,
- "ban_time": "12m"
}, - "force_shutdown": {
- "enable": true,
- "max_mailbox_size": 1000,
- "max_heap_size": "1024KB"
}, - "force_gc": {
- "enable": true,
- "count": 16000,
- "bytes": "32MB"
}
}
Update MQTT-related configuration
object (emqx.mqtt) | |
object (emqx.flapping_detect) | |
object (emqx.force_shutdown) | |
object (emqx.force_gc) |
{- "mqtt": {
- "idle_timeout": "15s",
- "max_packet_size": "32MB",
- "max_clientid_len": 65535,
- "max_topic_levels": 128,
- "max_topic_alias": 65535,
- "retain_available": true,
- "wildcard_subscription": true,
- "shared_subscription": true,
- "shared_subscription_strategy": "random",
- "exclusive_subscription": false,
- "ignore_loop_deliver": false,
- "strict_mode": false,
- "response_information": "",
- "server_keepalive": "disabled",
- "keepalive_multiplier": 1.5,
- "retry_interval": "12m",
- "use_username_as_clientid": false,
- "peer_cert_as_username": "disabled",
- "peer_cert_as_clientid": "disabled",
- "session_expiry_interval": "12m",
- "message_expiry_interval": "infinity",
- "max_awaiting_rel": 100,
- "max_qos_allowed": 0,
- "mqueue_priorities": "disabled",
- "mqueue_default_priority": "highest",
- "mqueue_store_qos0": true,
- "max_mqueue_len": 1000,
- "max_inflight": 32,
- "max_subscriptions": "infinity",
- "upgrade_qos": false,
- "await_rel_timeout": "12m"
}, - "flapping_detect": {
- "enable": false,
- "window_time": "12m",
- "max_count": 15,
- "ban_time": "12m"
}, - "force_shutdown": {
- "enable": true,
- "max_mailbox_size": 1000,
- "max_heap_size": "1024KB"
}, - "force_gc": {
- "enable": true,
- "count": 16000,
- "bytes": "32MB"
}
}
{- "mqtt": {
- "idle_timeout": "15s",
- "max_packet_size": "32MB",
- "max_clientid_len": 65535,
- "max_topic_levels": 128,
- "max_topic_alias": 65535,
- "retain_available": true,
- "wildcard_subscription": true,
- "shared_subscription": true,
- "shared_subscription_strategy": "random",
- "exclusive_subscription": false,
- "ignore_loop_deliver": false,
- "strict_mode": false,
- "response_information": "",
- "server_keepalive": "disabled",
- "keepalive_multiplier": 1.5,
- "retry_interval": "12m",
- "use_username_as_clientid": false,
- "peer_cert_as_username": "disabled",
- "peer_cert_as_clientid": "disabled",
- "session_expiry_interval": "12m",
- "message_expiry_interval": "infinity",
- "max_awaiting_rel": 100,
- "max_qos_allowed": 0,
- "mqueue_priorities": "disabled",
- "mqueue_default_priority": "highest",
- "mqueue_store_qos0": true,
- "max_mqueue_len": 1000,
- "max_inflight": 32,
- "max_subscriptions": "infinity",
- "upgrade_qos": false,
- "await_rel_timeout": "12m"
}, - "flapping_detect": {
- "enable": false,
- "window_time": "12m",
- "max_count": 15,
- "ban_time": "12m"
}, - "force_shutdown": {
- "enable": true,
- "max_mailbox_size": 1000,
- "max_heap_size": "1024KB"
}, - "force_gc": {
- "enable": true,
- "count": 16000,
- "bytes": "32MB"
}
}
Update the sub-configurations under alarm
actions | Array of strings Default: ["log","publish"] The actions triggered when the alarm is activated. |
size_limit | integer [ 1 .. 3000 ] Default: 1000 The maximum total number of deactivated alarms to keep as history. |
validity_period | string Default: "24h" Retention time of deactivated alarms. Alarms are not deleted immediately |
{- "actions": [
- "log",
- "publish"
], - "size_limit": 1000,
- "validity_period": "24h"
}
{- "actions": [
- "log",
- "publish"
], - "size_limit": 1000,
- "validity_period": "24h"
}
Get the sub-configurations under file_transfer
{- "enable": false,
- "init_timeout": "32s",
- "store_segment_timeout": "32s",
- "assemble_timeout": "32s",
- "storage": {
- "local": {
- "segments": {
- "root": "string",
- "gc": {
- "interval": "32s",
- "maximum_segments_ttl": "1h",
- "minimum_segments_ttl": "1h"
}
}, - "exporter": {
- "local": {
- "root": "string",
- "enable": true
}, - "s3": {
- "access_key_id": "string",
- "secret_access_key": "R4ND0M/S∃CЯ∃T",
- "host": "string",
- "port": 1,
- "transport_options": {
- "ipv6_probe": false,
- "connect_timeout": "32s",
- "pool_type": "random",
- "pool_size": 8,
- "enable_pipelining": 100,
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "headers": { },
- "max_retries": 0,
- "request_timeout": "32s"
}, - "min_part_size": "32MB",
- "max_part_size": "32MB",
- "url_expire_time": "1h",
- "bucket": "string",
- "acl": "private",
- "enable": true
}
}, - "enable": true
}
}
}
Update the sub-configurations under file_transfer
enable | boolean Default: false Enable the File Transfer feature. |
init_timeout | string Default: "10s" Timeout for EMQX to initialize the file transfer. |
store_segment_timeout | string Default: "5m" Timeout for storing a file segment. |
assemble_timeout | string Default: "5m" Timeout for assembling and exporting file segments into a final file. |
object (file_transfer.storage_backend) |
{- "enable": false,
- "init_timeout": "32s",
- "store_segment_timeout": "32s",
- "assemble_timeout": "32s",
- "storage": {
- "local": {
- "segments": {
- "root": "string",
- "gc": {
- "interval": "32s",
- "maximum_segments_ttl": "1h",
- "minimum_segments_ttl": "1h"
}
}, - "exporter": {
- "local": {
- "root": "string",
- "enable": true
}, - "s3": {
- "access_key_id": "string",
- "secret_access_key": "R4ND0M/S∃CЯ∃T",
- "host": "string",
- "port": 1,
- "transport_options": {
- "ipv6_probe": false,
- "connect_timeout": "32s",
- "pool_type": "random",
- "pool_size": 8,
- "enable_pipelining": 100,
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "headers": { },
- "max_retries": 0,
- "request_timeout": "32s"
}, - "min_part_size": "32MB",
- "max_part_size": "32MB",
- "url_expire_time": "1h",
- "bucket": "string",
- "acl": "private",
- "enable": true
}
}, - "enable": true
}
}
}
{- "enable": false,
- "init_timeout": "32s",
- "store_segment_timeout": "32s",
- "assemble_timeout": "32s",
- "storage": {
- "local": {
- "segments": {
- "root": "string",
- "gc": {
- "interval": "32s",
- "maximum_segments_ttl": "1h",
- "minimum_segments_ttl": "1h"
}
}, - "exporter": {
- "local": {
- "root": "string",
- "enable": true
}, - "s3": {
- "access_key_id": "string",
- "secret_access_key": "R4ND0M/S∃CЯ∃T",
- "host": "string",
- "port": 1,
- "transport_options": {
- "ipv6_probe": false,
- "connect_timeout": "32s",
- "pool_type": "random",
- "pool_size": 8,
- "enable_pipelining": 100,
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}, - "headers": { },
- "max_retries": 0,
- "request_timeout": "32s"
}, - "min_part_size": "32MB",
- "max_part_size": "32MB",
- "url_expire_time": "1h",
- "bucket": "string",
- "acl": "private",
- "enable": true
}
}, - "enable": true
}
}
}
Get the sub-configurations under dashboard
{- "listeners": {
- "http": {
- "bind": "0.0.0.0:18083",
- "num_acceptors": 8,
- "max_connections": 512,
- "backlog": 1024,
- "send_timeout": "12m",
- "inet6": false,
- "ipv6_v6only": false,
- "proxy_header": false
}, - "https": {
- "bind": "0.0.0.0:18084",
- "ssl_options": {
- "cacertfile": "${EMQX_ETC_DIR}/certs/cacert.pem",
- "cacerts": false,
- "certfile": "${EMQX_ETC_DIR}/certs/cert.pem",
- "keyfile": "${EMQX_ETC_DIR}/certs/key.pem",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "dhfile": "string",
- "honor_cipher_order": true,
- "client_renegotiation": true,
- "handshake_timeout": "12m"
}, - "num_acceptors": 8,
- "max_connections": 512,
- "backlog": 1024,
- "send_timeout": "12m",
- "inet6": false,
- "ipv6_v6only": false,
- "proxy_header": false
}
}, - "token_expired_time": "12m",
- "cors": false,
- "swagger_support": true,
- "sso": {
- "ldap": {
- "enable": false,
- "backend": "ldap",
- "query_timeout": "32s",
- "server": "string",
- "pool_size": 8,
- "username": "string",
- "password": "R4ND0M/S∃CЯ∃T",
- "base_dn": "string",
- "filter": "(& (objectClass=person) (uid=${username}))",
- "request_timeout": "32s",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}
}, - "saml": {
- "enable": false,
- "backend": "saml",
- "sp_sign_request": false,
- "sp_public_key": "Pub Key",
- "sp_private_key": "pa$$word"
}
}
}
Update the sub-configurations under dashboard
object (dashboard.listeners) | |
token_expired_time | string Default: "60m" JWT token expiration time. Default is 60 minutes |
cors | boolean Default: false Support Cross-Origin Resource Sharing (CORS). |
swagger_support | boolean Default: true Enable or disable support for swagger API documentation. |
object (dashboard.sso) |
{- "listeners": {
- "http": {
- "bind": "0.0.0.0:18083",
- "num_acceptors": 8,
- "max_connections": 512,
- "backlog": 1024,
- "send_timeout": "12m",
- "inet6": false,
- "ipv6_v6only": false,
- "proxy_header": false
}, - "https": {
- "bind": "0.0.0.0:18084",
- "ssl_options": {
- "cacertfile": "${EMQX_ETC_DIR}/certs/cacert.pem",
- "cacerts": false,
- "certfile": "${EMQX_ETC_DIR}/certs/cert.pem",
- "keyfile": "${EMQX_ETC_DIR}/certs/key.pem",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "dhfile": "string",
- "honor_cipher_order": true,
- "client_renegotiation": true,
- "handshake_timeout": "12m"
}, - "num_acceptors": 8,
- "max_connections": 512,
- "backlog": 1024,
- "send_timeout": "12m",
- "inet6": false,
- "ipv6_v6only": false,
- "proxy_header": false
}
}, - "token_expired_time": "12m",
- "cors": false,
- "swagger_support": true,
- "sso": {
- "ldap": {
- "enable": false,
- "backend": "ldap",
- "query_timeout": "32s",
- "server": "string",
- "pool_size": 8,
- "username": "string",
- "password": "R4ND0M/S∃CЯ∃T",
- "base_dn": "string",
- "filter": "(& (objectClass=person) (uid=${username}))",
- "request_timeout": "32s",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}
}, - "saml": {
- "enable": false,
- "backend": "saml",
- "sp_sign_request": false,
- "sp_public_key": "Pub Key",
- "sp_private_key": "pa$$word"
}
}
}
{- "listeners": {
- "http": {
- "bind": "0.0.0.0:18083",
- "num_acceptors": 8,
- "max_connections": 512,
- "backlog": 1024,
- "send_timeout": "12m",
- "inet6": false,
- "ipv6_v6only": false,
- "proxy_header": false
}, - "https": {
- "bind": "0.0.0.0:18084",
- "ssl_options": {
- "cacertfile": "${EMQX_ETC_DIR}/certs/cacert.pem",
- "cacerts": false,
- "certfile": "${EMQX_ETC_DIR}/certs/cert.pem",
- "keyfile": "${EMQX_ETC_DIR}/certs/key.pem",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "dhfile": "string",
- "honor_cipher_order": true,
- "client_renegotiation": true,
- "handshake_timeout": "12m"
}, - "num_acceptors": 8,
- "max_connections": 512,
- "backlog": 1024,
- "send_timeout": "12m",
- "inet6": false,
- "ipv6_v6only": false,
- "proxy_header": false
}
}, - "token_expired_time": "12m",
- "cors": false,
- "swagger_support": true,
- "sso": {
- "ldap": {
- "enable": false,
- "backend": "ldap",
- "query_timeout": "32s",
- "server": "string",
- "pool_size": 8,
- "username": "string",
- "password": "R4ND0M/S∃CЯ∃T",
- "base_dn": "string",
- "filter": "(& (objectClass=person) (uid=${username}))",
- "request_timeout": "32s",
- "ssl": {
- "cacertfile": "string",
- "cacerts": false,
- "certfile": "string",
- "keyfile": "string",
- "verify": "verify_peer",
- "reuse_sessions": true,
- "depth": 10,
- "password": "",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
], - "ciphers": [ ],
- "secure_renegotiate": true,
- "log_level": "emergency",
- "hibernate_after": "12m",
- "enable": false,
- "server_name_indication": "disable"
}
}, - "saml": {
- "enable": false,
- "backend": "saml",
- "sp_sign_request": false,
- "sp_public_key": "Pub Key",
- "sp_private_key": "pa$$word"
}
}
}
Update the sub-configurations under broker
enable_session_registry | boolean Default: true The Global Session Registry is a cluster-wide mechanism designed to maintain the uniqueness of client IDs within the cluster. |
session_history_retain | string Default: "0s" The duration to retain the session registration history. Setting this to a value greater than |
{- "enable_session_registry": true,
- "session_history_retain": "1h"
}
{- "enable_session_registry": true,
- "session_history_retain": "1h"
}
Reset the config entry specified by the query string parameter conf_path
.
- For a config entry that has default value, this resets it to the default value;
- For a config entry that has no default value, an error 400 will be returned
rootname required | string Enum: "file_transfer" "broker" "log" "sysmon" "sys_topics" "alarm" "dashboard" Example: sysmon |
conf_path | string Example: conf_path=os.sysmem_high_watermark The config path separated by '.' character |
{- "code": "NO_DEFAULT_VALUE",
- "message": "string"
}
Get all the configurations of the specified keys, including hot and non-hot updatable items.
key | string Enum: "actions" "alarm" "api_key" "authentication" "authorization" "auto_subscribe" "bridges" "cluster" "conn_congestion" "connectors" "crl_cache" "dashboard" "delayed" "durable_storage" "exhook" "file_transfer" "flapping_detect" "force_gc" "force_shutdown" "gateway" "license" "limiter" "listeners" "log" "mqtt" "node" "opentelemetry" "overload_protection" "prometheus" "psk_authentication" "retainer" "rewrite" "rpc" "rule_engine" "schema_registry" "slow_subs" "sources" "sys_topics" "sysmon" "topic_metrics" Example: key=sysmon |
node | string Node's name. Will deprecated in 5.2.0. |
Update the configurations of the specified keys.
mode | string Default: "merge" Enum: "replace" "merge" |
{- "code": "UPDATE_FAILED",
- "message": "string"
}
Get the sub-configurations under log
{- "console": {
- "level": "debug",
- "enable": true,
- "formatter": "text",
- "timestamp_format": "auto",
- "time_offset": "system"
}, - "file": {
- "level": "warning"
}, - "throttling": {
- "time_window": "1h"
}, - "audit": {
- "path": "${EMQX_LOG_DIR}/audit.log",
- "rotation_count": 10,
- "rotation_size": "50MB",
- "max_filter_size": 5000,
- "ignore_high_frequency_request": true,
- "enable": false,
- "timestamp_format": "auto",
- "time_offset": "system"
}
}
Update the sub-configurations under log
object (emqx.console_handler) | |
object or emqx.log_file_handler (object) Default: {"level":"warning"} File-based log handlers. | |
object (emqx.log_throttling) | |
object (emqx.log_audit_handler) |
{- "console": {
- "level": "debug",
- "enable": true,
- "formatter": "text",
- "timestamp_format": "auto",
- "time_offset": "system"
}, - "file": {
- "level": "warning"
}, - "throttling": {
- "time_window": "1h"
}, - "audit": {
- "path": "${EMQX_LOG_DIR}/audit.log",
- "rotation_count": 10,
- "rotation_size": "50MB",
- "max_filter_size": 5000,
- "ignore_high_frequency_request": true,
- "enable": false,
- "timestamp_format": "auto",
- "time_offset": "system"
}
}
{- "console": {
- "level": "debug",
- "enable": true,
- "formatter": "text",
- "timestamp_format": "auto",
- "time_offset": "system"
}, - "file": {
- "level": "warning"
}, - "throttling": {
- "time_window": "1h"
}, - "audit": {
- "path": "${EMQX_LOG_DIR}/audit.log",
- "rotation_count": 10,
- "rotation_size": "50MB",
- "max_filter_size": 5000,
- "ignore_high_frequency_request": true,
- "enable": false,
- "timestamp_format": "auto",
- "time_offset": "system"
}
}
Get the total number of sessions in the cluster.
By default, it includes only those sessions that have not expired.
If the broker.session_history_retain
config is set to a duration greater than 0s,
this count will also include sessions that expired within the specified retain time.
By specifying the since
parameter, it can return the number of sessions that have expired within the specified time.
since | integer >= 0 Default: 0 Example: since=1705391625 Include sessions expired after this time (UNIX Epoch in seconds precision) |
"string"
Get clients info by client ID
clientid required | string |
{- "heap_size": 610,
- "send_msg.dropped.expired": 0,
- "send_oct": 31,
- "recv_msg.qos1": 0,
- "is_persistent": false,
- "send_pkt": 4,
- "clean_start": true,
- "inflight_cnt": 0,
- "node": "emqx@127.0.0.1",
- "send_msg.dropped.queue_full": 0,
- "awaiting_rel_cnt": 0,
- "inflight_max": 32,
- "created_at": "2024-01-01T12:34:56.789+08:00",
- "subscriptions_cnt": 1,
- "mailbox_len": 0,
- "send_cnt": 4,
- "connected": true,
- "ip_address": "127.0.0.1",
- "awaiting_rel_max": 100,
- "recv_msg.qos2": 0,
- "proto_ver": 5,
- "mountpoint": "null",
- "proto_name": "MQTT",
- "port": 52571,
- "connected_at": "2024-01-01T12:34:56.789+08:00",
- "enable_authn": true,
- "expiry_interval": 0,
- "username": null,
- "recv_msg": 0,
- "recv_oct": 49,
- "send_msg.dropped.too_large": 0,
- "keepalive": 60,
- "send_msg.qos1": 0,
- "send_msg.qos2": 0,
- "recv_msg.qos0": 0,
- "send_msg.qos0": 0,
- "subscriptions_max": "infinity",
- "mqueue_max": 1000,
- "mqueue_dropped": 0,
- "clientid": "01",
- "is_bridge": false,
- "peerport": 52571,
- "send_msg": 0,
- "listener": "tcp:default",
- "recv_cnt": 4,
- "recv_pkt": 4,
- "recv_msg.dropped": 0,
- "send_msg.dropped": 0,
- "recv_msg.dropped.await_pubrel_timeout": 0,
- "reductions": 6836,
- "mqueue_len": 0
}
Unsubscribe bulk
clientid required | string |
topic | string Topic |
[- {
- "topic": "testtopic/#"
}
]
{- "code": "CLIENTID_NOT_FOUND",
- "message": "string"
}
Subscribe bulk
clientid required | string |
topic required | string Topic |
qos | integer [ 0 .. 2 ] Default: 0 QoS |
nl | integer Default: 0 No Local |
rap | integer Default: 0 Retain as Published |
rh | integer Default: 0 Retain Handling |
[- {
- "topic": "testtopic/#",
- "qos": 0,
- "nl": 0,
- "rap": 0,
- "rh": 0
}
]
[- {
- "node": "emqx@127.0.0.1",
- "topic": "testtopic/1",
- "clientid": "emqx_clientid_xx128cdhfc",
- "qos": 0,
- "nl": 0,
- "rap": 0,
- "rh": 0
}
]
Subscribe
clientid required | string |
topic required | string Topic |
qos | integer [ 0 .. 2 ] Default: 0 QoS |
nl | integer Default: 0 No Local |
rap | integer Default: 0 Retain as Published |
rh | integer Default: 0 Retain Handling |
{- "topic": "testtopic/#",
- "qos": 0,
- "nl": 0,
- "rap": 0,
- "rh": 0
}
{- "node": "emqx@127.0.0.1",
- "topic": "testtopic/1",
- "clientid": "emqx_clientid_xx128cdhfc",
- "qos": 0,
- "nl": 0,
- "rap": 0,
- "rh": 0
}
Get client mqueue messages
clientid required | string |
payload | string Default: "base64" Enum: "none" "base64" "plain" Client's inflight/mqueue messages payload encoding. If set to |
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. Messages beyond the limit will be silently omitted in the response. The only exception to this rule is when the first message payload is already larger than the limit. In this case, the first message will be returned in the response. |
string or string or string Example: position=none An opaque token that can then be in subsequent requests to get the next chunk of results: "?position={prev_response.meta.position}" | |
limit | integer [ 1 .. 10000 ] Default: 100 Example: limit=50 Results per page(max 10000) |
{- "data": [
- {
- "from_clientid": "mqttx_59ac0a87",
- "from_username": "test-user",
- "mqueue_priority": 0,
- "msgid": "000611F460D57FA9F44500000D360002",
- "payload": "eyJmb28iOiAiYmFyIn0=",
- "publish_at": 1709055346487,
- "qos": 0,
- "topic": "t/test"
}
], - "meta": {
- "count": 100,
- "last": "1710785444656449826_10"
}
}
Get client in-flight messages
clientid required | string |
payload | string Default: "base64" Enum: "none" "base64" "plain" Client's inflight/mqueue messages payload encoding. If set to |
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. Messages beyond the limit will be silently omitted in the response. The only exception to this rule is when the first message payload is already larger than the limit. In this case, the first message will be returned in the response. |
string or string or string Example: position=none An opaque token that can then be in subsequent requests to get the next chunk of results: "?position={prev_response.meta.position}" | |
limit | integer [ 1 .. 10000 ] Default: 100 Example: limit=50 Results per page(max 10000) |
{- "data": [
- {
- "from_clientid": "mqttx_59ac0a87",
- "from_username": "test-user",
- "msgid": "000611F460D57FA9F44500000D360002",
- "payload": "eyJmb28iOiAiYmFyIn0=",
- "publish_at": 1709055346487,
- "qos": 0,
- "topic": "t/test"
}
], - "meta": {
- "count": 100,
- "last": "1710785444656449826"
}
}
Unsubscribe
clientid required | string |
topic | string Topic |
{- "topic": "testtopic/#"
}
{- "code": "CLIENTID_NOT_FOUND",
- "message": "string"
}
Get client subscriptions
clientid required | string |
[- {
- "node": "emqx@127.0.0.1",
- "topic": "testtopic/1",
- "clientid": "emqx_clientid_xx128cdhfc",
- "qos": 0,
- "nl": 0,
- "rap": 0,
- "rh": 0
}
]
List clients
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(max 10000) |
node | string Example: node=emqx@127.0.0.1 Node name |
username | Array of strings User name, multiple values can be specified by repeating the parameter: username=u1&username=u2 |
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 Whether the client uses a new session |
proto_ver | string Client protocol version |
like_clientid | string Fuzzy search |
like_username | string Fuzzy search |
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(millisecond) | |
clientid | Array of strings Client ID, multiple values can be specified by repeating the parameter: clientid=c1&clientid=c2 |
Array of strings or string Default: "all" Comma separated list of client fields to return in the response |
{- "data": [
- {
- "heap_size": 610,
- "send_msg.dropped.expired": 0,
- "send_oct": 31,
- "recv_msg.qos1": 0,
- "is_persistent": false,
- "send_pkt": 4,
- "clean_start": true,
- "inflight_cnt": 0,
- "node": "emqx@127.0.0.1",
- "send_msg.dropped.queue_full": 0,
- "awaiting_rel_cnt": 0,
- "inflight_max": 32,
- "created_at": "2024-01-01T12:34:56.789+08:00",
- "subscriptions_cnt": 1,
- "mailbox_len": 0,
- "send_cnt": 4,
- "connected": true,
- "ip_address": "127.0.0.1",
- "awaiting_rel_max": 100,
- "recv_msg.qos2": 0,
- "proto_ver": 5,
- "mountpoint": "null",
- "proto_name": "MQTT",
- "port": 52571,
- "connected_at": "2024-01-01T12:34:56.789+08:00",
- "enable_authn": true,
- "expiry_interval": 0,
- "username": null,
- "recv_msg": 0,
- "recv_oct": 49,
- "send_msg.dropped.too_large": 0,
- "keepalive": 60,
- "send_msg.qos1": 0,
- "send_msg.qos2": 0,
- "recv_msg.qos0": 0,
- "send_msg.qos0": 0,
- "subscriptions_max": "infinity",
- "mqueue_max": 1000,
- "mqueue_dropped": 0,
- "clientid": "01",
- "is_bridge": false,
- "peerport": 52571,
- "send_msg": 0,
- "listener": "tcp:default",
- "recv_cnt": 4,
- "recv_pkt": 4,
- "recv_msg.dropped": 0,
- "send_msg.dropped": 0,
- "recv_msg.dropped.await_pubrel_timeout": 0,
- "reductions": 6836,
- "mqueue_len": 0
}
], - "meta": {
- "count": 1,
- "hasnext": false,
- "limit": 50,
- "page": 1
}
}
Test creating a new connector.
type required | string Value: "timescale" The type of the connector. |
name required | string The name of the connector. |
enable | boolean Default: true Enable (true) or disable (false) this connector. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
server required | string The IPv4 or IPv6 address or the hostname to connect to. |
database required | string Database name. |
pool_size | integer >= 1 Default: 8 Size of the connection pool towards the bridge target service. |
username required | string The username associated with the bridge in the external database used for authentication or identification purposes. |
password | string <password> The password associated with the bridge, used for authentication with the external database. |
auto_reconnect | boolean Deprecated Default: true Deprecated. Enable automatic reconnect to the database. |
object (emqx.ssl_client_opts) | |
object (connector_postgres.resource_opts) |
{- "name": "influxdb_connector",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}
}
{- "code": "TEST_FAILED",
- "message": "string"
}
Get a connector by id.
id required | string Example: http:my_http_connector The connector id. Must be of format {type}:{name}. |
{- "name": "influxdb_connector",
- "status": "connected",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}
Update a connector by id.
id required | string Example: http:my_http_connector The connector id. Must be of format {type}:{name}. |
enable | boolean Default: true Enable (true) or disable (false) this connector. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
server required | string The IPv4 or IPv6 address or the hostname to connect to. |
database required | string Database name. |
pool_size | integer >= 1 Default: 8 Size of the connection pool towards the bridge target service. |
username required | string The username associated with the bridge in the external database used for authentication or identification purposes. |
password | string <password> The password associated with the bridge, used for authentication with the external database. |
auto_reconnect | boolean Deprecated Default: true Deprecated. Enable automatic reconnect to the database. |
object (emqx.ssl_client_opts) | |
object (connector_postgres.resource_opts) |
{- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}
}
{- "name": "influxdb_connector",
- "status": "connected",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}
Start connector on all nodes in the cluster.
id required | string Example: http:my_http_connector The connector id. Must be of format {type}:{name}. |
operation required | string Value: "start" Example: start Operation can be one of: 'start'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Start connector on a specific node.
node required | |
id required | string Example: http:my_http_connector The connector id. Must be of format {type}:{name}. |
operation required | string Value: "start" Example: start Operation can be one of: 'start'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Enable or Disable connector on all nodes in the cluster.
id required | string Example: http:my_http_connector The connector id. Must be of format {type}:{name}. |
enable required | boolean Example: true Whether to enable this connector. |
{- "code": "NOT_FOUND",
- "message": "string"
}
[- {
- "name": "influxdb_connector",
- "status": "connected",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "name": "my_http_connector",
- "status": "connected",
- "type": "http",
- "connect_timeout": "15s",
- "pool_size": 1,
- "enable": true,
- "headers": {
- "content-type": "application/json"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "pool_type": "hash",
- "enable_pipelining": 100
}, - {
- "name": "my_confluent_producer_connector",
- "status": "connected",
- "type": "confluent_producer",
- "ssl": {
- "verify": "verify_none",
- "enable": true,
- "server_name_indication": "auto",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
]
}, - "authentication": {
- "password": "******"
}, - "connect_timeout": "5s",
- "enable": true,
- "socket_opts": {
- "nodelay": true,
- "recbuf": "1024KB",
- "sndbuf": "1024KB",
- "tcp_keepalive": "none"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "min_metadata_refresh_interval": "3s",
- "bootstrap_hosts": "xyz.sa-east1.gcp.confluent.cloud:9092",
- "metadata_request_timeout": "4s"
}, - {
- "name": "iotdb_connector",
- "status": "connected",
- "type": "iotdb",
- "ssl": {
- "enable": false
}, - "authentication": {
- "password": "******",
- "username": "root"
}, - "description": "My example iotdb connector",
- "connect_timeout": "15s",
- "pool_size": 8,
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "pool_type": "random",
- "enable_pipelining": 100,
- "iotdb_version": "v1.1.x"
}, - {
- "name": "my_azure_event_hub_producer_connector",
- "status": "connected",
- "type": "azure_event_hub_producer",
- "ssl": {
- "verify": "verify_none",
- "enable": true,
- "server_name_indication": "auto",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
]
}, - "authentication": {
- "password": "******"
}, - "connect_timeout": "5s",
- "enable": true,
- "socket_opts": {
- "nodelay": true,
- "recbuf": "1024KB",
- "sndbuf": "1024KB",
- "tcp_keepalive": "none"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "min_metadata_refresh_interval": "3s",
- "bootstrap_hosts": "namespace.servicebus.windows.net:9093",
- "metadata_request_timeout": "4s"
}, - {
- "name": "my_kafka_producer_connector",
- "status": "connected",
- "type": "kafka_producer",
- "authentication": {
- "mechanism": "plain",
- "password": "******",
- "username": "username"
}, - "connect_timeout": "5s",
- "enable": true,
- "socket_opts": {
- "nodelay": true,
- "recbuf": "1024KB",
- "sndbuf": "1024KB",
- "tcp_keepalive": "none"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "min_metadata_refresh_interval": "3s",
- "bootstrap_hosts": "localhost:9092",
- "metadata_request_timeout": "4s"
}, - {
- "name": "kinesis_connector",
- "status": "connected",
- "type": "kinesis",
- "description": "My example kinesis connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "aws_access_key_id": "your_access_key",
- "aws_secret_access_key": "aws_secret_key",
- "max_retries": 2,
- "pool_size": 8
}, - {
- "name": "syskeeper_proxy",
- "status": "connected",
- "type": "syskeeper_proxy",
- "listen": "127.0.0.1:9092",
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "acceptors": 16,
- "handshake_timeout": "16s",
- "actions": [
- "my_action"
]
}, - {
- "name": "my_pgsql_connector",
- "status": "connected",
- "type": "pgsql",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "database": "emqx_data",
- "enable": true,
- "password": "public",
- "pool_size": 8,
- "server": "127.0.0.1:5432",
- "ssl": {
- "ciphers": [ ],
- "depth": 10,
- "enable": false,
- "hibernate_after": "5s",
- "log_level": "notice",
- "reuse_sessions": true,
- "secure_renegotiate": true,
- "verify": "verify_peer",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
]
}, - "username": "postgres"
}, - {
- "name": "mysql_connector",
- "status": "connected",
- "type": "mysql",
- "description": "My example mysql connector",
- "pool_size": 8,
- "server": "127.0.0.1:3306",
- "password": "******",
- "username": "root",
- "database": "test",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "resource_opts": {
- "health_check_interval": "20s"
}
}, - {
- "timeout": "5s",
- "name": "rabbitmq_connector",
- "port": 5672,
- "status": "connected",
- "type": "rabbitmq",
- "ssl": {
- "enable": false
}, - "description": "My example rabbitmq connector",
- "pool_size": 8,
- "server": "127.0.0.1",
- "enable": true,
- "password": "******",
- "username": "guest",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "heartbeat": "30s",
- "actions": [
- "my_action"
], - "virtual_host": "/"
}, - {
- "name": "dynamo_connector",
- "status": "connected",
- "type": "dynamo",
- "description": "My example dynamo connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "aws_access_key_id": "root",
- "aws_secret_access_key": "******",
- "enable": true,
- "pool_size": 8,
- "resource_opts": {
- "health_check_interval": "15s",
- "start_timeout": "5s"
},
}, - {
- "name": "tdengine_connector",
- "status": "connected",
- "type": "tdengine",
- "description": "My example tdengine connector",
- "pool_size": 8,
- "server": "127.0.0.1:6041",
- "enable": true,
- "password": "******",
- "username": "root",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "name": "mongodb_single_connector",
- "status": "connected",
- "type": "mongodb_single",
- "description": "My example mongodb_single connector",
- "parameters": {
- "pool_size": 8,
- "enable": true,
- "password": "******",
- "username": "myuser",
- "database": "mqtt",
- "srv_record": false
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "name": "demo",
- "status": "connected",
- "type": "greptimedb",
- "ssl": {
- "enable": false
}, - "description": "My example greptimedb connector",
- "server": "127.0.0.1:4001",
- "enable": true,
- "password": "******",
- "username": "example_username",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "resource_opts": {
- "batch_size": 100,
- "batch_time": "20ms"
}, - "local_topic": "local/topic/#",
- "dbname": "example_db"
}, - {
- "name": "opents_connector",
- "status": "connected",
- "type": "opents",
- "description": "My example opents connector",
- "pool_size": 8,
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "name": "mongodb_sharded_connector",
- "status": "connected",
- "type": "mongodb_sharded",
- "description": "My example mongodb_sharded connector",
- "parameters": {
- "pool_size": 8,
- "enable": true,
- "password": "******",
- "username": "myuser",
- "database": "mqtt",
- "srv_record": false
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "name": "mongodb_rs_connector",
- "status": "connected",
- "type": "mongodb_rs",
- "description": "My example mongodb_rs connector",
- "parameters": {
- "pool_size": 8,
- "enable": true,
- "password": "******",
- "username": "myuser",
- "database": "mqtt",
- "srv_record": false
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "status": "connected",
- "ssl": {
- "enable": false
}, - "description": "My redis single connector",
- "enable": true,
- "parameters": {
- "pool_size": 8,
- "server": "127.0.0.1:6379",
- "password": "******",
- "username": "test",
- "database": 1,
- "redis_type": "single"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
]
}, - {
- "name": "oracle_connector",
- "status": "connected",
- "type": "oracle",
- "description": "My example oracle connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "password": "oracle",
- "pool_size": 8,
- "resource_opts": {
- "health_check_interval": "15s",
- "start_timeout": "5s"
}, - "server": "127.0.0.1:1521",
- "service_name": "XE",
- "sid": "XE",
- "username": "system"
}, - {
- "name": "hstreamdb_connector",
- "status": "connected",
- "type": "hstreamdb",
- "description": "My example hstreamdb connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "grpc_timeout": "30s",
- "resource_opts": {
- "health_check_interval": "15s",
- "start_timeout": "5s"
}, - "ssl": {
- "enable": false,
- "verify": "verify_peer"
},
}, - {
- "name": "influxdb_connector",
- "status": "connected",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "password": "******",
- "username": "example_username",
- "database": "example_database",
- "influxdb_type": "influxdb_api_v1"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "port": 443,
- "status": "connected",
- "host": "s3.eu-east-1.amazonaws.com",
- "description": "My S3 connector",
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "transport_options": {
- "ssl": {
- "verify": "verify_peer",
- "enable": true
}, - "connect_timeout": "1s",
- "pool_size": 4,
- "max_retries": 1,
- "request_timeout": "60s",
- "enable_pipelining": 1
}, - "secret_access_key": "SECRET",
- "access_key_id": "ACCESS"
}, - {
- "name": "cassandra_connector",
- "status": "connected",
- "type": "cassandra",
- "description": "My example cassandra connector",
- "pool_size": 8,
- "password": "******",
- "username": "root",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "servers": "127.0.0.1:9042",
- "keyspace": "mqtt"
}, - {
- "name": "my_connector",
- "status": "connected",
- "type": "gcp_pubsub_producer",
- "description": "my connector",
- "connect_timeout": "15s",
- "pool_size": 8,
- "enable": true,
- "max_retries": 2,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "resource_opts": {
- "health_check_interval": "30s",
- "start_after_created": true,
- "start_timeout": "5s"
}, - "pipelining": 100,
- "service_account_json": {
- "type": "service_account",
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQI...",
- "client_id": "123812831923812319190",
- "client_email": "test@myproject.iam.gserviceaccount.com",
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test%40myproject.iam.gserviceaccount.com",
- "private_key_id": "kid",
- "project_id": "myproject",
}
}, - {
- "name": "clickhouse_connector",
- "status": "connected",
- "type": "clickhouse",
- "description": "My example clickhouse connector",
- "pool_size": 8,
- "password": "******",
- "username": "default",
- "database": "mqtt",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}, - {
- "driver": "ms-sql",
- "name": "sqlserver_connector",
- "status": "connected",
- "type": "sqlserver",
- "description": "My example sqlserver connector",
- "pool_size": 8,
- "server": "127.0.0.1:1433",
- "password": "******",
- "username": "sa",
- "database": "test",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "resource_opts": {
- "health_check_interval": "20s"
}
}, - {
- "status": "connected",
- "ssl": {
- "enable": false
}, - "description": "My redis cluster connector",
- "enable": true,
- "parameters": {
- "pool_size": 8,
- "password": "******",
- "username": "test",
- "servers": "127.0.0.1:6379,127.0.0.2:6379",
- "redis_type": "cluster"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
]
}, - {
- "name": "my_matrix_connector",
- "status": "connected",
- "type": "matrix",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "database": "emqx_data",
- "enable": true,
- "password": "public",
- "pool_size": 8,
- "server": "127.0.0.1:5432",
- "ssl": {
- "ciphers": [ ],
- "depth": 10,
- "enable": false,
- "hibernate_after": "5s",
- "log_level": "notice",
- "reuse_sessions": true,
- "secure_renegotiate": true,
- "verify": "verify_peer",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
]
}, - "username": "postgres"
}, - {
- "name": "my_connector",
- "status": "connected",
- "type": "kafka_consumer",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s",
- "start_after_created": true,
- "start_timeout": "5s"
}, - "bootstrap_hosts": "kafka.emqx.net:9092"
}, - {
- "name": "rocketmq_connector",
- "status": "connected",
- "type": "rocketmq",
- "description": "My example rocketmq connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "enable": true,
- "pool_size": 8,
- "resource_opts": {
- "health_check_interval": "15s",
- "start_after_created": true,
- "start_timeout": "5s"
}, - "servers": "127.0.0.1:9876"
}, - {
- "name": "pulsar_connector",
- "status": "connected",
- "type": "pulsar",
- "ssl": {
- "enable": false
}, - "authentication": "none",
- "description": "My example pulsar connector",
- "connect_timeout": "5s",
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "servers": "pulsar://127.0.0.1:6650"
}, - {
- "name": "syskeeper_forwarder",
- "status": "connected",
- "type": "syskeeper_forwarder",
- "pool_size": 16,
- "server": "127.0.0.1:9092",
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "ack_timeout": "10s",
- "actions": [
- "my_action"
], - "ack_mode": "no_ack"
}, - {
- "name": "elasticsearch_connector",
- "status": "connected",
- "type": "elasticsearch",
- "ssl": {
- "enable": false
}, - "authentication": {
- "password": "******",
- "username": "root"
}, - "description": "My example elasticsearch connector",
- "connect_timeout": "15s",
- "pool_size": 8,
- "server": "127.0.0.1:9200",
- "enable": true,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "pool_type": "random",
- "enable_pipelining": 100
}, - {
- "name": "my_connector",
- "status": "connected",
- "type": "gcp_pubsub_producer",
- "connect_timeout": "10s",
- "pool_size": 8,
- "enable": true,
- "max_retries": 2,
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "resource_opts": {
- "request_ttl": "60s"
}, - "pipelining": 100,
- "service_account_json": {
- "type": "service_account",
- "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQI...",
- "client_id": "123812831923812319190",
- "client_email": "test@myproject.iam.gserviceaccount.com",
- "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test%40myproject.iam.gserviceaccount.com",
- "private_key_id": "kid",
- "project_id": "myproject",
}
}, - {
- "name": "my_timescale_connector",
- "status": "connected",
- "type": "timescale",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
], - "database": "emqx_data",
- "enable": true,
- "password": "public",
- "pool_size": 8,
- "server": "127.0.0.1:5432",
- "ssl": {
- "ciphers": [ ],
- "depth": 10,
- "enable": false,
- "hibernate_after": "5s",
- "log_level": "notice",
- "reuse_sessions": true,
- "secure_renegotiate": true,
- "verify": "verify_peer",
- "versions": [
- "tlsv1.3",
- "tlsv1.2"
]
}, - "username": "postgres"
}, - {
- "status": "connected",
- "ssl": {
- "enable": false
}, - "description": "My redis sentinel connector",
- "enable": true,
- "parameters": {
- "pool_size": 8,
- "password": "******",
- "username": "test",
- "database": 1,
- "sentinel": "myredismaster",
- "servers": "127.0.0.1:6379,127.0.0.2:6379",
- "redis_type": "sentinel"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
]
}
]
Create a new connector by type and name.
type required | string Value: "timescale" The type of the connector. |
name required | string The name of the connector. |
enable | boolean Default: true Enable (true) or disable (false) this connector. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
server required | string The IPv4 or IPv6 address or the hostname to connect to. |
database required | string Database name. |
pool_size | integer >= 1 Default: 8 Size of the connection pool towards the bridge target service. |
username required | string The username associated with the bridge in the external database used for authentication or identification purposes. |
password | string <password> The password associated with the bridge, used for authentication with the external database. |
auto_reconnect | boolean Deprecated Default: true Deprecated. Enable automatic reconnect to the database. |
object (emqx.ssl_client_opts) | |
object (connector_postgres.resource_opts) |
{- "name": "influxdb_connector",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}
}
{- "name": "influxdb_connector",
- "status": "connected",
- "type": "influxdb",
- "ssl": {
- "enable": false
}, - "description": "My example influxdb connector",
- "server": "127.0.0.1:8086",
- "enable": true,
- "parameters": {
- "org": "examlpe_org",
- "token": "example_token",
- "bucket": "example_bucket",
- "influxdb_type": "influxdb_api_v2"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "actions": [
- "my_action"
]
}
Start bridge on a specific node.
node required | |
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'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
[- {
- "status": "connected",
- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}, - {
- "status": "connected",
- "parameters": {
- "topic": "mytopic"
}, - "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "mqtt_source",
- "status": "connected",
- "type": "mqtt",
- "description": "My example mqtt source",
- "enable": true,
- "parameters": {
- "topic": "remote/topic",
- "qos": 1
}, - "connector": "mqtt_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}, - {
- "name": "rabbitmq_source",
- "status": "connected",
- "type": "rabbitmq",
- "description": "My example rabbitmq source",
- "enable": true,
- "parameters": {
- "queue": "test_queue",
- "no_ack": true
}, - "connector": "rabbitmq_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s"
}
}
]
Create a new bridge by type and name.
type required | string Value: "rabbitmq" |
name required | string |
enable | boolean Default: true Enable (true) or disable (false) this action. |
connector required | string Name of the connector specified by the action, used for external resource selection. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
required | object (bridge_rabbitmq.source_parameters) |
object (actions_and_sources.source_resource_opts) |
{- "name": "my_action",
- "type": "gcp_pubsub_consumer",
- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}
{- "status": "connected",
- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}
Get a bridge by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
{- "status": "connected",
- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}
Update a bridge by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
enable | boolean Default: true Enable (true) or disable (false) this action. |
connector required | string Name of the connector specified by the action, used for external resource selection. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
required | object (bridge_rabbitmq.source_parameters) |
object (actions_and_sources.source_resource_opts) |
{- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}
{- "status": "connected",
- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "node_status": [
- {
- "node": "emqx@localhost",
- "status": "connected"
}
], - "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}
Delete a bridge by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
also_delete_dep_actions | boolean Default: false Whether to cascade delete dependent actions. |
{- "rules": [
- "string"
], - "code": "BAD_REQUEST",
- "message": "string"
}
Enable or Disable bridge on all nodes in the cluster.
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. |
{- "code": "NOT_FOUND",
- "message": "string"
}
Test creating a new bridge.
type required | string Value: "rabbitmq" |
name required | string |
enable | boolean Default: true Enable (true) or disable (false) this action. |
connector required | string Name of the connector specified by the action, used for external resource selection. |
tags | Array of strings Tags to annotate this config entry. |
description | string Default: "" Descriptive text. |
required | object (bridge_rabbitmq.source_parameters) |
object (actions_and_sources.source_resource_opts) |
{- "name": "my_action",
- "type": "gcp_pubsub_consumer",
- "description": "my source",
- "enable": true,
- "parameters": {
- "topic": "my-topic",
- "pull_max_messages": 100
}, - "connector": "my_connector",
- "resource_opts": {
- "health_check_interval": "30s",
- "request_ttl": "45s"
}
}
{- "code": "TEST_FAILED",
- "message": "string"
}
Get bridge metrics by id.
id required | string Example: http:my_http_action The bridge id. Must be of format {type}:{name}. |
{- "metrics": {
- "dropped": 0,
- "dropped.other": 0,
- "dropped.queue_full": 0,
- "dropped.resource_not_found": 0,
- "dropped.resource_stopped": 0,
- "matched": 0,
- "queuing": 0,
- "retried": 0,
- "failed": 0,
- "inflight": 0,
- "success": 0,
- "rate": 0,
- "rate_max": 0,
- "rate_last5m": 0,
- "received": 0
}, - "node_metrics": [
- {
- "node": "emqx@127.0.0.1",
- "metrics": {
- "dropped": 0,
- "dropped.other": 0,
- "dropped.queue_full": 0,
- "dropped.resource_not_found": 0,
- "dropped.resource_stopped": 0,
- "matched": 0,
- "queuing": 0,
- "retried": 0,
- "failed": 0,
- "inflight": 0,
- "success": 0,
- "rate": 0,
- "rate_max": 0,
- "rate_last5m": 0,
- "received": 0
}
}
]
}
Start bridge on all nodes in the cluster.
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'. |
{- "code": "BAD_REQUEST",
- "message": "string"
}
[- {
- "name": "my_avro_schema",
- "type": "avro",
- "description": "My Avro Schema",
- "source": "{\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}"
}
]
Register a new schema
name required | string A name for the schema that will serve as its identifier. |
type required | string Value: "json" Must be |
source required | string Source text for the schema. |
description | string Default: "" A description for this schema. |
{- "name": "my_avro_schema",
- "type": "avro",
- "description": "My Avro Schema",
- "source": "{\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}"
}
{- "name": "my_avro_schema",
- "type": "avro",
- "description": "My Avro Schema",
- "source": "{\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}"
}
Get a schema by its name
name required | string Example: my_schema The schema name |
{- "name": "my_avro_schema",
- "type": "avro",
- "description": "My Avro Schema",
- "source": "{\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}"
}
Update an existing schema
name required | string Example: my_schema The schema name |
type required | string Value: "json" Must be |
source required | string Source text for the schema. |
description | string Default: "" A description for this schema. |
{- "name": "my_avro_schema",
- "type": "avro",
- "description": "My Avro Schema",
- "source": "{\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}"
}
{- "name": "my_avro_schema",
- "type": "avro",
- "description": "My Avro Schema",
- "source": "{\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"i\"},{\"type\":\"string\",\"name\":\"s\"}]}"
}
backend required | string Enum: "ldap" "saml" Example: ldap |
backend required | string Value: "saml" Backend type. |
{- "backend": "saml"
}
{- "role": "administrator",
- "token": "string",
- "version": "5.0.0",
- "license": {
- "edition": "opensource"
}
}
backend required | string Enum: "ldap" "saml" Example: ldap |
{- "enable": false,
- "backend": "saml",
- "sp_sign_request": false,
- "sp_public_key": "Pub Key",
- "sp_private_key": "pa$$word"
}
backend required | string Enum: "ldap" "saml" Example: ldap |
enable | boolean Default: false Whether to enable this backend. |
backend required | string Value: "saml" Backend type. |
dashboard_addr | string Default: "https://127.0.0.1:18083" The address of the EMQX Dashboard. |
idp_metadata_url | string Default: "https://idp.example.com" The URL of the IdP metadata. |
sp_sign_request | boolean Default: false Whether to sign the SAML request. |
sp_public_key | string Default: "Pub Key" The public key of the SP. |
sp_private_key | string <password> The private key of the SP. |
{- "enable": false,
- "backend": "saml",
- "sp_sign_request": false,
- "sp_public_key": "Pub Key",
- "sp_private_key": "pa$$word"
}
{- "enable": false,
- "backend": "saml",
- "sp_sign_request": false,
- "sp_public_key": "Pub Key",
- "sp_private_key": "pa$$word"
}
{- "node": "emqx@127.0.0.1",
- "size": 22740,
- "filename": "emqx-export-2023-11-23-19-13-19.043.tar.gz",
- "created_at": "2023-11-23T19:13:19+02:00",
- "created_at_sec": 1700759599
}
Import a data backup file
node | string Node name |
filename required | string Data backup file name |
{- "node": "emqx@127.0.0.1",
- "filename": "emqx-export-2023-11-23-19-13-19.043.tar.gz"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
List backup files
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(max 10000) |
{- "data": [
- {
- "node": "emqx@127.0.0.1",
- "size": 22740,
- "filename": "emqx-export-2023-09-02-11-11-33.012.tar.gz",
- "created_at": "2023-09-02T11:11:33+02:00",
- "created_at_sec": 1693645893
}, - {
- "node": "emqx@127.0.0.1",
- "size": 22740,
- "filename": "emqx-export-2023-11-23-19-13-19.043.tar.gz",
- "created_at": "2023-11-23T19:13:19+02:00",
- "created_at_sec": 1700759599
}
], - "meta": {
- "count": 300,
- "limit": 20,
- "page": 0
}
}
Send a join invitation to a node to join the cluster but do not wait for the join result. Join status can be retrieved with GET api/<version>/invitation
node required | string Example: emqx2@127.0.0.1 node name |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Invite node to cluster
node required | string Example: emqx2@127.0.0.1 node name |
timeout | integer >= 0 Timeout in milliseconds |
{- "timeout": "15000"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get RLOG cluster topology: connections between core and replicant nodes.
[- {
- "core_node": "emqx-core@127.0.0.1",
- "replicant_nodes": [
- {
- "node": "emqx-replicant@127.0.0.2",
- "streams": "10"
}
]
}
]
Get the execution status of all asynchronous invite status per node
{- "succeed": [
- {
- "node": "emqx2@127.0.0.1",
- "started_at": "2024-01-30T15:24:39.355+08:00",
- "finished_at": "2024-01-30T15:24:39.355+08:00"
}
], - "in_progress": [
- {
- "node": "emqx2@127.0.0.1",
- "started_at": "2024-01-30T15:24:39.355+08:00"
}
], - "failed": [
- {
- "node": "emqx2@127.0.0.1",
- "started_at": "2024-01-30T15:24:39.355+08:00",
- "finished_at": "2024-01-30T15:24:39.355+08:00",
- "reason": "Bad RPC to target node"
}
]
}
List all devices imported from GCP IoT Core
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(max 10000) |
{- "data": [
- {
- "created_at": 1690484400,
- "deviceid": "c2-ec-x509",
- "registry": "my-registry",
- "project": "iot-export",
- "location": "europe-west1",
- "keys": [ ],
- "config": "bXktY29uZmln"
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
Import authentication and config data for devices from GCP IoT Core
blocked required | boolean Blocked |
deviceid required | string Device identifier |
registry | string Default: "" Device registry identifier |
project | string Default: "" Cloud project identifier |
location | string Default: "" Cloud region |
Array of objects (emqx_gcp_device_api.key) Default: [] Public keys associated to GCP device | |
config required | string Configuration |
[- {
- "blocked": false,
- "deviceid": "c2-ec-x509",
- "registry": "my-registry",
- "project": "iot-export",
- "location": "europe-west1",
- "keys": [ ],
- "config": "bXktY29uZmln"
}
]
{- "errors": 0,
- "imported": 14
}
Get a device imported from GCP IoT Core
deviceid required | string Example: c2-ec-x509 Device identifier |
{- "created_at": 1690484400,
- "deviceid": "c2-ec-x509",
- "registry": "my-registry",
- "project": "iot-export",
- "location": "europe-west1",
- "keys": [ ],
- "config": "bXktY29uZmln"
}
Update a device imported from GCP IoT Core
deviceid required | string Example: c2-ec-x509 Device identifier |
registry | string Default: "" Device registry identifier |
project | string Default: "" Cloud project identifier |
location | string Default: "" Cloud region |
Array of objects (emqx_gcp_device_api.key) Default: [] Public keys associated to GCP device | |
config required | string Configuration |
{- "registry": "my-registry",
- "project": "iot-export",
- "location": "europe-west1",
- "keys": [ ],
- "config": "bXktY29uZmln"
}
{- "deviceid": "c2-ec-x509",
- "registry": "my-registry",
- "project": "iot-export",
- "location": "europe-west1",
- "keys": [ ],
- "config": "bXktY29uZmln"
}
Get the gateway client information
clientid required | string Client ID |
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Gateway Name |
{- "recv_oct": 56,
- "clean_start": true,
- "lifetime": 86400,
- "disconnected_at": null,
- "subscriptions_cnt": 0,
- "recv_msg": 0,
- "inflight_max": "infinity",
- "keepalive": 0,
- "node": "emqx@127.0.0.1",
- "send_cnt": 1,
- "mqueue_max": "infinity",
- "send_msg": 0,
- "mqueue_len": 0,
- "send_pkt": 1,
- "awaiting_rel_max": "infinity",
- "send_oct": 61,
- "proto_name": "LwM2M",
- "heap_size": 4185,
- "connected_at": "2021-12-07T10:44:02.721+08:00",
- "mqueue_dropped": 0,
- "recv_pkt": 1,
- "proto_ver": "1.0",
- "port": 50675,
- "expiry_interval": 0,
- "mailbox_len": 0,
- "username": "guest",
- "ip_address": "127.0.0.1",
- "inflight_cnt": 0,
- "is_bridge": false,
- "subscriptions_max": "infinity",
- "endpoint_name": "urn:imei:154928475237123",
- "created_at": "2021-12-07T10:44:02.721+08:00",
- "awaiting_rel_cnt": 0,
- "connected": true,
- "reductions": 72022,
- "clientid": "MzAyMzEzNTUwNzk1NDA1MzYyMzIwNzUxNjQwMTY1NzQ0NjE",
- "recv_cnt": 1
}
Kick out the gateway client
clientid required | string Client ID |
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Gateway Name |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get the gateway client subscriptions
clientid required | string Client ID |
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Gateway Name |
[- {
- "nl": 0,
- "topic": "test/topic",
- "qos": 1,
- "rap": 0,
- "rh": 0
}
]
Create a subscription membership
clientid required | string Client ID |
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Gateway Name |
topic | string Topic Filter/Name |
qos | integer QoS level, enum: 0, 1, 2 |
nl | integer No Local option, enum: 0, 1 |
rap | integer Retain as Published option, enum: 0, 1 |
rh | integer Retain Handling option, enum: 0, 1, 2 |
object (emqx_gateway_api_clients.extra_sub_props) |
{- "nl": 0,
- "topic": "test/topic",
- "qos": 1,
- "rap": 0,
- "rh": 0
}
{- "nl": 0,
- "topic": "test/topic",
- "qos": 1,
- "rap": 0,
- "rh": 0
}
Delete a subscriptions membership
topic required | string Topic Filter/Name |
clientid required | string Client ID |
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Gateway Name |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get the gateway client list
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Gateway Name |
node | string Match the client's node name |
clientid | string Match the client's ID |
username | string Match the client's Username |
ip_address | string Match the client's ip address |
conn_state | string Match the client's connection state |
proto_ver | string Match the client's protocol version |
clean_start | boolean Match the client's clean start flag |
like_clientid | string Use sub-string to match client's ID |
like_username | string Use sub-string to match client's username |
integer or string Match the session created datetime greater than a certain value | |
integer or string Match the session created datetime less than a certain value | |
integer or string Match the client socket connected datetime greater than a certain value | |
integer or string Match the client socket connected datatime less than a certain value | |
endpoint_name | string Match the lwm2m client's endpoint name |
like_endpoint_name | string Use sub-string to match lwm2m client's endpoint name |
gte_lifetime | string Match the lwm2m client registered lifetime greater than a certain value |
lte_lifetime | string Match the lwm2m client registered lifetime less than a certain value |
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(max 10000) |
{- "data": [
- {
- "node": "string",
- "clientid": "string",
- "username": "string",
- "mountpoint": "string",
- "proto_name": "string",
- "proto_ver": "string",
- "ip_address": "string",
- "port": 0,
- "is_bridge": true,
- "connected_at": 1640995200000,
- "disconnected_at": 1640995200000,
- "connected": true,
- "keepalive": 0,
- "clean_start": true,
- "expiry_interval": 0,
- "created_at": 1640995200000,
- "subscriptions_cnt": 0,
- "subscriptions_max": 0,
- "inflight_cnt": 0,
- "inflight_max": 0,
- "mqueue_len": 0,
- "mqueue_max": 0,
- "mqueue_dropped": 0,
- "awaiting_rel_cnt": 0,
- "awaiting_rel_max": 0,
- "recv_oct": 0,
- "recv_cnt": 0,
- "recv_pkt": 0,
- "recv_msg": 0,
- "send_oct": 0,
- "send_cnt": 0,
- "send_pkt": 0,
- "send_msg": 0,
- "mailbox_len": 0,
- "heap_size": 0,
- "reductions": 0
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
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.
payload_encoding | string Default: "plain" Enum: "plain" "base64" MQTT Payload Encoding, |
topic required | string Topic Name |
qos | integer [ 0 .. 2 ] Default: 0 MQTT message QoS |
clientid | string Deprecated |
payload required | string The MQTT message payload. |
object (emqx_mgmt_api_publish.message_properties) | |
retain | boolean Default: false A boolean field to indicate if this message should be retained. |
[- {
- "payload_encoding": "plain",
- "topic": "api/example/topic",
- "qos": 0,
- "clientid": "string",
- "payload": "hello emqx api",
- "properties": {
- "payload_format_indicator": 0,
- "message_expiry_interval": 0,
- "response_topic": "some_other_topic",
- "correlation_data": "string",
- "user_properties": {
- "foo": "bar"
}, - "content_type": "text/plain"
}, - "retain": false
}
]
[- {
- "id": "string"
}
]
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)
payload_encoding | string Default: "plain" Enum: "plain" "base64" MQTT Payload Encoding, |
topic required | string Topic Name |
qos | integer [ 0 .. 2 ] Default: 0 MQTT message QoS |
clientid | string Deprecated |
payload required | string The MQTT message payload. |
object (emqx_mgmt_api_publish.message_properties) | |
retain | boolean Default: false A boolean field to indicate if this message should be retained. |
{- "payload_encoding": "plain",
- "topic": "api/example/topic",
- "qos": 0,
- "clientid": "string",
- "payload": "hello emqx api",
- "properties": {
- "payload_format_indicator": 0,
- "message_expiry_interval": 0,
- "response_topic": "some_other_topic",
- "correlation_data": "string",
- "user_properties": {
- "foo": "bar"
}, - "content_type": "text/plain"
}, - "retain": false
}
{- "id": "string"
}
Test a rule
rule_engine.ctx_delivery_dropped (object) or rule_engine.ctx_bridge_mqtt (object) or rule_engine.ctx_check_authz_complete (object) or rule_engine.ctx_connack (object) or rule_engine.ctx_disconnected (object) or rule_engine.ctx_connected (object) or rule_engine.ctx_dropped (object) or rule_engine.ctx_acked (object) or rule_engine.ctx_delivered (object) or rule_engine.ctx_unsub (object) or rule_engine.ctx_sub (object) or rule_engine.ctx_pub (object) Default: {} The context of the event for testing | |
sql required | string The SQL of the rule for testing |
{- "context": { },
- "sql": "string"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
List all rules
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 |
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(max 10000) |
{- "data": [
- {
- "id": "293fb66f",
- "from": "t/#",
- "created_at": "2021-12-01T15:00:43.153+08:00",
- "name": "foo",
- "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
- "actions": [
- "webhook:my_webhook",
- {
- "args": {
- "payload": "${payload}",
- "topic": "t/1"
}, - "function": "republish"
}, - {
- "function": "console"
}
], - "enable": true,
- "description": "Some description",
- "metadata": { }
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
Create a new rule using given Id
name | string Default: "" The name of the rule |
sql required | string SQL query to transform the messages. |
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. | |
enable | boolean Default: true Enable or disable the rule |
description | string Default: "" The description of the rule |
metadata | object Rule metadata, do not change manually |
{- "name": "foo",
- "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
- "actions": [
- "webhook:my_webhook",
- {
- "args": {
- "payload": "${payload}",
- "topic": "t/1"
}, - "function": "republish"
}, - {
- "function": "console"
}
], - "enable": true,
- "description": "Some description",
- "metadata": { }
}
{- "id": "293fb66f",
- "from": "t/#",
- "created_at": "2021-12-01T15:00:43.153+08:00",
- "name": "foo",
- "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
- "actions": [
- "webhook:my_webhook",
- {
- "args": {
- "payload": "${payload}",
- "topic": "t/1"
}, - "function": "republish"
}, - {
- "function": "console"
}
], - "enable": true,
- "description": "Some description",
- "metadata": { }
}
Get a rule's metrics by given Id
id required | string Example: my_rule_id |
{- "id": "293fb66f",
- "metrics": {
- "matched": 0,
- "matched.rate": 0,
- "matched.rate.max": 0,
- "matched.rate.last5m": 0,
- "passed": 0,
- "failed": 0,
- "failed.exception": 0,
- "failed.unknown": 0,
- "actions.total": 0,
- "actions.success": 0,
- "actions.failed": 0,
- "actions.failed.out_of_service": 0,
- "actions.failed.unknown": 0
}, - "node_metrics": [
- {
- "node": "emqx@127.0.0.1",
- "matched": 0,
- "matched.rate": 0,
- "matched.rate.max": 0,
- "matched.rate.last5m": 0,
- "passed": 0,
- "failed": 0,
- "failed.exception": 0,
- "failed.unknown": 0,
- "actions.total": 0,
- "actions.success": 0,
- "actions.failed": 0,
- "actions.failed.out_of_service": 0,
- "actions.failed.unknown": 0
}
]
}
Get a rule by given Id
id required | string Example: my_rule_id |
{- "id": "293fb66f",
- "from": "t/#",
- "created_at": "2021-12-01T15:00:43.153+08:00",
- "name": "foo",
- "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
- "actions": [
- "webhook:my_webhook",
- {
- "args": {
- "payload": "${payload}",
- "topic": "t/1"
}, - "function": "republish"
}, - {
- "function": "console"
}
], - "enable": true,
- "description": "Some description",
- "metadata": { }
}
Update a rule by given Id to all nodes in the cluster
id required | string Example: my_rule_id |
name | string Default: "" The name of the rule |
sql required | string SQL query to transform the messages. |
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. | |
enable | boolean Default: true Enable or disable the rule |
description | string Default: "" The description of the rule |
metadata | object Rule metadata, do not change manually |
{- "name": "foo",
- "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
- "actions": [
- "webhook:my_webhook",
- {
- "args": {
- "payload": "${payload}",
- "topic": "t/1"
}, - "function": "republish"
}, - {
- "function": "console"
}
], - "enable": true,
- "description": "Some description",
- "metadata": { }
}
{- "id": "293fb66f",
- "from": "t/#",
- "created_at": "2021-12-01T15:00:43.153+08:00",
- "name": "foo",
- "sql": "SELECT * FROM \"test/topic\" WHERE payload.x = 1",
- "actions": [
- "webhook:my_webhook",
- {
- "args": {
- "payload": "${payload}",
- "topic": "t/1"
}, - "function": "republish"
}, - {
- "function": "console"
}
], - "enable": true,
- "description": "Some description",
- "metadata": { }
}
Update rule engine configuration.
ignore_sys_message | boolean Default: true When set to 'true' (default), rule-engine will ignore messages published to $SYS topics. |
jq_function_default_timeout | string Default: "10s" Default timeout for the |
{- "ignore_sys_message": true,
- "jq_function_default_timeout": "32s"
}
{- "ignore_sys_message": true,
- "jq_function_default_timeout": "32s"
}
Update the gateway basic configurations and running status.
Note: The Authentication and Listener configurations should be updated by other special APIs.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
enable required | boolean Example: true Whether to enable this gateway |
{- "code": "NOT_FOUND",
- "message": "string"
}
This API returns an overview info for the specified or all gateways.
including current running status, number of connections, listener status, etc.
status | string Enum: "running" "stopped" "unloaded" Example: status=running Filter gateways by status. |
[- {
- "name": "coap",
- "status": "unloaded"
}, - {
- "name": "exproto",
- "status": "unloaded"
}, - {
- "name": "lwm2m",
- "status": "running",
- "max_connections": 1024000,
- "started_at": "2021-12-08T14:41:26.202+08:00",
- "node_status": [
- {
- "node": "node@127.0.0.1",
- "status": "running",
- "max_connections": 1024000,
- "current_connections": 0
}
], - "listeners": [
- {
- "id": "lwm2m:udp:default",
- "name": "default",
- "running": true,
- "type": "udp"
}
], - "created_at": "2021-12-08T14:41:26.171+08:00",
- "current_connections": 0
}, - {
- "name": "mqttsn",
- "status": "stopped",
- "max_connections": 1024000,
- "node_status": [
- {
- "node": "node@127.0.0.1",
- "status": "running",
- "max_connections": 1024000,
- "current_connections": 0
}
], - "listeners": [
- {
- "id": "mqttsn:udp:default",
- "name": "default",
- "running": false,
- "type": "udp"
}
], - "created_at": "2021-12-08T14:41:45.071+08:00",
- "stopped_at": "2021-12-08T14:56:35.576+08:00",
- "current_connections": 0
}, - {
- "name": "stomp",
- "status": "running",
- "max_connections": 1024000,
- "started_at": "2021-12-08T14:42:15.274+08:00",
- "node_status": [
- {
- "node": "node@127.0.0.1",
- "status": "running",
- "max_connections": 1024000,
- "current_connections": 0
}
], - "listeners": [
- {
- "id": "stomp:tcp:default",
- "name": "default",
- "running": true,
- "type": "tcp"
}
], - "created_at": "2021-12-08T14:42:15.272+08:00",
- "current_connections": 0
}
]
Get the gateway configurations
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
{- "name": "coap",
- "enable": true,
- "heartbeat": "30s",
- "listeners": [
- {
- "name": "default",
- "type": "udp",
- "bind": "5683",
- "max_connections": 1024000,
- "max_conn_rate": 1000
}
], - "idle_timeout": "30s",
- "mountpoint": "coap/",
- "enable_stats": true,
- "connection_required": false,
- "notify_type": "qos",
- "publish_qos": "coap",
- "subscribe_qos": "coap"
}
Update the gateway basic configurations and running status.
Note: The Authentication and Listener configurations should be updated by other special APIs.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
object (gateway.stomp_frame) | |
mountpoint | string Default: "" When publishing or subscribing, prefix all topics with a mountpoint string. |
enable | boolean Default: true Whether to enable this gateway |
enable_stats | boolean Default: true Whether to enable client process statistic |
idle_timeout | string Default: "30s" The idle time of the client connection process. It has two purposes: |
object (gateway.clientinfo_override) |
{- "enable": true,
- "heartbeat": "30s",
- "idle_timeout": "30s",
- "mountpoint": "coap2/",
- "enable_stats": true,
- "connection_required": false,
- "notify_type": "qos",
- "publish_qos": "coap",
- "subscribe_qos": "coap"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
get trace log file's metadata, such as size, last update time
name required | string Example: EMQX-TRACE-1 [a-zA-Z0-9-_] |
[- {
- "node": "emqx@127.0.0.1",
- "size": 0,
- "mtime": 0
}
]
Download trace log by name
name required | string Example: EMQX-TRACE-1 [a-zA-Z0-9-_] |
node | string Example: node=emqx@127.0.0.1 Node name |
{- "code": "NOT_FOUND",
- "message": "string"
}
[- {
- "name": "EMQX-TRACE-1",
- "type": "clientid",
- "topic": "/dev/#",
- "clientid": "dev-001",
- "ip_address": "127.0.0.1",
- "status": "running",
- "payload_encode": "hex",
- "start_at": "2021-11-04T18:17:38+08:00",
- "end_at": "2021-11-05T18:17:38+08:00",
- "log_size": [
- {
- "node": "emqx@127.0.0.1",
- "size": 1024
}
]
}
]
Create new trace
name required | string Unique name of the trace. Only ascii letters in a-z, A-Z, 0-9 and underscore '_' are allowed. |
type required | string Enum: "clientid" "topic" "ip_address" Filter type |
topic | string Specify the topic or topic filter if the trace 'type' is 'topic'. |
clientid | string Specify the MQTT clientid if the trace 'type' is 'clientid'. |
ip_address | string Specify the client's IP address if the trace type is 'ip_address'. |
payload_encode | string Default: "text" Enum: "hex" "text" "hidden" Determine the format of the payload format in the trace file. |
integer or string rfc3339 timestamp or epoch second | |
integer or string rfc3339 timestamp or epoch second |
{- "name": "EMQX-TRACE-1",
- "type": "clientid",
- "topic": "/dev/#",
- "clientid": "dev-001",
- "ip_address": "127.0.0.1",
- "payload_encode": "hex",
- "start_at": "2021-11-04T18:17:38+08:00",
- "end_at": "2021-11-05T18:17:38+08:00"
}
{- "name": "EMQX-TRACE-1",
- "type": "clientid",
- "topic": "/dev/#",
- "clientid": "dev-001",
- "ip_address": "127.0.0.1",
- "status": "running",
- "payload_encode": "hex",
- "start_at": "2021-11-04T18:17:38+08:00",
- "end_at": "2021-11-05T18:17:38+08:00",
- "log_size": [
- {
- "node": "emqx@127.0.0.1",
- "size": 1024
}
]
}
view trace log
name required | string Example: EMQX-TRACE-1 [a-zA-Z0-9-_] |
bytes | integer [ 0 .. 2147483647 ] Default: 1000 Maximum number of bytes to send in response |
position | integer Default: 0 Offset from the current trace position. |
node | string Example: node=emqx@127.0.0.1 Node name |
{- "items": "TEXT-LOG-ITEMS",
- "meta": {
- "bytes": 1000,
- "position": 0
}
}
Stop trace by name
name required | string Example: EMQX-TRACE-1 [a-zA-Z0-9-_] |
{- "name": "EMQX-TRACE-1",
- "type": "clientid",
- "topic": "/dev/#",
- "clientid": "dev-001",
- "ip_address": "127.0.0.1",
- "status": "running",
- "payload_encode": "hex",
- "start_at": "2021-11-04T18:17:38+08:00",
- "end_at": "2021-11-05T18:17:38+08:00",
- "log_size": [
- {
- "node": "emqx@127.0.0.1",
- "size": 1024
}
]
}
Create dashboard user
username | string <= 100 characters Dashboard Username |
password | string <= 100 characters Dashboard Password |
role | string Default: "administrator" User role |
description | string Dashboard User Description |
{- "username": "admin",
- "password": "public",
- "role": "administrator",
- "description": "administrator"
}
{- "username": "admin",
- "role": "administrator",
- "description": "administrator",
- "backend": "local"
}
Get Dashboard Auth Token.
username | string <= 100 characters Dashboard Username |
password | string <= 100 characters Dashboard Password |
{- "username": "admin",
- "password": "public"
}
{- "role": "administrator",
- "token": "string",
- "version": "5.0.0",
- "license": {
- "edition": "opensource"
}
}
Update dashboard user description
username required | string Example: admin Dashboard Username |
backend | string Enum: "local" "ldap" "saml" Example: backend=local |
role | string Default: "administrator" User role |
description | string Dashboard User Description |
{- "role": "administrator",
- "description": "administrator"
}
{- "username": "admin",
- "role": "administrator",
- "description": "administrator",
- "backend": "local"
}
Delete dashboard user
username required | string Example: admin Dashboard Username |
backend | string Enum: "local" "ldap" "saml" Example: backend=local |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Change dashboard user password
username required | string Example: admin Dashboard Username |
old_pwd | string Old password |
new_pwd | string New password |
{- "old_pwd": "string",
- "new_pwd": "string"
}
{- "code": "BAD_REQUEST",
- "message": "string"
}
Dashboard user logout.
This endpoint is only for the Dashboard, not the API Key
.
The token from the /login
endpoint must be a bearer authorization in the headers.
backend | string Enum: "local" "ldap" "saml" Example: backend=local |
username | string <= 100 characters Dashboard Username |
{- "username": "admin"
}
{- "code": "BAD_USERNAME_OR_PWD",
- "message": "string"
}
List all running node's listeners for the specified type.
type | string Enum: "tcp" "ssl" "ws" "wss" "quic" Example: type=tcp Listener type |
[- {
- "id": "tcp:demo",
- "name": "demo",
- "status": {
- "running": true,
- "max_connections": 2048000,
- "current_connections": 201
}, - "type": "tcp",
- "bind": "0.0.0.0:1884",
- "number": 2,
- "enable": true,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 100
}
}, - {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 101
}
}
], - "acceptors": 16
}, - {
- "id": "tcp:default",
- "name": "default",
- "status": {
- "running": true,
- "max_connections": "infinity",
- "current_connections": 501
}, - "type": "tcp",
- "bind": "0.0.0.0:1883",
- "number": 2,
- "enable": true,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": "infinity",
- "current_connections": 200
}
}, - {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": "infinity",
- "current_connections": 301
}
}
], - "acceptors": 32
}
]
Create the specified listener on all nodes.
type required | string Value: "quic" Listener type |
running | boolean Listener status |
name required | string Listener name |
current_connections | integer >= 0 Current connections |
ciphers | Array of strings Default: ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_CHACHA20_POLY1305_SHA256"] This config holds TLS cipher suite names separated by comma, |
object (emqx.listener_quic_ssl_opts) | |
enable | boolean Default: true Enable listener. |
bind required | string Default: 14567 IP address and port for the listening socket. |
acceptors | integer >= 1 Default: 16 The size of the listener's receiving pool. |
integer or string Default: "infinity" The maximum number of concurrent connections allowed by the listener. | |
mountpoint | string Default: "" When publishing or subscribing, prefix all topics with a mountpoint string. |
enable_authn | string Default: true Enum: true false "quick_deny_anonymous" Set |
max_conn_rate | string Maximum connection rate. |
messages_rate | string Messages publish rate. |
bytes_rate | string Data publish rate. |
{- "name": "demo",
- "running": true,
- "type": "tcp",
- "bind": "0.0.0.0:1884",
- "tcp_options": {
- "buffer": "4KB",
- "high_watermark": "1MB",
- "nodelay": false,
- "reuseaddr": true,
- "send_timeout": "15s",
- "send_timeout_close": true,
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 204800,
- "acceptors": 16,
- "proxy_protocol": false,
- "access_rules": [
- "allow all"
], - "proxy_protocol_timeout": "3s",
- "mountpoint": "/",
- "current_connections": 10240
}
{- "id": "tcp:demo",
- "running": true,
- "type": "tcp",
- "bind": "0.0.0.0:1884",
- "tcp_options": {
- "buffer": "4KB",
- "high_watermark": "1MB",
- "nodelay": false,
- "reuseaddr": true,
- "send_timeout": "15s",
- "send_timeout_close": true,
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 204800,
- "acceptors": 16,
- "proxy_protocol": false,
- "access_rules": [
- "allow all"
], - "proxy_protocol_timeout": "3s",
- "mountpoint": "/",
- "current_connections": 10240
}
List all running node's listeners for the specified id.
id required | string Example: tcp:demo Listener id |
{- "id": "tcp:demo",
- "running": true,
- "type": "tcp",
- "bind": "0.0.0.0:1884",
- "tcp_options": {
- "buffer": "4KB",
- "high_watermark": "1MB",
- "nodelay": false,
- "reuseaddr": true,
- "send_timeout": "15s",
- "send_timeout_close": true,
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 204800,
- "acceptors": 16,
- "proxy_protocol": false,
- "access_rules": [
- "allow all"
], - "proxy_protocol_timeout": "3s",
- "mountpoint": "/",
- "current_connections": 10240
}
Update the specified listener on all nodes.
id required | string Example: tcp:demo Listener id |
type required | string Value: "wss" Listener type |
running | boolean Listener status |
id required | string Listener id |
current_connections | integer >= 0 Current connections |
bind | string Default: 8084 IP address and port for the listening socket. |
enable | boolean Default: true Enable listener. |
acceptors | integer >= 1 Default: 16 The size of the listener's receiving pool. |
integer or string Default: "infinity" The maximum number of concurrent connections allowed by the listener. | |
mountpoint | string Default: "" When publishing or subscribing, prefix all topics with a mountpoint string. |
enable_authn | string Default: true Enum: true false "quick_deny_anonymous" Set |
max_conn_rate | string Maximum connection rate. |
messages_rate | string Messages publish rate. |
bytes_rate | string Data publish rate. |
access_rules | Array of strings Default: ["allow all"] The access control rules for this listener. |
proxy_protocol | boolean Default: false Enable the Proxy Protocol V1/2 if the EMQX cluster is deployed behind HAProxy or Nginx. |
proxy_protocol_timeout | string Default: "3s" Timeout for proxy protocol. EMQX will close the TCP connection if proxy protocol packet is not received within the timeout. |
object (emqx.tcp_opts) | |
object (emqx.listener_wss_opts) | |
object (emqx.ws_opts) |
{- "id": "tcp:demo",
- "running": true,
- "type": "tcp",
- "bind": "0.0.0.0:1884",
- "tcp_options": {
- "buffer": "4KB",
- "high_watermark": "1MB",
- "nodelay": false,
- "reuseaddr": true,
- "send_timeout": "15s",
- "send_timeout_close": true,
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 204800,
- "acceptors": 16,
- "proxy_protocol": false,
- "access_rules": [
- "allow all"
], - "proxy_protocol_timeout": "3s",
- "mountpoint": "/",
- "current_connections": 10240
}
{- "id": "tcp:demo",
- "running": true,
- "type": "tcp",
- "bind": "0.0.0.0:1884",
- "tcp_options": {
- "buffer": "4KB",
- "high_watermark": "1MB",
- "nodelay": false,
- "reuseaddr": true,
- "send_timeout": "15s",
- "send_timeout_close": true,
- "backlog": 1024,
- "active_n": 100
}, - "max_connections": 204800,
- "acceptors": 16,
- "proxy_protocol": false,
- "access_rules": [
- "allow all"
], - "proxy_protocol_timeout": "3s",
- "mountpoint": "/",
- "current_connections": 10240
}
List all running node's listeners live status. group by listener type
[- {
- "status": {
- "running": true,
- "max_connections": 2048000,
- "current_connections": 21
}, - "type": "tcp",
- "enable": false,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 11
}
}, - {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": 1024000,
- "current_connections": 10
}
}
], - "ids": [
- "tcp:demo"
]
}, - {
- "status": {
- "running": true,
- "max_connections": "infinity",
- "current_connections": 71
}, - "type": "ssl",
- "enable": false,
- "node_status": [
- {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": "infinity",
- "current_connections": 31
}
}, - {
- "node": "emqx@127.0.0.1",
- "status": {
- "running": true,
- "max_connections": "infinity",
- "current_connections": 40
}
}
], - "ids": [
- "ssl:default"
]
}
]
Gets the configuration of the specified gateway authenticator.
Returns 404 when gateway or authentication is not enabled.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Update the configuration of the specified gateway authenticator, or disable the authenticator.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
mechanism required | string Value: "gcp_device" Authentication mechanism. |
enable | boolean Default: true Set to |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Delete the authenticator of the specified gateway.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Enables the authenticator for client authentication for the specified gateway.
When the authenticator is not configured or turned off, all client connections are assumed to be allowed.
Note: Only one authenticator is allowed to be enabled at a time in the gateway, rather than allowing multiple authenticators to be configured to form an authentication chain as in MQTT.
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
mechanism required | string Value: "gcp_device" Authentication mechanism. |
enable | boolean Default: true Set to |
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
{- "mechanism": "jwt",
- "secret": "mysecret",
- "algorithm": "hmac-based",
- "secret_base64_encoded": false,
- "use_jwks": false,
- "verify_claims": {
- "username": "${username}"
}
}
Import users into the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
filename | string <binary> |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Get the users for the authenticator (only supported by built_in_database
).
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
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(max 10000) |
like_user_id | string Example: like_user_id=test_ Fuzzy search using user ID (username or clientid), only supports search by substring. |
is_superuser | boolean Is superuser |
{- "data": [
- {
- "user_id": "user1"
}, - {
- "is_superuser": true,
- "user_id": "user2"
}
], - "meta": {
- "count": 300,
- "limit": 20,
- "page": 0
}
}
Add user for the authenticator (only supports built_in_database).
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
user_id required | string |
password required | string |
is_superuser | boolean Default: false |
{- "password": "******",
- "user_id": "user1"
}
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Get user info from the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
uid required | string Example: test_username User ID |
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Update the user info for the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
uid required | string Example: test_username User ID |
password required | string |
is_superuser | boolean Default: false |
{- "password": "******"
}
{- "regular_user": {
- "value": {
- "user_id": "user1"
}, - "summary": "Regular user"
}, - "super_user": {
- "value": {
- "is_superuser": true,
- "user_id": "user2"
}, - "summary": "Superuser"
}
}
Delete the user for the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
uid required | string Example: test_username User ID |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Import users into the gateway authenticator (only supports built_in_database)
name required | string Enum: "coap" "exproto" "gbt32960" "jt808" "lwm2m" "mqttsn" "ocpp" "stomp" Example: stomp Gateway Name |
id required | string Example: stomp:tcp:def Listener ID |
filename | string <binary> |
{- "code": "BAD_REQUEST",
- "message": "string"
}
Send a CoAP request message to the client
clientid required | string |
token | string Message token, can be empty |
method | string Enum: "get" "put" "post" "delete" Request method type |
timeout | string Timespan for response |
content_type | string Enum: "text/plain" "application/json" "application/octet-stream" Payload type |
payload | string The content of the payload |
{- "token": "string",
- "method": "get",
- "timeout": "32s",
- "content_type": "text/plain",
- "payload": "string"
}
{- "id": 0,
- "token": "string",
- "method": "string",
- "payload": "string"
}
List retained messages.
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(max 10000) |
{- "data": [
- {
- "msgid": "string",
- "topic": "string",
- "qos": 0,
- "publish_at": "string",
- "from_clientid": "string",
- "from_username": "string"
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
Lookup a message by a topic without wildcards.
topic required | string Topic. |
{- "payload": "string",
- "msgid": "string",
- "topic": "string",
- "qos": 0,
- "publish_at": "string",
- "from_clientid": "string",
- "from_username": "string"
}
{- "enable": true,
- "msg_expiry_interval": "32s",
- "msg_clear_interval": "32s",
- "max_payload_size": "32MB",
- "stop_publish_clear_msg": false,
- "delivery_rate": "1000/s",
- "backend": {
- "type": "built_in_database",
- "storage_type": "ram",
- "max_retained_messages": 0,
- "index_specs": [
- [
- 2,
- 4
], - [
- 1,
- 3
]
], - "enable": true
}
}
Update retainer config.
enable | boolean Default: true Enable retainer feature |
msg_expiry_interval | string Default: "0s" Message retention time. This config is only applicable for messages without the Message Expiry Interval message property. |
msg_clear_interval | string Default: "0s" Interval for EMQX to scan expired messages and delete them. Never scan if the value is 0. |
max_payload_size | string Default: "1MB" Maximum retained message size. |
stop_publish_clear_msg | boolean Default: false When the retained flag of the |
delivery_rate | string Default: "1000/s" The maximum rate of delivering retained messages |
object (retainer.mnesia_config) |
{- "enable": true,
- "msg_expiry_interval": "32s",
- "msg_clear_interval": "32s",
- "max_payload_size": "32MB",
- "stop_publish_clear_msg": false,
- "delivery_rate": "1000/s",
- "backend": {
- "type": "built_in_database",
- "storage_type": "ram",
- "max_retained_messages": 0,
- "index_specs": [
- [
- 2,
- 4
], - [
- 1,
- 3
]
], - "enable": true
}
}
{- "enable": true,
- "msg_expiry_interval": "32s",
- "msg_clear_interval": "32s",
- "max_payload_size": "32MB",
- "stop_publish_clear_msg": false,
- "delivery_rate": "1000/s",
- "backend": {
- "type": "built_in_database",
- "storage_type": "ram",
- "max_retained_messages": 0,
- "index_specs": [
- [
- 2,
- 4
], - [
- 1,
- 3
]
], - "enable": true
}
}
List currently activated alarms or historical alarms, determined by 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(max 10000) |
activated | boolean It is used to specify the alarm type of the query. |
{- "data": [
- {
- "node": "emqx@127.0.0.1",
- "name": "high_system_memory_usage",
- "message": "System memory usage is higher than 70%",
- "details": {
- "high_watermark": 70
}, - "duration": 297056,
- "activate_at": "2021-10-25T11:52:52.548+08:00",
- "deactivate_at": "2021-10-31T10:52:52.548+08:00"
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
List subscriptions
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(max 10000) |
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 |
[- {
- "node": "emqx@127.0.0.1",
- "topic": "testtopic/1",
- "clientid": "emqx_clientid_xx128cdhfc",
- "qos": 0,
- "nl": 0,
- "rap": 0,
- "rh": 0
}
]
API Error Codes
code required | string Enum: "BAD_USERNAME_OR_PWD" "BAD_API_KEY_OR_SECRET" "BAD_REQUEST" "NOT_MATCH" "ALREADY_EXISTS" "BAD_CONFIG_SCHEMA" "BAD_LISTENER_ID" "BAD_NODE_NAME" "BAD_RPC" "BAD_TOPIC" "EXCEED_LIMIT" "INVALID_PARAMETER" "CONFLICT" "NO_DEFAULT_VALUE" "DEPENDENCY_EXISTS" "MESSAGE_ID_SCHEMA_ERROR" "INVALID_ID" "MESSAGE_ID_NOT_FOUND" "NOT_FOUND" "CLIENTID_NOT_FOUND" "CLIENT_NOT_FOUND" "RESOURCE_NOT_FOUND" "TOPIC_NOT_FOUND" "USER_NOT_FOUND" "INTERNAL_ERROR" "SERVICE_UNAVAILABLE" "SOURCE_ERROR" "UPDATE_FAILED" "REST_FAILED" "CLIENT_NOT_RESPONSE" Example: BAD_USERNAME_OR_PWD API Error Codes |
{- "code": "string",
- "description": "string"
}
Update slow subs settings
enable | boolean Default: false Enable this feature |
threshold | string Default: "500ms" The latency threshold for statistics |
expire_interval | string Default: "300s" The eviction time of the record, which in the statistics record table |
top_k_num | integer >= 1 Default: 10 The maximum number of records in the slow subscription statistics record table |
stats_type | string Default: "whole" Enum: "whole" "internal" "response" The method to calculate the latency |
{- "enable": false,
- "threshold": "32s",
- "expire_interval": "32s",
- "top_k_num": 10,
- "stats_type": "whole"
}
{- "enable": false,
- "threshold": "32s",
- "expire_interval": "32s",
- "top_k_num": 10,
- "stats_type": "whole"
}
View slow topics statistics record data
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(max 10000) |
{- "data": [
- {
- "clientid": "string",
- "node": "string",
- "topic": "string",
- "timespan": 0,
- "last_update_time": 0
}
]
}
Update license setting
connection_low_watermark | string Default: "75%" Low watermark limit below which license connection quota usage alarms are deactivated |
connection_high_watermark | string Default: "80%" High watermark limit above which license connection quota usage alarms are activated |
{- "connection_low_watermark": "75%",
- "connection_high_watermark": "80%"
}
{- "connection_low_watermark": "75%",
- "connection_high_watermark": "80%"
}
{- "type": "trial",
- "max_connections": 10,
- "email": "contact@foo.com",
- "start_at": "2022-01-11",
- "expiry": false,
- "customer": "Foo",
- "customer_type": 10,
- "deployment": "bar-deployment",
- "expiry_at": "2295-10-27"
}
Update a license key
required | string or string Default: "default" This configuration parameter is designated for the license key and supports below input formats: |
{- "key": "xxx"
}
{- "type": "trial",
- "max_connections": 10,
- "email": "contact@foo.com",
- "start_at": "2022-01-11",
- "expiry": false,
- "customer": "Foo",
- "customer_type": 10,
- "deployment": "bar-deployment",
- "expiry_at": "2295-10-27"
}
Return api_key list. This API can only be requested using a bearer token.
{- "name": "EMQX-API-KEY-1",
- "api_key": "a4697a5c75a769f6",
- "expired_at": "2021-12-05T02:01:34.186Z",
- "created_at": "2021-12-01T00:00:00.000Z",
- "desc": "Note",
- "enable": true,
- "expired": true,
- "role": "administrator"
}
Create new api_key. This API can only be requested using a bearer token.
name | string Unique and format by [a-zA-Z0-9-_] |
(integer or string) or string Default: "infinity" No longer valid datetime | |
desc | string |
enable | boolean Enable/Disable |
expired | boolean Expired |
role | string Default: "administrator" Role for this API |
{- "name": "EMQX-API-KEY-1",
- "expired_at": "2021-12-05T02:01:34.186Z",
- "desc": "Note",
- "enable": true,
- "expired": true,
- "role": "administrator"
}
{- "name": "EMQX-API-KEY-1",
- "api_key": "a4697a5c75a769f6",
- "api_secret": "MzAyMjk3ODMwMDk0NjIzOTUxNjcwNzQ0NzQ3MTE2NDYyMDI",
- "expired_at": "2021-12-05T02:01:34.186Z",
- "created_at": "2021-12-01T00:00:00.000Z",
- "desc": "Note",
- "enable": true,
- "expired": true,
- "role": "administrator"
}
Return the specific api_key. This API can only be requested using a bearer token.
name required | string Example: EMQX-API-KEY-1 ^[A-Za-z]+[A-Za-z0-9-_]*$ |
{- "name": "EMQX-API-KEY-1",
- "api_key": "a4697a5c75a769f6",
- "expired_at": "2021-12-05T02:01:34.186Z",
- "created_at": "2021-12-01T00:00:00.000Z",
- "desc": "Note",
- "enable": true,
- "expired": true,
- "role": "administrator"
}
Update the specific api_key. This API can only be requested using a bearer token.
name required | string Example: EMQX-API-KEY-1 ^[A-Za-z]+[A-Za-z0-9-_]*$ |
(integer or string) or string Default: "infinity" No longer valid datetime | |
desc | string |
enable | boolean Enable/Disable |
expired | boolean Expired |
role | string Default: "administrator" Role for this API |
{- "expired_at": "2021-12-05T02:01:34.186Z",
- "desc": "Note",
- "enable": true,
- "expired": true,
- "role": "administrator"
}
{- "name": "EMQX-API-KEY-1",
- "api_key": "a4697a5c75a769f6",
- "expired_at": "2021-12-05T02:01:34.186Z",
- "created_at": "2021-12-01T00:00:00.000Z",
- "desc": "Note",
- "enable": true,
- "expired": true,
- "role": "administrator"
}
Delete the specific api_key. This API can only be requested using a bearer token.
name required | string Example: EMQX-API-KEY-1 ^[A-Za-z]+[A-Za-z0-9-_]*$ |
{- "code": "NOT_FOUND",
- "message": "string"
}
List all currently banned client IDs, usernames and IP addresses.
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(max 10000) |
{- "data": [
- {
- "as": "username",
- "who": "Banned name",
- "by": "mgmt_api",
- "reason": "Too many requests",
- "at": "2021-10-25T21:48:47+08:00",
- "until": "2021-10-25T21:53:47+08:00"
}
], - "meta": {
- "page": 1,
- "limit": 50,
- "count": 0,
- "hasnext": true
}
}
Add a client ID, username or IP address to the blacklist.
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, |
who required | string Ban object, specific client ID, username or IP address. |
by | string Initiator of the ban. |
reason | string Ban reason, record the reason why the current object was banned. |
integer or string The start time of the ban, the format is rfc3339, the default is the time when the operation was initiated. | |
integer or string The end time of the ban, the format is rfc3339, the default is the time when the operation was initiated + 1 year. |
{- "as": "username",
- "who": "Banned name",
- "by": "mgmt_api",
- "reason": "Too many requests",
- "at": "2021-10-25T21:48:47+08:00",
- "until": "2021-10-25T21:53:47+08:00"
}
{- "data": [
- {
- "as": "username",
- "who": "Banned name",
- "by": "mgmt_api",
- "reason": "Too many requests",
- "at": "2021-10-25T21:48:47+08:00",
- "until": "2021-10-25T21:53:47+08:00"
}
]
}
Remove a client ID, username or IP address from the blacklist.
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, |
who required | string Example: Badass Ban object, specific client ID, username or IP address. |
{- "code": "NOT_FOUND",
- "message": "string"
}
Get audit logs with filtering parameters. This feature enables users to efficiently
access the desired audit trail data and facilitates auditing, compliance,
troubleshooting, and security analysis.
node | string Example: node=emqx@127.0.0.1 Filter logs by the node name where the logs were generated. |
from | string Enum: "dashboard" "rest_api" "cli" "erlang_console" Example: from=dashboard Filter logs by source type. Possible values are: |
source | string Example: source=admin Filter logs by source. Possible values are: |
source_ip | string Example: source_ip=127.0.0.1 Filter logs by source IP when logs, applicable for logs generated from Dashboard or REST API operations. |
operation_id | string Example: operation_id=/rules/{id} Filter logs by swagger's operation_id, applicable for logs generated from Dashboard or REST API operations. |
operation_type | string Example: operation_type=rules Filter logs by operation type. |
operation_result | string Enum: "success" "failure" Example: operation_result=failure Filter logs by operation result. |
http_status_code | integer Example: http_status_code=200 Filter The HTTP API logs by response code, applicable for logs generated from Dashboard or REST API operations. |
http_method | string Enum: "post" "put" "delete" Example: http_method=post Filter The HTTP API logs by method, applicable for logs generated from Dashboard or REST API operations. |
gte_duration_ms | integer Filter logs by age duration, selecting those created no earlier than then given duration time ago. |
lte_duration_ms | integer Example: lte_duration_ms=1000 Filter logs by age duration, selecting those created no later than then given duration time ago. |
integer or string Example: gte_created_at=2023-10-15T00:00:00.820384+08:00 Filter logs by creation time, selecting logs created no earlier than the given timestamp. | |
integer or string Example: lte_created_at=2023-10-16T00:00:00.820384+08:00 Filter logs by creation time, selecting logs created no later than the given timestamp. | |
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(max 10000) |
{- "data": [
- {
- "args": [ ],
- "created_at": "2023-10-17T10:41:20.383993+08:00",
- "duration_ms": 0,
- "failure": [ ],
- "from": "dashboard",
- "http_method": "post",
- "http_request": {
- "bindings": { },
- "body": {
- "password": "******",
- "username": "admin"
}, - "headers": {
- "accept": "*/*",
- "authorization": "******",
- "connection": "keep-alive",
- "content-length": "45",
- "content-type": "application/json"
}, - "method": "post"
}, - "http_status_code": 200,
- "node": "emqx@127.0.0.1",
- "operation_id": "/login",
- "operation_result": "success",
- "operation_type": "login",
- "source": "admin",
- "source_ip": "127.0.0.1"
}, - {
- "args": [
- "show",
- "log"
], - "created_at": "2023-10-17T10:45:13.100426+08:00",
- "duration_ms": 7,
- "failure": [ ],
- "from": "cli",
- "http_method": [ ],
- "http_request": [ ],
- "http_status_code": [ ],
- "node": "emqx@127.0.0.1",
- "operation_id": [ ],
- "operation_result": [ ],
- "operation_type": "conf",
- "source": [ ],
- "source_ip": [ ]
}
], - "meta": {
- "count": 2,
- "hasnext": false,
- "limit": 50,
- "page": 1
}
}