Report Templates
Overview
The Confident AI SDK exposes every Report Template method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Methods
List Report Templates
Lists the report templates in your Confident AI project one page at a time, oldest first. Retrieve a single template for its cadence and its sections.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.report_templates.list(page=1, page_size=25)For async mode, call a_list and await it as shown below:
result = await client.report_templates.a_list(...)Parameters
| Parameter | Type | Description |
|---|---|---|
page | Optional[int] | The page to return. Defaults to 1. |
page_size | Optional[int] | The number of results per page, at most 100. Defaults to 25. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.reportTemplates.list({ page: 1, pageSize: 25 });Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | The page to return. Defaults to 1. |
pageSize | number | The number of results per page, at most 100. Defaults to 25. |
Returns
This method returns an object of type ReportTemplateList.
Create Report Template
Creates a report template in your Confident AI project and returns its id. The description is the question the report answers; send templateSections to fix its structure, and a cadence to control when it generates. Without a cadence it repeats every 1 day.
from confident_ai import ConfidentAI
from confident_ai.report_templates import ReportTemplateSectionConfig
from confident_ai.report_templates import ReportTemplateSectionContent
from confident_ai.report_templates import ReportTemplateSectionSeverity
from confident_ai.report_templates import ReportTemplateSectionType
from confident_ai.common import ScheduleIntervalUnit
from confident_ai.common import ScheduleRecurrenceType
client = ConfidentAI()
result = client.report_templates.create(
name="Weekly Health Check",
description="Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity.",
template_sections=[
ReportTemplateSectionConfig(
id="<REPORT-TEMPLATE-SECTION-ID>",
type=ReportTemplateSectionType.CONTENT,
heading="What's Failing",
use_ai=True,
prompt="Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
content=ReportTemplateSectionContent(
text="Generated daily for the platform team.",
severity=ReportTemplateSectionSeverity.INFO
),
start_on_new_page=False
)
],
enabled=True,
recurrence=ScheduleRecurrenceType.ONCE,
repeat_every=1,
repeat_unit=ScheduleIntervalUnit.MINUTE,
start_at="2025-02-01T09:00:00+00:00",
max_runs=12,
end_at="2025-12-31T23:59:59+00:00",
)For async mode, call a_create and await it as shown below:
result = await client.report_templates.a_create(...)Parameters
| Parameter | Type | Description |
|---|---|---|
name | str | Required. The template's name, also used as the report's title. |
description | Optional[str] | The question the report should answer, written as a question. Supply this even when providing sections — it drives the single data retrieval that serves them all. |
template_sections | Optional[List[ReportTemplateSectionConfig]] | The report's exact sections, in render order. Omit it to let the generator choose the structure from description. See ReportTemplateSectionConfig. |
enabled | Optional[bool] | Whether to start generating on the schedule. Defaults to true; send false to create the template without scheduling it. |
recurrence | Optional[ScheduleRecurrenceType] | See ScheduleRecurrenceType. |
repeat_every | Optional[int] | How many repeatUnits apart the runs are, for an INTERVAL schedule. Send null to clear it. |
repeat_unit | Optional[ScheduleIntervalUnit] | The unit repeatEvery counts, for an INTERVAL schedule. Send null to clear it. See ScheduleIntervalUnit. |
start_at | Optional[str] | When the schedule first runs, as an ISO 8601 datetime. Send null to start it immediately. |
max_runs | Optional[int] | How many times the schedule runs before it stops. Send null to let it run indefinitely. |
end_at | Optional[str] | When the schedule stops running, as an ISO 8601 datetime. Send null to leave it open-ended. |
import { ConfidentAI } from "confident-ai";
import {
ScheduleIntervalUnit,
ScheduleRecurrenceType,
} from "confident-ai/common";
import {
ReportTemplateSectionSeverity,
ReportTemplateSectionType,
} from "confident-ai/report-templates";
const client = new ConfidentAI();
const result = await client.reportTemplates.create(
"Weekly Health Check",
{
description: "Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity.",
templateSections: [
{
id: "<REPORT-TEMPLATE-SECTION-ID>",
type: ReportTemplateSectionType.CONTENT,
heading: "What's Failing",
useAI: true,
prompt: "Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
content: {
text: "Generated daily for the platform team.",
severity: ReportTemplateSectionSeverity.INFO
},
startOnNewPage: false
}
],
enabled: true,
recurrence: ScheduleRecurrenceType.ONCE,
repeatEvery: 1,
repeatUnit: ScheduleIntervalUnit.MINUTE,
startAt: "2025-02-01T09:00:00+00:00",
maxRuns: 12,
endAt: "2025-12-31T23:59:59+00:00"
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Required. The template's name, also used as the report's title. |
description | string | null | The question the report should answer, written as a question. Supply this even when providing sections — it drives the single data retrieval that serves them all. |
templateSections | ReportTemplateSectionConfig[] | The report's exact sections, in render order. Omit it to let the generator choose the structure from description. See ReportTemplateSectionConfig. |
enabled | boolean | Whether to start generating on the schedule. Defaults to true; send false to create the template without scheduling it. |
recurrence | ScheduleRecurrenceType | See ScheduleRecurrenceType. |
repeatEvery | number | null | How many repeatUnits apart the runs are, for an INTERVAL schedule. Send null to clear it. |
repeatUnit | ScheduleIntervalUnit | null | The unit repeatEvery counts, for an INTERVAL schedule. Send null to clear it. See ScheduleIntervalUnit. |
startAt | string | null | When the schedule first runs, as an ISO 8601 datetime. Send null to start it immediately. |
maxRuns | number | null | How many times the schedule runs before it stops. Send null to let it run indefinitely. |
endAt | string | null | When the schedule stops running, as an ISO 8601 datetime. Send null to leave it open-ended. |
Returns
This method returns an object of type ReportTemplateRef.
Get Report Template
Retrieves a report template by id, with its generation cadence and all of its section definitions.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.report_templates.get(
report_template_id="<REPORT-TEMPLATE-ID>",
)For async mode, call a_get and await it as shown below:
result = await client.report_templates.a_get(...)Parameters
| Parameter | Type | Description |
|---|---|---|
report_template_id | str | Required. The id of the report template. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.reportTemplates.get("<REPORT-TEMPLATE-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
reportTemplateId | string | Required. The id of the report template. |
Returns
This method returns an object of type ReportTemplate.
Update Report Template
Updates a report template and returns it. Only the fields you send are changed, and templateSections replaces the whole list. Set enabled to false to pause generation, or send cadence fields to retime it.
from confident_ai import ConfidentAI
from confident_ai.report_templates import ReportTemplateSectionConfig
from confident_ai.report_templates import ReportTemplateSectionContent
from confident_ai.report_templates import ReportTemplateSectionSeverity
from confident_ai.report_templates import ReportTemplateSectionType
from confident_ai.common import ScheduleIntervalUnit
from confident_ai.common import ScheduleRecurrenceType
client = ConfidentAI()
result = client.report_templates.update(
report_template_id="<REPORT-TEMPLATE-ID>",
name="Weekly Production Health",
description="How did production do this week compared with the week before?",
template_sections=[
ReportTemplateSectionConfig(
id="<REPORT-TEMPLATE-SECTION-ID>",
type=ReportTemplateSectionType.CONTENT,
heading="What's Failing",
use_ai=True,
prompt="Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
content=ReportTemplateSectionContent(
text="Generated daily for the platform team.",
severity=ReportTemplateSectionSeverity.INFO
),
start_on_new_page=False
)
],
enabled=False,
recurrence=ScheduleRecurrenceType.ONCE,
repeat_every=1,
repeat_unit=ScheduleIntervalUnit.MINUTE,
start_at="2025-02-01T09:00:00+00:00",
max_runs=12,
end_at="2025-12-31T23:59:59+00:00",
)For async mode, call a_update and await it as shown below:
result = await client.report_templates.a_update(...)Parameters
| Parameter | Type | Description |
|---|---|---|
report_template_id | str | Required. The id of the report template. |
name | Optional[str] | The template's new name, also used as the report's title. |
description | Optional[str] | The question the report should answer, which drives what data the generator retrieves. Send null to clear it. |
template_sections | Optional[List[ReportTemplateSectionConfig]] | The report's exact sections, in render order. The list replaces the template's current sections, so a section you leave out is removed; omit the field to leave them alone. See ReportTemplateSectionConfig. |
enabled | Optional[bool] | Whether scheduled generation runs. False pauses it while keeping past reports readable. A schedule that has hit its maxRuns or endAt can only be re-enabled by a request that also raises or clears them. |
recurrence | Optional[ScheduleRecurrenceType] | See ScheduleRecurrenceType. |
repeat_every | Optional[int] | How many repeatUnits apart the runs are, for an INTERVAL schedule. Send null to clear it. |
repeat_unit | Optional[ScheduleIntervalUnit] | The unit repeatEvery counts, for an INTERVAL schedule. Send null to clear it. See ScheduleIntervalUnit. |
start_at | Optional[str] | When the schedule first runs, as an ISO 8601 datetime. Send null to start it immediately. |
max_runs | Optional[int] | How many times the schedule runs before it stops. Send null to let it run indefinitely. |
end_at | Optional[str] | When the schedule stops running, as an ISO 8601 datetime. Send null to leave it open-ended. |
import { ConfidentAI } from "confident-ai";
import {
ScheduleIntervalUnit,
ScheduleRecurrenceType,
} from "confident-ai/common";
import {
ReportTemplateSectionSeverity,
ReportTemplateSectionType,
} from "confident-ai/report-templates";
const client = new ConfidentAI();
const result = await client.reportTemplates.update(
"<REPORT-TEMPLATE-ID>",
{
name: "Weekly Production Health",
description: "How did production do this week compared with the week before?",
templateSections: [
{
id: "<REPORT-TEMPLATE-SECTION-ID>",
type: ReportTemplateSectionType.CONTENT,
heading: "What's Failing",
useAI: true,
prompt: "Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
content: {
text: "Generated daily for the platform team.",
severity: ReportTemplateSectionSeverity.INFO
},
startOnNewPage: false
}
],
enabled: false,
recurrence: ScheduleRecurrenceType.ONCE,
repeatEvery: 1,
repeatUnit: ScheduleIntervalUnit.MINUTE,
startAt: "2025-02-01T09:00:00+00:00",
maxRuns: 12,
endAt: "2025-12-31T23:59:59+00:00"
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
reportTemplateId | string | Required. The id of the report template. |
name | string | The template's new name, also used as the report's title. |
description | string | null | The question the report should answer, which drives what data the generator retrieves. Send null to clear it. |
templateSections | ReportTemplateSectionConfig[] | The report's exact sections, in render order. The list replaces the template's current sections, so a section you leave out is removed; omit the field to leave them alone. See ReportTemplateSectionConfig. |
enabled | boolean | Whether scheduled generation runs. False pauses it while keeping past reports readable. A schedule that has hit its maxRuns or endAt can only be re-enabled by a request that also raises or clears them. |
recurrence | ScheduleRecurrenceType | See ScheduleRecurrenceType. |
repeatEvery | number | null | How many repeatUnits apart the runs are, for an INTERVAL schedule. Send null to clear it. |
repeatUnit | ScheduleIntervalUnit | null | The unit repeatEvery counts, for an INTERVAL schedule. Send null to clear it. See ScheduleIntervalUnit. |
startAt | string | null | When the schedule first runs, as an ISO 8601 datetime. Send null to start it immediately. |
maxRuns | number | null | How many times the schedule runs before it stops. Send null to let it run indefinitely. |
endAt | string | null | When the schedule stops running, as an ISO 8601 datetime. Send null to leave it open-ended. |
Returns
This method returns an object of type ReportTemplate.
Delete Report Template
Permanently deletes a report template and the schedule that generates it. This cannot be undone, and every report it generated becomes unreachable — set enabled to false instead to pause generation while keeping past reports readable.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.report_templates.delete(
report_template_id="<REPORT-TEMPLATE-ID>",
)For async mode, call a_delete and await it as shown below:
result = await client.report_templates.a_delete(...)Parameters
| Parameter | Type | Description |
|---|---|---|
report_template_id | str | Required. The id of the report template. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.reportTemplates.delete("<REPORT-TEMPLATE-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
reportTemplateId | string | Required. The id of the report template. |
Returns
This method returns an object of type ReportTemplateRef.
Types
ReportTemplate
A recurring report definition, generated on the schedule you set — every 1 day unless you say otherwise.
class ReportTemplate:
id: str
name: str
description: Optional[str]
type: Optional[ReportTemplateType]
enabled: bool
created_at: str = Field(alias="createdAt")
schedule: Optional[ReportTemplateSchedule]
template_sections: List[ReportTemplateSection] = Field(alias="templateSections")idstrRequired
The id of the report template, generated by Confident AI.
Example: "<REPORT-TEMPLATE-ID>"
namestrRequired
The template's name, also used as the report's title.
Example: "Weekly Health Check"
descriptionOptional[str]Required
The question the generated report answers, which drives what data the generator retrieves.
Example: "Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity."
typeOptional[ReportTemplateType]Required
The kind of report this template generates.
See ReportTemplateType.
enabledboolRequired
Whether scheduled generation is running. A disabled template generates nothing.
Example: true
created_atstrRequired
When the report template was created.
Example: "2025-01-01T00:00:00+00:00"
scheduleOptional[ReportTemplateSchedule]Required
The template's generation cadence, including how many times it has run, or null when it has no schedule.
template_sectionsList[ReportTemplateSection]Required
The template's sections, in render order. Empty when the generator chooses the structure from description.
interface ReportTemplate {
id: string;
name: string;
description: string | null;
type: ReportTemplateType | null;
enabled: boolean;
createdAt: string;
schedule: ReportTemplateSchedule | null;
templateSections: ReportTemplateSection[];
}idstringRequired
The id of the report template, generated by Confident AI.
Example: "<REPORT-TEMPLATE-ID>"
namestringRequired
The template's name, also used as the report's title.
Example: "Weekly Health Check"
descriptionstring | nullRequired
The question the generated report answers, which drives what data the generator retrieves.
Example: "Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity."
typeReportTemplateType | nullRequired
The kind of report this template generates.
See ReportTemplateType.
enabledbooleanRequired
Whether scheduled generation is running. A disabled template generates nothing.
Example: true
createdAtstringRequired
When the report template was created.
Example: "2025-01-01T00:00:00+00:00"
scheduleReportTemplateSchedule | nullRequired
The template's generation cadence, including how many times it has run, or null when it has no schedule.
templateSectionsReportTemplateSection[]Required
The template's sections, in render order. Empty when the generator chooses the structure from description.
ReportTemplateList
One page of report templates, with the total across all pages.
class ReportTemplateList:
report_templates: List[ReportTemplateSummary] = Field(alias="reportTemplates")
total_report_templates: int = Field(alias="totalReportTemplates")
page: int
page_size: int = Field(alias="pageSize")report_templatesList[ReportTemplateSummary]Required
The report templates for the current page, oldest first.
total_report_templatesintRequired
The total number of report templates in this project.
Example: 3
pageintRequired
The page this response covers.
Example: 1
page_sizeintRequired
The number of report templates per page.
Example: 25
interface ReportTemplateList {
reportTemplates: ReportTemplateSummary[];
totalReportTemplates: number;
page: number;
pageSize: number;
}reportTemplatesReportTemplateSummary[]Required
The report templates for the current page, oldest first.
totalReportTemplatesnumberRequired
The total number of report templates in this project.
Example: 3
pagenumberRequired
The page this response covers.
Example: 1
pageSizenumberRequired
The number of report templates per page.
Example: 25
ReportTemplateRef
A reference to a report template by its id.
class ReportTemplateRef:
id: stridstrRequired
The id of the report template, generated by Confident AI.
Example: "<REPORT-TEMPLATE-ID>"
interface ReportTemplateRef {
id: string;
}idstringRequired
The id of the report template, generated by Confident AI.
Example: "<REPORT-TEMPLATE-ID>"
ReportTemplateSchedule
When a report template generates, and how far it has got: the cadence you set, plus the read-only progress against it.
class ReportTemplateSchedule:
recurrence: ScheduleRecurrenceType
repeat_every: Optional[int] = Field(alias="repeatEvery")
repeat_unit: Optional[ScheduleIntervalUnit] = Field(alias="repeatUnit")
start_at: Optional[str] = Field(alias="startAt")
max_runs: Optional[int] = Field(alias="maxRuns")
end_at: Optional[str] = Field(alias="endAt")
run_count: int = Field(alias="runCount")
last_run_at: Optional[str] = Field(alias="lastRunAt")recurrenceScheduleRecurrenceTypeRequired
repeat_everyOptional[int]Required
How many repeatUnits pass between runs — the 2 in "every 2 weeks". Always set on an INTERVAL schedule, null on a ONCE one.
Example: 1
repeat_unitOptional[ScheduleIntervalUnit]Required
The unit repeatEvery counts in. Always set on an INTERVAL schedule, null on a ONCE one.
See ScheduleIntervalUnit.
start_atOptional[str]Required
When the first run was scheduled for, or null when it started immediately.
Example: "2025-01-08T09:00:00+00:00"
max_runsOptional[int]Required
The number of generations after which the schedule stops, or null for no cap.
Example: 12
end_atOptional[str]Required
The time after which the schedule stops, or null for no end date.
run_countintRequired
How many reports this template has generated, counted against maxRuns.
Example: 3
last_run_atOptional[str]Required
When the template last generated a report, or null when it never has.
Example: "2025-01-22T09:00:00+00:00"
interface ReportTemplateSchedule {
recurrence: ScheduleRecurrenceType;
repeatEvery: number | null;
repeatUnit: ScheduleIntervalUnit | null;
startAt: string | null;
maxRuns: number | null;
endAt: string | null;
runCount: number;
lastRunAt: string | null;
}recurrenceScheduleRecurrenceTypeRequired
repeatEverynumber | nullRequired
How many repeatUnits pass between runs — the 2 in "every 2 weeks". Always set on an INTERVAL schedule, null on a ONCE one.
Example: 1
repeatUnitScheduleIntervalUnit | nullRequired
The unit repeatEvery counts in. Always set on an INTERVAL schedule, null on a ONCE one.
See ScheduleIntervalUnit.
startAtstring | nullRequired
When the first run was scheduled for, or null when it started immediately.
Example: "2025-01-08T09:00:00+00:00"
maxRunsnumber | nullRequired
The number of generations after which the schedule stops, or null for no cap.
Example: 12
endAtstring | nullRequired
The time after which the schedule stops, or null for no end date.
runCountnumberRequired
How many reports this template has generated, counted against maxRuns.
Example: 3
lastRunAtstring | nullRequired
When the template last generated a report, or null when it never has.
Example: "2025-01-22T09:00:00+00:00"
ReportTemplateSection
A stored section of a report template.
class ReportTemplateSection:
id: str
type: ReportTemplateSectionType
heading: Optional[str]
order: int
use_ai: bool = Field(alias="useAI")
prompt: Optional[str]
content: Optional[ReportTemplateSectionContent]
start_on_new_page: bool = Field(alias="startOnNewPage")idstrRequired
The id of the template section.
Example: "<REPORT-TEMPLATE-SECTION-ID>"
typeReportTemplateSectionTypeRequired
headingOptional[str]Required
The heading rendered above the section, or null when it has none.
Example: "What's Failing"
orderintRequired
The section's position in the report, starting at 0.
Example: 0
use_aiboolRequired
Whether the generator authors this section from prompt.
Example: true
promptOptional[str]Required
The directive handed to the generator for this section, or null when the section is hardcoded.
Example: "Summarize the dominant failure modes in 2-4 sentences, citing error counts."
contentOptional[ReportTemplateSectionContent]Required
The static content rendered for a hardcoded section, or null when the section is AI-authored.
start_on_new_pageboolRequired
Whether the section starts on a new page in the exported report.
Example: false
interface ReportTemplateSection {
id: string;
type: ReportTemplateSectionType;
heading: string | null;
order: number;
useAI: boolean;
prompt: string | null;
content: ReportTemplateSectionContent | null;
startOnNewPage: boolean;
}idstringRequired
The id of the template section.
Example: "<REPORT-TEMPLATE-SECTION-ID>"
typeReportTemplateSectionTypeRequired
headingstring | nullRequired
The heading rendered above the section, or null when it has none.
Example: "What's Failing"
ordernumberRequired
The section's position in the report, starting at 0.
Example: 0
useAIbooleanRequired
Whether the generator authors this section from prompt.
Example: true
promptstring | nullRequired
The directive handed to the generator for this section, or null when the section is hardcoded.
Example: "Summarize the dominant failure modes in 2-4 sentences, citing error counts."
contentReportTemplateSectionContent | nullRequired
The static content rendered for a hardcoded section, or null when the section is AI-authored.
startOnNewPagebooleanRequired
Whether the section starts on a new page in the exported report.
Example: false
ReportTemplateSectionConfig
One section of a report template. Either AI-authored (useAI true, with a prompt) or hardcoded (useAI false, with static content). STAT_CARDS, TABLE and GRAPH must be AI-authored; CONTENT and ADMONITION can be either. A section's position in templateSections sets the order it renders in.
class ReportTemplateSectionConfig:
id: Optional[str] = None
type: ReportTemplateSectionType
heading: Optional[str] = None
use_ai: Optional[bool] = Field(default=None, alias="useAI")
prompt: Optional[str] = None
content: Optional[ReportTemplateSectionContent] = None
start_on_new_page: Optional[bool] = Field(default=None, alias="startOnNewPage")idOptional[str]
The id of the section. Send the id a section was read back with to keep its creation time across a rewrite; omit it and Confident AI assigns one.
Example: "<REPORT-TEMPLATE-SECTION-ID>"
typeReportTemplateSectionTypeRequired
headingOptional[str]
The heading rendered above the section. Omit it for an unheaded section.
Example: "What's Failing"
use_aiOptional[bool]
Whether the generator authors this section from prompt. Defaults to false, which renders content verbatim instead.
Example: true
promptOptional[str]
Required when useAI is true: a single directive for what this section must cover.
Example: "Summarize the dominant failure modes in 2-4 sentences, citing error counts."
contentOptional[ReportTemplateSectionContent]
The static content of a hardcoded section. Required for a CONTENT section with useAI false, and ignored when useAI is true.
start_on_new_pageOptional[bool]
Whether the section starts on a new page in the exported report. Defaults to false.
Example: false
interface ReportTemplateSectionConfig {
id?: string;
type: ReportTemplateSectionType;
heading?: string | null;
useAI?: boolean;
prompt?: string | null;
content?: ReportTemplateSectionContent | null;
startOnNewPage?: boolean;
}idstring
The id of the section. Send the id a section was read back with to keep its creation time across a rewrite; omit it and Confident AI assigns one.
Example: "<REPORT-TEMPLATE-SECTION-ID>"
typeReportTemplateSectionTypeRequired
headingstring | null
The heading rendered above the section. Omit it for an unheaded section.
Example: "What's Failing"
useAIboolean
Whether the generator authors this section from prompt. Defaults to false, which renders content verbatim instead.
Example: true
promptstring | null
Required when useAI is true: a single directive for what this section must cover.
Example: "Summarize the dominant failure modes in 2-4 sentences, citing error counts."
contentReportTemplateSectionContent | null
The static content of a hardcoded section. Required for a CONTENT section with useAI false, and ignored when useAI is true.
startOnNewPageboolean
Whether the section starts on a new page in the exported report. Defaults to false.
Example: false
ReportTemplateSectionContent
The static content of a hardcoded (non-AI) template section. Null for AI-authored sections, which are written by the generator from their prompt.
class ReportTemplateSectionContent:
text: Optional[str] = None
severity: Optional[ReportTemplateSectionSeverity] = NonetextOptional[str]
The section's literal text, written verbatim into every generated report.
Example: "Generated daily for the platform team."
severityOptional[ReportTemplateSectionSeverity]
ADMONITION sections only: the callout style. Defaults to INFO when omitted.
interface ReportTemplateSectionContent {
text?: string | null;
severity?: ReportTemplateSectionSeverity | null;
}textstring | null
The section's literal text, written verbatim into every generated report.
Example: "Generated daily for the platform team."
severityReportTemplateSectionSeverity | null
ADMONITION sections only: the callout style. Defaults to INFO when omitted.
ReportTemplateSectionSeverity
The callout style of an ADMONITION section, from an informational note to a danger warning.
class ReportTemplateSectionSeverity(Enum):
INFO = "INFO"
SUCCESS = "SUCCESS"
WARNING = "WARNING"
DANGER = "DANGER"enum ReportTemplateSectionSeverity {
INFO = "INFO",
SUCCESS = "SUCCESS",
WARNING = "WARNING",
DANGER = "DANGER",
}INFO · SUCCESS · WARNING · DANGER
ReportTemplateSectionType
What a section renders as. STAT_CARDS, TABLE and GRAPH must be AI-authored; CONTENT and ADMONITION can be either AI-authored or hardcoded.
class ReportTemplateSectionType(Enum):
CONTENT = "CONTENT"
STAT_CARDS = "STAT_CARDS"
TABLE = "TABLE"
GRAPH = "GRAPH"
ADMONITION = "ADMONITION"enum ReportTemplateSectionType {
CONTENT = "CONTENT",
STAT_CARDS = "STAT_CARDS",
TABLE = "TABLE",
GRAPH = "GRAPH",
ADMONITION = "ADMONITION",
}CONTENT · STAT_CARDS · TABLE · GRAPH · ADMONITION
ReportTemplateSummary
A report template as it appears in a list. Retrieve one by id for its cadence and its sections.
class ReportTemplateSummary:
id: str
name: str
description: Optional[str]
type: Optional[ReportTemplateType]
enabled: bool
created_at: str = Field(alias="createdAt")idstrRequired
The id of the report template, generated by Confident AI.
Example: "<REPORT-TEMPLATE-ID>"
namestrRequired
The template's name, also used as the report's title.
Example: "Weekly Health Check"
descriptionOptional[str]Required
The question the generated report answers, which drives what data the generator retrieves.
Example: "Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity."
typeOptional[ReportTemplateType]Required
The kind of report this template generates.
See ReportTemplateType.
enabledboolRequired
Whether scheduled generation is running. A disabled template generates nothing.
Example: true
created_atstrRequired
When the report template was created.
Example: "2025-01-01T00:00:00+00:00"
interface ReportTemplateSummary {
id: string;
name: string;
description: string | null;
type: ReportTemplateType | null;
enabled: boolean;
createdAt: string;
}idstringRequired
The id of the report template, generated by Confident AI.
Example: "<REPORT-TEMPLATE-ID>"
namestringRequired
The template's name, also used as the report's title.
Example: "Weekly Health Check"
descriptionstring | nullRequired
The question the generated report answers, which drives what data the generator retrieves.
Example: "Give me an overall health check for the last week: request volume, error rate, latency, total cost and user activity."
typeReportTemplateType | nullRequired
The kind of report this template generates.
See ReportTemplateType.
enabledbooleanRequired
Whether scheduled generation is running. A disabled template generates nothing.
Example: true
createdAtstringRequired
When the report template was created.
Example: "2025-01-01T00:00:00+00:00"
ReportTemplateType
The kind of report a template generates. Templates you create over the API generate executive reports; RISK_ASSESSMENT_REPORT belongs to the reports Confident AI generates for a risk assessment.
class ReportTemplateType(Enum):
RISK_ASSESSMENT_REPORT = "RISK_ASSESSMENT_REPORT"
EXECUTIVE_REPORT = "EXECUTIVE_REPORT"enum ReportTemplateType {
RISK_ASSESSMENT_REPORT = "RISK_ASSESSMENT_REPORT",
EXECUTIVE_REPORT = "EXECUTIVE_REPORT",
}RISK_ASSESSMENT_REPORT · EXECUTIVE_REPORT
ScheduleIntervalUnit
The unit repeatEvery counts for an INTERVAL schedule.
class ScheduleIntervalUnit(Enum):
MINUTE = "MINUTE"
HOUR = "HOUR"
DAY = "DAY"
WEEK = "WEEK"
MONTH = "MONTH"enum ScheduleIntervalUnit {
MINUTE = "MINUTE",
HOUR = "HOUR",
DAY = "DAY",
WEEK = "WEEK",
MONTH = "MONTH",
}MINUTE · HOUR · DAY · WEEK · MONTH
ScheduleRecurrenceType
How often a schedule fires: ONCE runs a single time at startAt, INTERVAL repeats every repeatEvery repeatUnits.
class ScheduleRecurrenceType(Enum):
ONCE = "ONCE"
INTERVAL = "INTERVAL"enum ScheduleRecurrenceType {
ONCE = "ONCE",
INTERVAL = "INTERVAL",
}ONCE · INTERVAL
Last updated on