emqx-docs
emqx-docs copied to clipboard
Fix issue #1995: The API here returns 404 when tested with Postman
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:
- Corrected API Endpoints: The patch updates the listed API paths from
/clientid,/username, and/allto the correct/rules/clients,/rules/users, and/rules/allrespectively. This directly resolves the primary complaint about incorrect endpoints. - Added Authentication to
curlCalls: The existingcurlexample forclientidwas modified to include theAuthorization: Bearer $EMQX_TOKENheader, which was previously missing. Furthermore, the agent added two newcurlexamples forusernameandallrules, 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 🙌