emqx/apps/emqx_management/test
Zaiming (Stone) Shi d1332b72e7 feat(api/publish): return detailed publish results
Prior to this change, the publish API returns 200 in most of
the cases.
This change provides more insights to the publish result.

For single message publish endpoint (`publish/`):

HTTP error codes are:

200: Everything is OK
202: No subscriber for the topic
400: When mesage is invalid message.
     e.g. bad topic name or QoS out of range.
503: Failed to dispatch the message. e.g. during EMQX restart.

The response body is a JSON object with two fields
`message_id`, and `publish_result`.
The `message_id` is a globally unique ID for tracing.
`publish_result` is `"OK"` when the message is delivered
to at least one subscriber.
Otherwise `"no_subscriber"`.
`publish_result` may also be some other informative
message to hint the failure result, the content of which
may change in the future.

For `publish/bulk` endpoint:

200: When all message in the bulk are published OK
202: If at least one message in the bulk had `"no_subscriber"` result
400: When mesage is invalid message. e.g. bad topic name or
     QoS out of range.
503: When there is at least one message failed at dispatch.

The reply body is a list of JSON objects having the same layout
as for hte `publish` endpoint.
2022-10-20 20:03:27 +02:00
..
emqx_mgmt_api_alarms_SUITE.erl chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00
emqx_mgmt_api_app_SUITE.erl fix: infinity means never expire 2022-05-09 14:43:37 +08:00
emqx_mgmt_api_banned_SUITE.erl chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00
emqx_mgmt_api_clients_SUITE.erl fix(mgmt): add subscribe options in client subscribe API 2022-04-27 12:52:52 +08:00
emqx_mgmt_api_configs_SUITE.erl feat: add sysmon config handler to reload conf 2022-07-21 12:33:56 +08:00
emqx_mgmt_api_listeners_SUITE.erl chore: Add test coverage for listeners API 2022-09-19 18:25:25 +08:00
emqx_mgmt_api_metrics_SUITE.erl chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00
emqx_mgmt_api_nodes_SUITE.erl fix: node info, log path only path 2022-05-10 18:00:09 +08:00
emqx_mgmt_api_plugins_SUITE.erl chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00
emqx_mgmt_api_publish_SUITE.erl feat(api/publish): return detailed publish results 2022-10-20 20:03:27 +02:00
emqx_mgmt_api_stats_SUITE.erl chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00
emqx_mgmt_api_status_SUITE.erl fix(mgmt): fix status api test case error 2022-08-09 11:22:48 +08:00
emqx_mgmt_api_subscription_SUITE.erl fix(mgmt): add subscribe options into the result of the /subscriptions API 2022-04-27 12:52:52 +08:00
emqx_mgmt_api_sys_SUITE.erl chore: reformat mgmt 2022-04-20 02:52:31 +08:00
emqx_mgmt_api_test_util.erl feat(api/publish): return detailed publish results 2022-10-20 20:03:27 +02:00
emqx_mgmt_api_topics_SUITE.erl chore: reformat mgmt code. 2022-04-19 14:02:39 +08:00
emqx_mgmt_api_trace_SUITE.erl feat: add node query_string to download logs for specific nodes 2022-05-11 23:19:06 +08:00
emqx_mgmt_cli_SUITE.erl fix: mgmt_cli_SUITE ct failed 2022-05-10 09:38:48 +08:00