# EMQX HTTP

## Authentication

<mark style="color:green;">`POST`</mark> `/emqx/auth`

#### Request Body

| Name                                       | Type   | Description                                     |
| ------------------------------------------ | ------ | ----------------------------------------------- |
| identity<mark style="color:red;">\*</mark> | String | MongoId of IM authorization project             |
| token<mark style="color:red;">\*</mark>    | String | Token issued by the project to which it belongs |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="400: Bad Request " %}
```
- Body
    - **message** `string`
```
{% endtab %}
{% endtabs %}

## Authorization

<mark style="color:green;">`POST`</mark> `/emqx/acl`

#### Request Body

| Name                                       | Type   | Description                         |
| ------------------------------------------ | ------ | ----------------------------------- |
| identity<mark style="color:red;">\*</mark> | String | MongoId of IM authorization project |
| topic<mark style="color:red;">\*</mark>    | String |                                     |

{% tabs %}
{% tab title="200: OK Deny" %}
```
- Body
    - **result** `string` = "deny" is rejected
```
{% endtab %}

{% tab title="204: No Content Allow" %}

{% endtab %}

{% tab title="400: Bad Request " %}
```
- Body
    - **message** `string`
```
{% endtab %}
{% endtabs %}

## Data Bridging

<mark style="color:green;">`POST`</mark> `/emqx/bridge`

#### Request Body

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| client<mark style="color:red;">\*</mark>  | String | Client ID   |
| topic<mark style="color:red;">\*</mark>   | String |             |
| payload<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="400: Bad Request " %}
```
- Body
    - **message** `string`
```
{% endtab %}
{% endtabs %}
