API Overview
EMQX Cloud provides REST APIs for platform-level operations, broker deployment operations, and EMQX Fleets operations. Use this page to choose the right API type and understand the common access and authentication requirements.
| API Type | Scope | Credentials | Reference |
|---|---|---|---|
| Platform API | Manage platform-level resources, such as deployments, projects, TLS certificates, and audit logs. | Platform API Key and Secret | Platform API |
| Broker Deployment API | Manage broker deployment-level resources, such as clients, subscriptions, message publishing, and other deployment operations. | Deployment App ID and App Secret | Broker Deployment API |
| EMQX Fleets API | Manage Fleets resources, such as thing types, things, device shadow, commands, jobs, and device credentials. | Fleets deployment API Key and API Secret | EMQX Fleets API |
Access API Endpoints
Each API type has its own endpoint and credentials. See the corresponding API reference for how to obtain the endpoint. Access all APIs over HTTPS to ensure that data sent over the network is encrypted using TLS.
Authentication
HTTP APIs use Basic authentication. The username and password depend on the API type:
- For Platform API, use the Platform API Key and Secret. To create one, see Create and Manage Platform API Key.
- For Broker Deployment API, use the deployment App ID and App Secret. To create one, see Create and Manage Deployment API Keys.
- For EMQX Fleets API, use the Fleets deployment API Key and API Secret. To create one, see Deployment API Keys.
All secrets are displayed only once when they are created. Store them securely.
HTTP Status Codes
Common HTTP status codes for EMQX Cloud APIs include:
| Status Code | Description |
|---|---|
| 200 | Success. The response body returns more information in JSON format. |
| 400 | Invalid client request, such as an invalid request body or invalid parameters. |
| 401 | Client authentication failed, possibly because the authentication credentials are invalid. |
| 404 | The requested path cannot be found, or the requested object does not exist. |
| 422 | Invalid properties. |
| 500 | An internal error occurred while the server was processing the request. |