> For the complete documentation index, see [llms.txt](https://help.renlaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.renlaer.com/reference/api-reference/get-channel-traffic.md).

# 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.renlaer.com/reference/api-reference/get-channel-traffic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
