Get Report Template
GEThttps://api.confident-ai.com/v1/report-templates/{reportTemplateId}
Retrieves a single report template by its reportTemplateId, with all of its section definitions.
curl -X GET "https://api.confident-ai.com/v1/report-templates/{reportTemplateId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"reportTemplate": {
"id": "REPORT-TEMPLATE-ID",
"name": "Weekly Health Check",
"description": "Give me an overall health check for the last week.",
"type": "EXECUTIVE_REPORT",
"enabled": true,
"schedule": {
"recurrence": "INTERVAL",
"repeatEvery": 1,
"repeatUnit": "WEEK",
"startAt": null,
"maxRuns": 12,
"endAt": null,
"runCount": 3,
"lastRunAt": "2024-01-22T00:00:00.000Z"
},
"createdAt": "2024-01-01T00:00:00.000Z",
"templateSections": [
{
"id": "REPORT-TEMPLATE-SECTION-ID",
"type": "STAT_CARDS",
"heading": null,
"order": 0,
"useAI": true,
"prompt": "Headline request volume, error rate and total cost.",
"content": null,
"startOnNewPage": false
}
]
}
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
reportTemplateIdstringRequiredThe id of the report template.
Response
The requested report template.
successbooleanIndicates if the request was successful.
dataobjectThe report template.
Show 1 propertyHide 1 property
reportTemplateobjectA recurring report definition, generated on the schedule you set (every 1 day by default).
Show 8 propertiesHide 8 properties
idstringThe id of the report template.
namestringThe template's name, also used as the report's title.
descriptionstringThe question the generated report answers. This drives which data is retrieved.
typeenumThe kind of report this template generates.
Show 1 enum valueHide 1 enum value
EXECUTIVE_REPORT
enabledbooleanWhether scheduled generation is running.
scheduleobjectThe template's generation cadence, including how many times it has run.
Show 8 propertiesHide 8 properties
recurrenceenumINTERVALrepeats on therepeatEvery/repeatUnitcadence.ONCEgenerates a single report and then stops.Show 2 enum valuesHide 2 enum values
INTERVALONCE
repeatEveryintegerHow many
repeatUnits pass between runs — the2in "every 2 weeks". Always set on anINTERVALschedule,nullon aONCEone.repeatUnitenumThe unit
repeatEverycounts in. Always set on anINTERVALschedule,nullon aONCEone.Show 5 enum valuesHide 5 enum values
MINUTEHOURDAYWEEKMONTH
startAtstringWhen the first run was scheduled for, or
nullif it started immediately.maxRunsintegerThe number of generations after which the schedule stops, or
nullfor no cap.endAtstringThe time after which the schedule stops, or
nullfor no end date.runCountintegerHow many reports this template has generated, counted against
maxRuns.lastRunAtstringWhen the template last generated a report, or
nullif it never has.
createdAtstringWhen the template was created.
templateSectionslist of objectsThe template's sections, in render order. Empty when the generator chooses the structure.
Show 8 propertiesHide 8 properties
idstringThe id of the template section.
typeenumWhat this section renders as.
Show 5 enum valuesHide 5 enum values
CONTENTSTAT_CARDSTABLEGRAPHADMONITION
headingstringThe heading rendered above the section.
orderintegerThe section's position in the report, starting at 0.
useAIbooleanWhether the generator authors this section.
promptstringThe directive handed to the generator for this section.
contentobjectThe static content of a hardcoded (non-AI) template section. Null for AI-authored sections.
Show 2 propertiesHide 2 properties
textstringThe section's literal text, written verbatim into every generated report.
severityenumADMONITION sections only. Defaults to INFO.
Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
startOnNewPagebooleanWhether the section starts on a new page in the exported report.
deprecatedbooleanIndicates if this endpoint is deprecated.