Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Execute Async
Resource URL
1/services/data/<latest API version>/analytics/reports/<report ID>/instancesFormats
JSON
HTTP Methods
| Method | Description |
|---|---|
| POST | Runs an instance of a report asynchronously. See this example. Also see this example of a GET request that returns a list of asynchronous runs of a report. |
POST Request Body
| Property | Type | Description |
|---|---|---|
| aggregates | Array of strings | Unique identities for summary or custom summary formula fields in the report. |
| allowedInCustomDetailFormula | Boolean | Specifies whether a field can be referenced in a row-level formula (true) or not (false). |
| buckets | Bucket field | Describes a bucket field. |
| chart | Chart[] | Details about the chart used in a report. |
| crossFilters | Cross filter[] | Cross filters applied to the report. |
| customDetailFormula | Custom Detail Formula[] | An array of objects that describes row-level formulas. |
| customSummaryFormula | Custom summary formula | Describes a custom summary formulas. |
| currency | String | Report currency, such as USD, EUR, GBP, for an organization that has Multi-Currency enabled. Value is null if the organization does not have Multi-Currency enabled. |
| dashboardSetting | Name/value pair | Allows saving of dashboard settings to allow for reports with row limit filters on dashboards. Can be configured on a report for Top-N reports. The Name and Value fields in dashboardSetting are used as Grouping and Aggregate in dashboard components. |
| detailColumns | Array of strings | Unique API names for the fields that have detailed data. |
| developerName | String | Report API name. |
| division | String | Determines the division of records to include in the report. For example, West Coast and East Coast. Available only if your organization uses divisions to segment data and you have the “Affected by Divisions” permission. If you do not have the “Affected by Divisions” permission, your reports include records in all divisions. |
| folderId | String | ID of the folder that contains the report. When the report is in the My Personal Custom Reports folder, folderId = userId. When the report is in the Unfiled Public Reports folder, folderId = orgId. |
| groupingsAcross | Groupings across[] | Unique identities for each column grouping in a report. The identity is an empty array for reports in summary format as it can’t have column groupings, BucketField_(ID) for bucket fields, or the ID of a custom field when the custom field is used for a column grouping. |
| groupingsDown | Groupings down[] | Unique identities for each row grouping in a report. The identity is BucketField_(ID) for bucket fields, or the ID of a custom field when the custom field is used for grouping. |
| hasDetailRows | Boolean | Indicates whether to include detailed data with the summary data. |
| hasRecordCount | Boolean | Indicates whether the report shows the record count. |
| historicalSnapshotDates | Array of strings | List of historical snapshot dates. |
| id | String | Unique report ID. |
| name | String | Display name of the report. |
| presentationOptions | Report presentation options | Display options in the Lightning Report Builder. |
| reportBooleanFilter | String | Logic to parse custom field filters. Value is null when filter logic is not specified. |
| reportFilters | Filter details[] | List of each custom filter in the report along with the field name, filter operator, and filter value. |
| reportFormat | String | Format of the report. Possible values are TABULAR, SUMMARY, MATRIX, or MULTI_BLOCK. The MULTI_BLOCK property is available in API version 43.0 and later. |
| reportType | Report type | Unique API name and display name for the report type. type (string) is the unique identifier of the report type. label (string) is the display name of the report type. |
| scope | String | Defines the scope of the data on which you run the report. For example, you can run the report against all opportunities, opportunities you own, or opportunities your team owns. Valid values depend on the report type. |
| showGrandTotal | Boolean | Indicates whether the report shows the grand total. |
| showSubtotals | Boolean | Indicates whether the report shows subtotals, such as column or row totals. |
| sortBy | Array of strings | API name of the field on which the report is sorted and the direction of the sort (asc or desc). |
| standardDateFilter | Array of strings | Standard date filters available in reports. Each standard date filter contains the following properties: column (API name of the date field on which you filter the report data), durationValue (the range for which you want to run the report; the value is a date literal or 'CUSTOM.'), startDate (start date), and endDate (end date). |
| standardFilters | Array of strings | List of filters that show up in the report by default. The filters vary by report type. For example, standard filters for reports on the Opportunity object are Show, Opportunity Status, and Probability. This list appears as name-value string pairs. |
| supportsRoleHierarchy | Boolean | Indicates whether the report type supports role hierarchy filtering (true) or not (false). |
| topRows | Top rows | Describes a row limit filter applied to the report. |
| userOrHierarchyFilterId | String | Unique user or role ID of the user or role used by the report's role hierarchy filter. If specified, a role hierarchy filter is applied to the report. If unspecified, no role hierarchy filter is applied to the report. |
Example aggregates identities:
- a!Amount represents the average for the Amount column.
- s!Amount represents the sum of the Amount column.
- m!Amount represents the minimum value of the Amount column.
- x!Amount represents the maximum value of the Amount column.
- s!<customfieldID> represents the sum of a custom field column. For custom fields and custom report types, the identity is a combination of the summary type and the field ID.
- u!{column_name} represents a unique count of values for the specified {column_name}. For example, u!AccountName returns the number of unique account name values in the AccountName field.
Example reportBooleanFilter. This is an example of a report filtered to show opportunities for accounts that are either of customer or partner type OR their annual revenue exceeds 100K AND they are medium or large sized businesses. The filters are processed by the logic, “(1 OR 2) AND 3.”
1{
2...
3 "reportBooleanFilter": "(1 OR 2) AND 3",
4 "reportFilters": [
5 {
6 "value": "Analyst,Integrator,Press,Other",
7 "column": "TYPE",
8 "operator": "notEqual"
9 },
10 {
11 "value": "100,000",
12 "column": "SALES",
13 "operator": "greaterThan"
14 },
15 {
16 "value": "Small",
17 "column": "Size",
18 "operator": "notEqual"
19 }
20 ]
21 }
22}Example sortBy:
1"sortBy":[{"sortColumn":"Account_ID","sortOrder":"asc"}]Response Body
| Property | Type | Description |
|---|---|---|
| id | String | Unique ID for an instance of a report that was run asynchronously. |
| status | String | New if the report run has just been triggered through a request, Success if the report ran, Running if the report is being run, or Error if the report run failed. The instance of a report run can return an error if, for example, your permission to access the report has been removed since you requested the run. |
| url | String | URL where results of the report run for that instance are stored. The value is null if the report couldn’t be run because of an error. |
| ownerId | String | API name of the user that created the instance. |
| completionDate | Date, time string | Date, time when the instance of the report run finished. Only available if the report instance ran successfully or couldn’t be run because of an error. Date-time information is in ISO-8601 format. |
| hasDetailRows | Boolean | When false, indicates that summary level data was requested for the report instance. When true, indicates that detailed data, which includes summary level data, was requested for the report instance. |
| requestDate | Date, time string | Date and time when an instance of the report run was requested. Date-time information is in ISO-8601 format. |