{"id":13581044,"url":"https://github.com/emqx/emqx-web-hook","last_synced_at":"2025-04-06T06:32:25.688Z","repository":{"id":17576465,"uuid":"82270543","full_name":"emqx/emqx-web-hook","owner":"emqx","description":"EMQX Webhook Plugin","archived":false,"fork":false,"pushed_at":"2023-12-27T07:25:59.000Z","size":426,"stargazers_count":81,"open_issues_count":19,"forks_count":37,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-02T23:11:56.745Z","etag":null,"topics":["broker","emq","emqttd","erlang","mqtt","mqtt-broker","plugin","webhook"],"latest_commit_sha":null,"homepage":"https://www.emqx.com","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emqx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-17T07:38:11.000Z","updated_at":"2025-02-01T12:17:41.000Z","dependencies_parsed_at":"2024-03-17T09:45:57.926Z","dependency_job_id":null,"html_url":"https://github.com/emqx/emqx-web-hook","commit_stats":null,"previous_names":[],"tags_count":214,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emqx%2Femqx-web-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emqx%2Femqx-web-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emqx%2Femqx-web-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emqx%2Femqx-web-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emqx","download_url":"https://codeload.github.com/emqx/emqx-web-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445652,"owners_count":20939952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broker","emq","emqttd","erlang","mqtt","mqtt-broker","plugin","webhook"],"created_at":"2024-08-01T15:01:57.528Z","updated_at":"2025-04-06T06:32:25.440Z","avatar_url":"https://github.com/emqx.png","language":"Erlang","funding_links":[],"categories":["Erlang","Developer Tools \u0026 Libraries"],"sub_categories":["🚀 How to contribute"],"readme":"\n# emqx-web-hook\n\nEMQX WebHook plugin.\n\nPlease see: [EMQX - WebHook](https://docs.emqx.io/broker/latest/en/advanced/webhook.html)\n\n## emqx_web_hook.conf\n\n```properties\n## The web services URL for Hook request\n##\n## Value: String\nweb.hook.api.url = http://127.0.0.1:8080\n\n## Encode message payload field\n##\n## Value: base64 | base62\n## web.hook.encode_payload = base64\n\n##--------------------------------------------------------------------\n## Hook Rules\n\n## These configuration items represent a list of events should be forwarded\n##\n## Format:\n##   web.hook.rule.\u003cHookName\u003e.\u003cNo\u003e = \u003cSpec\u003e\nweb.hook.rule.client.connect.1       = {\"action\": \"on_client_connect\"}\nweb.hook.rule.client.connack.1       = {\"action\": \"on_client_connack\"}\nweb.hook.rule.client.connected.1     = {\"action\": \"on_client_connected\"}\nweb.hook.rule.client.disconnected.1  = {\"action\": \"on_client_disconnected\"}\nweb.hook.rule.client.subscribe.1     = {\"action\": \"on_client_subscribe\"}\nweb.hook.rule.client.unsubscribe.1   = {\"action\": \"on_client_unsubscribe\"}\nweb.hook.rule.session.subscribed.1   = {\"action\": \"on_session_subscribed\"}\nweb.hook.rule.session.unsubscribed.1 = {\"action\": \"on_session_unsubscribed\"}\nweb.hook.rule.session.terminated.1   = {\"action\": \"on_session_terminated\"}\nweb.hook.rule.message.publish.1      = {\"action\": \"on_message_publish\"}\nweb.hook.rule.message.delivered.1    = {\"action\": \"on_message_delivered\"}\nweb.hook.rule.message.acked.1        = {\"action\": \"on_message_acked\"}\n```\n\n## API\n\nThe HTTP request parameter format:\n\n* client.connected\n```json\n{\n    \"action\":\"client_connected\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"keepalive\": 60,\n    \"ipaddress\": \"127.0.0.1\",\n    \"proto_ver\": 4,\n    \"connected_at\": 1556176748,\n    \"conn_ack\":0\n}\n```\n\n* client.disconnected\n```json\n{\n    \"action\":\"client_disconnected\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"reason\":\"normal\"\n}\n```\n\n* client.subscribe\n```json\n{\n    \"action\":\"client_subscribe\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"topic\":\"world\",\n    \"opts\":{\n        \"qos\":0\n    }\n}\n```\n\n* client.unsubscribe\n```json\n{\n    \"action\":\"client_unsubscribe\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"topic\":\"world\"\n}\n```\n\n* session.created\n```json\n{\n    \"action\":\"session_created\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\"\n}\n```\n\n* session.subscribed\n```json\n{\n    \"action\":\"session_subscribed\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"topic\":\"world\",\n    \"opts\":{\n        \"qos\":0\n    }\n}\n```\n\n* session.unsubscribed\n```json\n{\n    \"action\":\"session_unsubscribed\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"topic\":\"world\"\n}\n```\n\n* session.terminated\n```json\n{\n    \"action\":\"session_terminated\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"reason\":\"normal\"\n}\n```\n\n* message.publish\n```json\n{\n    \"action\":\"message_publish\",\n    \"from_client_id\":\"C_1492410235117\",\n    \"from_username\":\"C_1492410235117\",\n    \"topic\":\"world\",\n    \"qos\":0,\n    \"retain\":true,\n    \"payload\":\"Hello world!\",\n    \"ts\":1492412774\n}\n```\n\n* message.delivered\n```json\n{\n    \"action\":\"message_delivered\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"from_client_id\":\"C_1492410235117\",\n    \"from_username\":\"C_1492410235117\",\n    \"topic\":\"world\",\n    \"qos\":0,\n    \"retain\":true,\n    \"payload\":\"Hello world!\",\n    \"ts\":1492412826\n}\n```\n\n* message.acked\n```json\n{\n    \"action\":\"message_acked\",\n    \"clientid\":\"C_1492410235117\",\n    \"username\":\"C_1492410235117\",\n    \"from_client_id\":\"C_1492410235117\",\n    \"from_username\":\"C_1492410235117\",\n    \"topic\":\"world\",\n    \"qos\":1,\n    \"retain\":true,\n    \"payload\":\"Hello world!\",\n    \"ts\":1492412914\n}\n```\n\n## License\n\nApache License Version 2.0\n\n## Author\n\n* [Sakib Sami](https://github.com/s4kibs4mi)\n\n## Contributors\n\n* [Deng](https://github.com/turtleDeng)\n* [vishr](https://github.com/vishr)\n* [emqplus](https://github.com/emqplus)\n* [huangdan](https://github.com/huangdan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femqx%2Femqx-web-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femqx%2Femqx-web-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femqx%2Femqx-web-hook/lists"}