GET /api/v1/profile/{dataModelName}/{Id}/calculated-insights/{ci-name}
Returns data model objects and a computed view based on indexes and search filters.
Syntax
- HTTP method
- GET
- Availability
- Salesforce CDP v1.0, Salesforce v51.0
- Formats
- REST
- URI
- /api/v1/profile/{dataModelName}/{Id}/calculated-insights/{ci-name}
Request Parameters
| Field Name | Field Type | Description |
|---|---|---|
| ci_name | string | Required. The Calculated Insight name. Example: IndividualChildrenCount__cio |
| dataModelName | string | Required. Data model object API name. Example: UnifiedIndividual__dlm |
| dimensions | string | Comma-separated name of the dimensions to be part of result from the computed view. By default includes all the dimensions. Example: Id__c |
| filters | string | Filters are applied only on the parent object. Example: [FirstName__c=Angel] |
| id | string | Required. The value of an indexed column. Example: 003726a3-061d-33e7-a5a5-96ecae866a61 |
| limit | int | The numbers of items to return. Example: 10 |
| measures | string | Comma-separated name of the measures to be part of result from the computed view. By default includes all the measures. Example: TotalSales__c |
| offset | int | Number of rows to skip before starting to return. Example: 100 This field is available in API version 52.0 and later. |
| orderby | string | Comma-separated values to sort the result-set in ascending or descending order.
Example: GenderId__c ASC,Occupation__c DESC This field is available in API version 52.0 and later. |
| searchKey | string | Index name if object's ID is different from primary key. Example: FirstName__c |
| timeGranularity | string | This parameter enables you to roll up the measures to various time ranges. Possible
values: HOUR, DAY, MONTH, QUARTER, YEAR This field is available in API version 53.0 and later. |
Examples
- Request
-
1https://{TSE}.360a.salesforce.com/api/v1/profile/{dataModelName}/{Id}/calculated-insights/{ci-name} - Response
-
1{ 2 "data": [ 3 { 4 "GenderId__c": "F", 5 "Id__c": "05d01a06-0c61-3990-808d-2aa602dd3e7f", 6 "Occupation__c": "Staffing", 7 "FirstName__c": "Don" 8 }, 9 { 10 "GenderId__c": "M", 11 "Id__c": "11bcc846-1a80-3293-8cc4-3449835d8d4c", 12 "Occupation__c": "Operational", 13 "FirstName__c": "Don" 14 }, 15 { 16 "GenderId__c": "M", 17 "Id__c": "18213566-df86-34a8-97aa-2cb75b70ae3b", 18 "Occupation__c": "Organizational", 19 "FirstName__c": "Don" 20 } 21 ], 22 "done": false 23}
HTTP Responses
| Response | Reason |
|---|---|
| 200 OK | Callback successfully verified |
| 400 Bad Request | Invalid request |
| 403 Forbidden | Failed to pass authorization. |
| 404 Not Found | Incorrect callback ID, verification key, or both. |
| 422 Unprocessable Entity | Attribute name used in fields/filter parameter doesn’t exist. |
| 500 Server Error | Internal error |