Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update(rest api): Add authentication method in REST API #2705

Open
wants to merge 2 commits into
base: release-5.8
Choose a base branch
from

Conversation

Meggielqk
Copy link
Collaborator

Update the REST API document according to the Technical Support's feedback recorded in this issue: https://emqx.atlassian.net/browse/EDOC-340?atlOrigin=eyJpIjoiOGRiNDkyZWQ0MGY1NDZkMWEzYTc3ZDFiNWU5MTkxMjQiLCJwIjoiaiJ9.

The main changes are:

  • A new authentication method "authentication with bearer token" is added.
  • The "HTTP Headers" and "HTTP Response Status Code" sections are moved before authentication methods so that users understand how the API communicates before setting up authentication.

| 404 | Not Found. You can refer to the `message` field in the Body to check the reason |
| 409 | Conflict. The object already exists or the number limit is exceeded |
| 500 | Internal Server Error. Check the reason in the Body and logs |
##### Use cURL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get the Bearer token, just need to send an HTTP request to call the login API. You only need to clearly describe this API endpoint, or link directly to the login API documentation. Examples with curl or shell commands are unnecessary, as these are just two of many tools for calling an API. Other tools, like Postman, or even programming methods, can also be used to make the API call. So, the main focus here is to describe the login API interface clearly, not to show how to use a specific tool to call it.

@Meggielqk Meggielqk added this to the 5.8.2 milestone Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants