emqx-docs icon indicating copy to clipboard operation
emqx-docs copied to clipboard

Fix issue #1995: The API here returns 404 when tested with Postman

Open github-actions[bot] opened this issue 5 months ago • 0 comments

This pull request fixes #1995.

The issue described two main problems: incorrect API endpoints listed in the documentation and missing authentication in the provided curl examples.

The agent's changes directly address both points:

  1. Corrected API Endpoints: The patch updates the listed API paths from /clientid, /username, and /all to the correct /rules/clients, /rules/users, and /rules/all respectively. This directly resolves the primary complaint about incorrect endpoints.
  2. Added Authentication to curl Calls: The existing curl example for clientid was modified to include the Authorization: Bearer $EMQX_TOKEN header, which was previously missing. Furthermore, the agent added two new curl examples for username and all rules, both of which correctly include the necessary authentication header. This resolves the "no authentication in curl calls" aspect of the issue.

By updating the API paths and providing complete, authenticated curl examples for all relevant scenarios, the documentation now accurately reflects the correct way to manage authorization rules via API.

Automatic fix generated by OpenHands 🙌

github-actions[bot] avatar Jun 16 '25 06:06 github-actions[bot]