Reports can be created, accessed and exported via the API to fully automate the reporting process:
Create a report
Check the report status for successful generation
Export the report in JSON format
Create report
mutation CreateReport(
$name: NonEmptyString!
$type: ReportType!
$displayId: [DisplayUID]
$playlistId: [PlaylistUID]
$contentName: [NonEmptyString]
$dateRange: DateRange
) {
report {
create(
name: $name
type: $type
displayId: $displayId
playlistId: $playlistId
contentName: $contentName
dateRange: $dateRange
) {
id
name
type
state
dateRange
createdAt
}
}
}Get report status
query GetReports {
reports {
id
name
type
state
dateRange
createdAt
}
}Export as JSON
query GetReport($id: ReportUID!) {
report(id: $id) {
id
name
type
state
export {
json
}
}
}This will return a JSON endpoint URL that contains the reports raw data.