> ## Documentation Index
> Fetch the complete documentation index at: https://help.airbridge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Request Report

Actuals Report provides customization features for the metrics and data you intend to analyze.

Using the various data fields provided by Airbridge, you can customize the report in all forms such as subdividing data into specific criteria, adding metrics on granular criteria, or applying filters.

Request Actuals Report.

rate limit: There is no specific limit for normal usage. However, if excessive requests that may threaten service stability are detected, a temporary 429 Too Many Requests response may be returned.

<Card title="Try API Request" icon="rectangle-api" horizontal href="https://www.postman.com/airbridge-engineering/workspace/airbridge-api/request/22395869-66ddc9d2-2c1b-4911-89a6-7b539706c76e" />

```text POST theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
https://api.airbridge.io/reports/api/v7/apps/{app_name}/actuals/query
```

<h2 id="request-report-request">
  Request
</h2>

***

<h3 id="request-report-headers">
  Headers
</h3>

<ParamField header="Accept-Language" type="string">
  You can specify the language to use for API requests and responses. It follows the ISO-639-1 format.
</ParamField>

<ParamField header="Content-Type" type="string">
  Represents the media type of the resource. Defaults to `application/json`.
</ParamField>

<ParamField header="Authorization" type="string">
  The key value to use for API requests. Instructions for getting API keys are in "[how to generate API Keys](/en/references/introduction#authorization)".
</ParamField>

<h3 id="request-report-path-params">
  Path Params
</h3>

<ParamField path="app_name" type="string" required>
  Airbridge App Name. (Unique ID)
</ParamField>

<h3 id="request-report-body-params">
  Body Params
</h3>

<ParamField body="from" type="string" required>
  The start date of the report data to request.

  * The date must be in the format 'YYYY-MM-DD'
  * This date must correspond with the timezone set in the Airbridge app.
  * Future dates are not permitted.
</ParamField>

<ParamField body="to" type="string">
  The end date of the report data to request.

  * The date must be in the format 'YYYY-MM-DD'
  * This date must correspond with the timezone set in the Airbridge app.
  * The system only accepts dates up the current date. The time period available for querying is up to 400 days.
</ParamField>

<ParamField body="groupBys" type="string[]" required>
  Report "Group By".

  'Group By' is necessary when seeking a more detailed view in reports. The complete list of GroupBys that can be selected in the Actuals report can be checked through the [Get Metadata (GroupBy) API](/en/references/actuals-report/get-metadata-groupby)

  The maximum threshold is 10.
</ParamField>

<ParamField body="metrics" type="string[]" required>
  Report "Metrics".

  Various ad performance data can be examined through metrics. The complete list of metrics that can be selected in the Actuals report can be checked through the [Get Metadata (Metric) API](/en/references/actuals-report/get-metadata-metric).

  The maximum threshold is 20.
</ParamField>

<ParamField body="filters" type="object[]" required>
  The filter for providing 'group by' items.

  <Expandable title="child attributes">
    <ParamField body="filters[0].dimension" type="string" required>
      The groupBys to filter by.

      Only values defined within `groupBys` can be used.
    </ParamField>

    <ParamField body="filters[0].filterType" type="enum" required>
      The operator to apply to the filter.

      | Value       | Description                                                 |
      | ----------- | ----------------------------------------------------------- |
      | `IN`        | In. In Actuals reports, this corresponds to equals (is, =). |
      | `NOT IN`    | Not in. In Actuals reports, this corresponds to is not, ≠.  |
      | `LIKE`      | Contains. ∋                                                 |
      | `NOT LIKE`  | Does not contain. ∌                                         |
      | `EXIST`     | Value exists.                                               |
      | `NOT EXIST` | Value does not exist.                                       |
    </ParamField>

    <ParamField body="filters[0].values" type="string[]">
      The value to apply to the filter.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="sorts" type="object[]" required>
  Sort report data by 'Group By' or 'Metric'.

  <Expandable title="child attributes">
    <ParamField body="sorts[0].fieldName" type="string" required>
      Values within 'groupBys' or 'metrics' serve as criteria for sorting.
    </ParamField>

    <ParamField body="sorts[0].isAscending" type="boolean">
      Sort by ascending (A-Z) or not. (Default: true)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="option" type="object">
  <Expandable title="child attributes">
    <ParamField body="option.eventTimestampSource" type="enum" />
  </Expandable>
</ParamField>

<RequestExample>
  ```shellscript Request theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  curl -X POST 'https://api.airbridge.io/reports/api/v7/apps/{app_name}/actuals/query' \
    -H 'Accept-Language: ko' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
    -d '{
    "from": "2022-11-04",
    "groupBys": [
      "event_source",
      "event_type",
      "event_category"
    ],
    "metrics": [
      "app_events"
    ],
    "filters": [
      {
        "dimension": "channel",
        "filterType": "IN",
        "values": [
          "App"
        ]
      }
    ],
    "sorts": [
      {
        "fieldName": "event_type",
        "isAscending": true
      }
    ]
  }'
  ```
</RequestExample>

<h2 id="request-report-response">
  Response
</h2>

***

### 200

**`task.status`**

<div style={{ overflowX: 'auto' }}>
  <table style={{ display: 'table' }}>
    <tbody>
      <tr>
        <td style={{"minWidth":"130px"}}>
          `PENDING`
        </td>

        <td>
          Data aggregation is in preparation.
        </td>
      </tr>

      <tr>
        <td>
          `RUNNING`
        </td>

        <td>
          Data is being aggregated.
        </td>
      </tr>

      <tr>
        <td>
          `SUCCESS`
        </td>

        <td>
          The aggregation is completed and returns the result.
        </td>
      </tr>

      <tr>
        <td>
          `FAILURE`
        </td>

        <td>
          The request has failed.
        </td>
      </tr>

      <tr>
        <td>
          `CANCELED`
        </td>

        <td>
          The request has been canceled.
        </td>
      </tr>
    </tbody>
  </table>
</div>

### 404

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "task": {
      "status": "RUNNING",
      "taskId": "5e286bd4-b4b1-4c04-8f6a-670dc7ce637d"
    }
  }
  ```

  ```json 404 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "type": "about:blank",
    "title": "Not Found",
    "status": 404,
    "traceId": "1-000000-000000000000000"
  }
  ```
</ResponseExample>
