Reports
Clone report by id
Create a report cloning another report.
Note: The API may throw a HTTP 404 if there are no reports found with a given id.
The API returns a 201 CREATED if the cloning was successful.
post/datainsights/v1.1/reports/{report_id}/clone
Path parameters
report_idinteger required
Report id of the resource
Headers
X-PROPERTY-IDinteger required
Property id of the client
Request body
Example request
{
"title": "Report title",
"description": "Report description",
"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"
}
],
"charts": [
{
"datasource_kind": "stock_report",
"datasource_title": "My Report",
"datasource_description": "Detailed Report Description",
"title": "My cool new chart",
"kind": "bar",
"settings": {
"metrics": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"metric": "sum",
"kind": "line",
"axis": "left"
}
],
"stack": "normalized"
},
"categories": "\"Periods\"",
"metrics": [
{
"cdf": {
"type": "default",
"column": "credit_amount"
},
"metrics": [
"sum"
]
}
],
"created_at": "2022-01-01T00:00:00Z",
"updated_at": "2022-01-01T00:00:00Z"
}
]
}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 endpoint across all 1 revision of this API.