Your task is to use the context that was given and to output it in markdown format and clean it up.
Remove the following:
- image links
- this page helpful parts
- grid layout where mentioned
- mentioned imports like import { WasThisPageHelpful } from '@components/WasThisPageHelpful' and other react references/info
- any react components or html tags and keep only the text

Other instructions:
-don't change wording, word order, words itself or add any punctuation 
-do not change any of the content meaning and facts just clean up the formatting and convert to markdown
-if you see selectwrapper with options just combine with the table below it and render it as markdown info
-if you get table in md format don't change anything in it
-if you see any text in the format [text](link) leave it in the same place dont change it or move it
-remove imports from the top of the file like import { WasThisPageHelpful } from '@components/WasThisPageHelpful' and other react references/info if they exist
-do not put duplicated content and do not put notes about duplicated content
-do not change the text enclosed in '---' at the beginning of the file it is used for metadata
-do not explain what you did just output the result
-return full file don't skip or remove anything that is not mentioned in the instructions
:/import React from 'react';

# Examples

## Response examples

The following example demonstrates a **Metrics API response** providing structured data on message traffic. This response includes **channel-specific metrics** timestamps delivery statuses and engagement details offering a clear view of communication performance

The JSON structure consists of a top-level object with three main keys:
- `requestId`: It uniquely identifies the request.
- `status`: Indicates whether the request was successful or not.
- `response`: Contains the actual data returned by the query.

Within the `response` object there are several key pieces of information:
- `requestedPeriod`: A parameter that specifies the time period for which the data was requested typically denoted by a start and end timestamp.
- `totalRows`: A parameter that indicates the total number of rows returned in the response.
- `columns`: An array that provides information about the structure of the data including the names and data types of each column.
- `rows`: An array  thatcontains the actual data returned by the query. Each row represents a single communication instance with values corresponding to the columns specified in the `columns` array.

In the provided example there are six rows of data each representing a communication event. The data includes details such as the channel code timestamp status group status communication count traffic counts delivery rates and open rates. Some values may be shown as N/A indicating unavailable data.

```json
{
  "requestId": "D1ABDD934260284DAE68550826DACDF3",
  "status": "SUCCESS",
  "response": {
    "requestedPeriod": {
      "sentSince": "2024-04-04T00:00:00Z",
      "sentUntil": "2024-04-05T23:59:59Z"
    },
    "totalRows": 6,
    "columns": [
      { "columnName": "CHANNEL_CODE", "columnDataType": "STRING" },
      { "columnName": "HOUR", "columnDataType": "DATE_TIME" },
      { "columnName": "STATUS_GROUP", "columnDataType": "STRING" },
      { "columnName": "STATUS", "columnDataType": "STRING" },
      { "columnName": "COMMUNICATION", "columnDataType": "INTEGER" },
      { "columnName": "TOTAL_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "DELIVERED_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "FAILED_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TOTAL_SENT_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TOTAL_RECEIVED_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TRAFFIC_DELIVERY_RATE", "columnDataType": "NUMBER" },
      { "columnName": "SEEN_OPENED_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TRAFFIC_SEEN_OPEN_RATE", "columnDataType": "NUMBER" }
    ],
    "rows": [
      [
        "SMS", "2024-04-04T13:00:00.000+0000", "DELIVERED", "DELIVERED_TO_HANDSET",
        200000022475266, 1, 1, 0, 1, 0, 1.0, "N/A", "N/A"
      ],
      [
        "EMAIL", "2024-04-05T11:00:00.000+0000", "REJECTED", "REJECTED_VALIDATION_FAILED",
        "N/A", 3, 0, 3, 3, 0, 0.0, 0, 0.0
      ],
      [
        "EMAIL", "2024-04-05T12:00:00.000+0000", "UNDELIVERABLE", "UNDELIVERABLE_REJECTED_OPERATOR",
        200000023016143, 1, 0, 1, 0, 0, 0.0, 0, 0.0
      ],
      [
        "EMAIL", "2024-04-05T12:00:00.000+0000", "DELIVERED", "DELIVERED_TO_HANDSET",
        "N/A", 1, 1, 0, 1, 0, 1.0, 0, 0.0
      ],
      [
        "EMAIL", "2024-04-05T12:00:00.000+0000", "REJECTED", "REJECTED_VALIDATION_FAILED",
        "N/A", 1, 0, 1, 1, 0, 0.0, 0, 0.0
      ],
      [
        "ZALOZNS", "2024-04-04T13:00:00.000+0000", "UNDELIVERABLE", "UNDELIVERABLE_REJECTED_OPERATOR",
        200000022475266, 1, 0, 1, 1, "N/A", 0.0, "N/A", "N/A"
      ]
    ]
  }
}
```

### Sum of message counts

This query retrieves the sum of SMS messages sent over the past day aggregated per hour. It provides an overview of message traffic trends helping you analyze delivery performance and failure rates.

**Sample request body**

```json
{
  "callbackUrl": "https://example.com/receive",
  "request": {
    "filterBy": {
      "sentSince": "2024-03-19T00:00:00Z",
      "sentUntil": "2024-03-19T23:59:59Z",
      "includeSubaccounts": false,
      "channelCodes": ["SMS"]
    },
    "aggregateBy": ["HOUR"],
    "metrics": [
      "TOTAL_TRAFFIC_COUNT",
      "TOTAL_SENT_TRAFFIC_COUNT",
      "DELIVERED_TRAFFIC_COUNT",
      "FAILED_TRAFFIC_COUNT"
    ]
  }
}
```

**Sample result**

The response provides a summary of **SMS message traffic** for the requested period. It includes details such as the **total number of messages** how many were **successfully delivered** and how many **failed**.

```json
{
  "requestId": "44AA99124DA4BE29AE518A3F82DCBD5D",
  "status": "SUCCESS",
  "response": {
    "requestedPeriod": {
      "sentSince": "2024-03-19T00:00:00Z",
      "sentUntil": "2024-03-19T23:59:59Z"
    },
    "totalRows": 1,
    "columns": [
      { "columnName": "CHANNEL_CODE", "columnDataType": "STRING" },
      { "columnName": "HOUR", "columnDataType": "DATE_TIME" },
      { "columnName": "TOTAL_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TOTAL_SENT_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "DELIVERED_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "FAILED_TRAFFIC_COUNT", "columnDataType": "INTEGER" }
    ],
    "rows": [
      [
        "SMS", "2024-03-19T11:00:00.000+0000", 17, 17, 16, 1
      ]
    ]
  }
}
```

**Result breakdown**

The following table summarizes the response data showing the **SMS traffic details** for the given timestamp.

| Metric | Value |
| --- | --- |
| `CHANNEL_CODE` | SMS |
| `HOUR` | 2024-03-19T11:00:00.000Z |
| `TOTAL_TRAFFIC_COUNT` | 17 |
| `TOTAL_SENT_TRAFFIC_COUNT` | 17 |
| `DELIVERED_TRAFFIC_COUNT` | 16 |
| `FAILED_TRAFFIC_COUNT` | 1 |

### Aggregating by application ID and entity ID

This query retrieves message traffic data grouped by **application ID** and **entity ID** allowing you to analyze traffic distribution across different applications and brands. This can help measure the performance of campaigns notifications and different communication channels.

**Sample request body**

The following request filters messages sent within a specified time range and aggregates the data by **application ID** and **entity ID**. The response includes key metrics such as **total traffic** **sent messages** **delivered messages** and the **delivery rate**.

```json
{
  "callbackUrl": "https://example.com/receive",
  "request": {
    "filterBy": {
      "sentSince": "2024-04-01T00:00:00Z",
      "sentUntil": "2024-04-30T23:59:59Z",
      "includeSubaccounts": false,
      "directions": [
        "OUTBOUND",
        "INBOUND"
      ],
      "channelCodes": [
        "WHATSAPP",
        "VIBER",
        "SMS"
      ]
    },
    "aggregateBy": [
      "APPLICATION_ID",
      "ENTITY_ID"
    ],
    "metrics": [
      "TOTAL_TRAFFIC_COUNT",
      "TOTAL_SENT_TRAFFIC_COUNT",
      "DELIVERED_TRAFFIC_COUNT",
      "TRAFFIC_DELIVERY_RATE"
    ]
  }
}
```

**Sample result**

The response returns aggregated data for each application ID and entity ID showing message distribution across different brands and communication channels.

```json
{
  "requestId": "C127668A9BF7B564E8DEE1DE78CE0A94",
  "status": "SUCCESS",
  "response": {
    "requestedPeriod": {
      "sentSince": "2024-04-01T00:00:00Z",
      "sentUntil": "2024-04-30T23:59:59Z"
    },
    "totalRows": 7,
    "columns": [
      { "columnName": "CHANNEL_CODE", "columnDataType": "STRING" },
      { "columnName": "APPLICATION_ID", "columnDataType": "STRING" },
      { "columnName": "ENTITY_ID", "columnDataType": "STRING" },
      { "columnName": "TOTAL_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TOTAL_SENT_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "DELIVERED_TRAFFIC_COUNT", "columnDataType": "INTEGER" },
      { "columnName": "TRAFFIC_DELIVERY_RATE", "columnDataType": "NUMBER" }
    ],
    "rows": [
      [ "SMS", "PROMOTION", "BrandA", 250, 230, 210, 0.91304 ],
      [ "SMS", "PROMOTION", "BrandB", 500, 480, 430, 0.89583 ],
      [ "SMS", "NOTIFICATION", "BrandA", 100, 91, 85, 0.93407 ],
      [ "SMS", "NOTIFICATION", "BrandB", 420, 390, 370, 0.94872 ],
      [ "VIBER", "PROMOTION", "BrandA", 200, 191, 180, 0.94241 ],
      [ "VIBER", "PROMOTION", "BrandB", 350, 299, 280, 0.93646 ],
      [ "WHATSAPP", "PROMOTION", "BrandB", 800, 499, 450, 0.90281 ]
    ]
  }
}
```

**Result breakdown**

The table below summarizes the **aggregated message traffic** based on **application ID** and **entity ID** showing total messages sent messages deliveries and delivery rates across multiple brands and channels.

| `CHANNEL_CODE` | `APPLICATION_ID` | `ENTITY_ID` | `TOTAL_TRAFFIC_COUNT` | `TOTAL_SENT_TRAFFIC_COUNT` | `>DELIVERED_TRAFFIC_COUNT` | `TRAFFIC_DELIVERY_RATE` (%) |
| --- | --- | --- | --- | --- | --- | --- |
| PROMOTION | PROMOTION | NOTIFICATION | NOTIFICATION | PROMOTION | PROMOTION | PROMOTION |
| BrandA | BrandB | BrandA | BrandB | BrandA | BrandB | BrandB |
| 250 | 500 | 100 | 420 | 200 | 350 | 800 |
| 230 | 480 | 91 | 390 | 191 | 299 | 499 |
| 210 | 430 | 85 | 370 | 180 | 280 | 450 |
| 91.30 | 89.58 | 93.41 | 94.87 | 94.24 | 93.65 | 90.28 |