Reports
Create a new report
Create a single report.
Note: Based on the properties defined while creating a report the type may have multiple formats.
Types
List
{
...
"columns": ...
"settings": {
...
"totals": false,
"transpose": false,
}
}
List (Totals)
{
...
"columns": ...
"settings": {
...
"totals": true,
"transpose": false,
}
}
PeriodList
{
...
"columns": ...
"periods": ...
"settings": {
...
"totals": false,
"transpose": true|false,
}
}
Summary
{
...
"columns": ...
"group_rows": ...
"settings": {
...
"totals": false,
"transpose": true|false,
}
}
Summary (Totals)
{
...
"columns": ...
"group_rows": ...
"settings": {
...
"totals": true
"transpose: true|false,
}
}
PeriodSummary
{
...
"columns": ...
"group_rows": ...
"periods": ...
"settings": {
...
"totals": false,
"transpose": true|false,
}
}
Pivot
{
...
"columns": ...
"group_rows": ...
"group_columns": ...
"settings": {
...
"totals": false,
"transpose": true|false
}
}
Pivot (Totals)
{
...
"columns": ...
"group_rows": ...
"group_columns": ...
"settings": {
...
"totals": true,
"transpose": true|false,
}
}
Data
| Type | Headers | Index | Records | Group Rows | Group Columns | Totals | Periods | Transpose |
|---|---|---|---|---|---|---|---|---|
| List | Yes | No | Yes | No | No | No | No | No |
| List (Totals) | Yes | No | Yes | No | No | Yes | No | No |
| PeriodList | Yes | Yes | Yes | No | No | No | Yes | Yes |
| Summary | Yes | Yes | Yes | Yes | No | No | No | Yes |
| Summary (Details) | Yes | Yes | Yes | Yes | No | Yes | No | No |
| Summary (Totals) | Yes | Yes | Yes | Yes | No | Yes | No | Yes |
| PeriodSummary | Yes | Yes | Yes | Yes | No | No | Yes | Yes |
| Pivot | Yes | Yes | Yes | Yes | Yes | No | No | Yes |
| Pivot (Totals) | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes |
The API returns a 201 CREATED if the creation was successful.
post/datainsights/v1.1/reports
Request
- The document declares no server URL.
- AuthHTTP bearer
Headers
X-PROPERTY-IDinteger required
Property id of the client
Request body
Example request
{
"title": "Report title",
"description": "Report description",
"dataset_id": 1,
"columns": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"metrics": [
"sum"
]
}
],
"group_rows": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
],
"group_columns": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
],
"periods": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"name": "Month-To-Date",
"id": "start_of_last_year_to_today",
"start": "'2014-12-22T03:12:58'|'start_current_year'",
"end": "'2014-12-22T03:12:58'|'today'"
}
],
"comparisons": [
{
"name": "Range 1",
"id": "range_1",
"filters": {
"and": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
]
}
}
],
"filters": {
"and": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
],
"or": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
]
},
"sort": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"direction": "asc"
}
],
"formats": {
"date": "YYYY-MM-DD"
},
"type": "List",
"tags": [
{
"name": "#Financial"
}
],
"schedule_ids": [
1
],
"custom_cdfs": [
{
"column": "full_address",
"name": "Full address",
"description": "CDF with the full address information",
"kind": "String",
"format": "currency"
}
]
}Response
Created
Example response
{
"title": "Report title",
"description": "Report description",
"dataset_id": 1,
"columns": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"metrics": [
"sum"
]
}
],
"group_rows": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
],
"group_columns": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
],
"periods": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"name": "Month-To-Date",
"id": "start_of_last_year_to_today",
"start": "'2014-12-22T03:12:58'|'start_current_year'",
"end": "'2014-12-22T03:12:58'|'today'"
}
],
"comparisons": [
{
"name": "Range 1",
"id": "range_1",
"filters": {
"and": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
]
}
}
],
"filters": {
"and": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
],
"or": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
}
}
]
},
"sort": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"direction": "asc"
}
],
"formats": {
"date": "YYYY-MM-DD"
},
"type": "List",
"tags": [
{
"name": "#Financial"
}
],
"schedule_ids": [
1
],
"custom_cdfs": [
{
"column": "full_address",
"name": "Full address",
"description": "CDF with the full address information",
"kind": "String",
"format": "currency"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.