# Get Calculated Insight Data

Queries a specific calculated insight in your Data 360 instance. This endpoint allows you to retrieve data with customizable dimensions, measures, filters, and time-based aggregations.

## Syntax

- **HTTP Method**: GET
- **Availability**: Data 360 v1.0, Salesforce v51.0
- **Format**: REST
- **URI**: `/api/v1/insight/calculated-insights/{ci-name}`

## Path Parameters

| Parameter | Type   | Description                                                                           |
| --------- | ------ | ------------------------------------------------------------------------------------- |
| ci-name   | string | Required. The unique identifier of the calculated insight. Example: `Avg_Spends__cio` |

## Query Parameters

| Parameter       | Type    | Description                                                                                                                           |
| --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| dimensions      | string  | Comma-separated list of dimensions to include in the response. Default: all available dimensions. Example: `GenderId__c,FirstName__c` |
| measures        | string  | Comma-separated list of measures to include in the response. Default: all available measures. Example: `TotalSales__c,AvgSpend__c`    |
| limit           | integer | Maximum number of rows to return. Default: 4,999. Example: `1000`                                                                     |
| offset          | integer | Number of rows to skip before returning results. Example: `100`                                                                       |
| filters         | string  | Filter criteria in the format `[field=value]`. Example: `[GenderId__c=Male,FirstName__c=John]`                                        |
| orderby         | string  | Comma-separated list of fields to sort by, with optional direction (ASC/DESC). Example: `GenderId__c ASC,Occupation__c DESC`          |
| timeGranularity | string  | Time-based aggregation level. Available in API v53.0+. Values: `HOUR`, `DAY`, `MONTH`, `QUARTER`, `YEAR`                              |

## Response Structure

The response includes:

- `data`: Array of objects containing the requested dimensions and measures
- `done`: Boolean indicating if all results have been returned

## Examples

### Request

```http
GET https://{TSE}.360a.salesforce.com/api/v1/insights/calculated-insights/Avg_Spends__cio?dimensions=Id__c,FirstName__c&measures=Avg_Spend__c&limit=3
```

### Response

```json
{
  "data": [
    {
      "Id__c": "05d01a06-0c61-3990-808d-2aa602dd3e7f",
      "FirstName__c": "Don",
      "Avg_Spend__c": 1335.15
    },
    {
      "Id__c": "11bcc846-1a80-3293-8cc4-3449835d8d4c",
      "FirstName__c": "Wensei",
      "Avg_Spend__c": 942.67
    },
    {
      "Id__c": "18213566-df86-34a8-97aa-2cb75b70ae3b",
      "FirstName__c": "Ryan",
      "Avg_Spend__c": 2886.5
    }
  ],
  "done": true
}
```

## Notes

- Use pagination (limit/offset) for retrieving large datasets
- Time-based aggregation is only available in API version 53.0 and later
- Filter values are case-sensitive
- The orderby parameter supports multiple fields with different sort directions
