sophie Collard
03/04/2025, 10:42 AMSELECT COUNT(Ticket Id) BY Customer WHERE Date (Created At) > THIS - 30
I've created a metric from the above query, but the only kind of report I'm able to generate from it so far is a 1 x 1 grid with the total ticket count in the past 30 days, not the total count per customer which is what I'm after. Below is the payload I'm using to generate the 1 x 1 grid report.
{
"report_req": {
"definitionContent": {
"content": {
"reportDefinition": {
"content": {
"filters": [],
"format": "grid",
"grid": {
"rows": [],
"columns": [
"metricGroup"
],
"sort": {
"columns": [],
"rows": []
},
"columnWidths": [],
"metrics": [
{
"uri": "/gdc/md/pjf7h9zm9zqsfao3l963dx4rnrtnivy4/obj/6275379",
"alias": ""
}
]
}
},
"meta": {
"title": "Untitled report definition",
"category": "reportDefinition"
}
}
},
"projectMetadata": "/gdc/md/pjf7h9zm9zqsfao3l963dx4rnrtnivy4"
}
}
}
Any tips on how to adjust this payload to get a 1 x N report instead? I've tried adding attribute objects in the rows
array as suggested in the docs but keep getting back 400 API responses with the message Cannot create report view.
.sophie Collard
03/04/2025, 10:52 AMMichael Ullock
03/04/2025, 2:13 PM