# Get channel traffic

## Get traffic usage of specified channel

<mark style="color:green;">`POST`</mark> `https://api.renlaer.com/V1/OpenApi/OpenApiGetUseTraffic`

#### Headers

| Name                                           | Type   | Description                       |
| ---------------------------------------------- | ------ | --------------------------------- |
| UserId<mark style="color:red;">\*</mark>       | String | "Authentication" generated userId |
| Token<mark style="color:red;">\*</mark>        | String | "Authentication" generated token  |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json                  |

#### Request Body

| Name                                       | Type    | Description                                                                                                                                                                                                                                                         |
| ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ChannelId                                  | Integer | If not filled, query the traffic used by all channels.                                                                                                                                                                                                              |
| DateType<mark style="color:red;">\*</mark> | String  | Available parameters: 1=today 2=last 7 days 3=last 30 days 4=custom. If custom type is selected you can provide StartTime and EndTime parameters or leave them empty and then they will have default values, sub-user creation date, and current date respectively. |
| StartTime                                  | date    | Use date format yyyy-mm-dd                                                                                                                                                                                                                                          |
| EndTime                                    | date    | Use date format yyyy-mm-dd                                                                                                                                                                                                                                          |

{% tabs %}
{% tab title="200: OK "Code":1000,"Message":"Successful"" %}

```json
{
    "Code": 1000,
    "Message": "Successful",
    "Data": {
        "Items": [
            {
                "ChannelId": 8,
                "UseTraffic": 0.00000,
                "UseTime": "2023-07-29T00:00:00"
            }
        ],
        "UseTrafficGb": {
            "TotalTrafficGb": 0.00000
        }
    }
}

```

{% endtab %}
{% endtabs %}
