Update Report
PUThttps://api.confident-ai.com/v2/reports/{reportId}
Updates a report and returns it. Only the fields you send are changed: metadata is merged onto the report's stored header, while sections replaces its section list wholesale.
curl -X PUT "https://api.confident-ai.com/v2/reports/{reportId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"status": "IN_PROGRESS",
"error": null,
"metadata": {
"reportTitle": "Weekly Health Check",
"description": "Production health for the last week.",
"dateRange": {
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-01-08T00:00:00.000Z"
}
},
"sections": [
{
"type": "CONTENT",
"heading": "Overview",
"startOnNewPage": false,
"content": {
"kind": "narrative",
"narrative": "Traffic held steady while the error rate fell by a third, and spend stayed inside budget.",
"sources": [
"Traces, 1-8 Jan 2025"
]
}
}
]
}'{
"success": true,
"data": {
"id": "<REPORT-ID>",
"reportTemplateId": "<REPORT-TEMPLATE-ID>",
"status": "IN_PROGRESS",
"error": null,
"metadata": {
"reportTitle": "Weekly Health Check",
"description": "Production health for the last week.",
"dateRange": {
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-01-08T00:00:00.000Z"
},
"generatedAt": "2025-01-08T00:00:00.000Z"
},
"createdAt": "2025-01-08T00:00:00.000Z",
"updatedAt": "2025-01-08T00:00:00.000Z",
"sections": [
{
"id": "<REPORT-SECTION-ID>",
"type": "CONTENT",
"heading": "Overview",
"order": 0,
"content": {
"kind": "narrative",
"narrative": "Traffic held steady while the error rate fell by a third, and spend stayed inside budget.",
"sources": [
"Traces, 1-8 Jan 2025"
]
},
"error": null,
"startOnNewPage": false
}
]
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/reports/<REPORT-TEMPLATE-ID>?reportId=<REPORT-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
reportIdstringRequiredThe id of the report.
Request body
statusenumWhere a report is in its life: IN_PROGRESS while its sections are still being written, COMPLETED once it is readable, ERRORED when writing it failed.
Show 3 enum valuesHide 3 enum values
IN_PROGRESSCOMPLETEDERRORED
errorstring | nullWhy the report failed. Pair it with a status of ERRORED, or send null to clear it.
metadataobjectThe report's header information. Confident AI stamps
generatedAtitself.Show 3 propertiesHide 3 properties
reportTitlestringThe report's title. Defaults to the name of the report template it is written under.
descriptionstringOne line on what the report covers.
dateRangeobjectThe window a report describes, shown in its header.
Show 2 propertiesHide 2 properties
startDatestringRequiredThe start of the window, as an ISO 8601 datetime.
endDatestringRequiredThe end of the window, as an ISO 8601 datetime.
sectionslist of object | object | object | object | objectThe report's sections, in render order. The list replaces the report's current sections rather than adding to them.
Show 5 variantsHide 5 variants
Content SectionobjectA section of prose.
Show 4 propertiesHide 4 properties
typeenumRequiredAlways
CONTENT.Show 1 enum valueHide 1 enum value
CONTENT
headingstring | nullThe heading rendered above the section. Omit it for an unheaded section.
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to false.
contentobjectRequiredThe content of a CONTENT section — a block of prose.
Show 3 propertiesHide 3 properties
kindenumRequiredAlways
narrative.Show 1 enum valueHide 1 enum value
narrative
narrativestringRequiredPlain text only — no markdown headings, bold, or code fences. Do not repeat the section's heading, which renders above this text. Express a list as one item per line, each starting with "- ".
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Admonition SectionobjectA callout box carrying a severity.
Show 4 propertiesHide 4 properties
typeenumRequiredAlways
ADMONITION.Show 1 enum valueHide 1 enum value
ADMONITION
headingstring | nullThe heading rendered above the section. Omit it for an unheaded section.
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to false.
contentobjectRequiredThe content of an ADMONITION section — a callout carrying a severity.
Show 3 propertiesHide 3 properties
severityenumRequiredHow an ADMONITION section's callout is styled.
Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
textstringRequiredOne to three sentences.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Stat Cards SectionobjectA row of headline numbers.
Show 4 propertiesHide 4 properties
typeenumRequiredAlways
STAT_CARDS.Show 1 enum valueHide 1 enum value
STAT_CARDS
headingstring | nullThe heading rendered above the section. Omit it for an unheaded section.
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to false.
contentobjectRequiredThe content of a STAT_CARDS section — a row of headline numbers.
Show 3 propertiesHide 3 properties
cardslist of objectsRequiredThree to five cards read best. At least one is required.
Show 3 propertiesHide 3 properties
labelstringRequiredA short Title Case phrase of 2-4 words — never a sentence or a raw column name.
valuestringRequiredA number, percentage, or short phrase, with numbers rounded to 2 decimal places.
captionstring | nullOne short supporting line of 10 words or fewer.
highlightsarray | nullAt most three standout findings. Omit rather than padding.
Show 2 propertiesHide 2 properties
labelstringRequiredA short Title Case phrase.
valuestringRequiredThe highlighted value.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Table SectionobjectA grid of headers and rows.
Show 4 propertiesHide 4 properties
typeenumRequiredAlways
TABLE.Show 1 enum valueHide 1 enum value
TABLE
headingstring | nullThe heading rendered above the section. Omit it for an unheaded section.
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to false.
contentobjectRequiredThe content of a TABLE section — headers and the rows beneath them.
Show 3 propertiesHide 3 properties
headerslist of stringsRequiredThe column headers. At least one is required.
rowslist of list of stringsRequiredThe rows. Every row must hold exactly as many cells as there are headers, in the same order.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Graph SectionobjectA chart plotting the numbers you supply.
Show 4 propertiesHide 4 properties
typeenumRequiredAlways
GRAPH.Show 1 enum valueHide 1 enum value
GRAPH
headingstring | nullThe heading rendered above the section. Omit it for an unheaded section.
startOnNewPagebooleanWhether the section starts on a new page in the exported report. Defaults to false.
contentobjectRequiredThe content of a GRAPH section — a chart with its data baked in. This is the only chart form you can write over the API, so the chart always renders exactly the numbers you supply.
Show 7 propertiesHide 7 properties
typeenumRequiredAlways
snapshot.Show 1 enum valueHide 1 enum value
snapshot
graphTypeenumRequiredThe chart style a GRAPH section renders as.
Show 4 enum valuesHide 4 enum values
LINEAREABARSTACKED_BAR
categorieslist of stringsRequiredThe x-axis labels. At least one is required.
serieslist of objectsRequiredOne entry per plotted line. Every series'
valuesmust be the same length ascategories.Show 3 propertiesHide 3 properties
namestringRequiredThe series label, which doubles as its legend entry.
valueslist of numbersRequiredOne number per category, aligned positionally with them.
colorstring | nullA colour for the series. Confident AI picks one when omitted.
xAxisLabelstring | nullA label for the x-axis.
yAxisLabelstring | nullA label for the y-axis.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
Response
Update Report succeeded.
successbooleanIndicates if the request was successful.
dataobjectA report written under a report template, with every section it renders.
Show 8 propertiesHide 8 properties
idstringThe id of the report, generated by Confident AI.
reportTemplateIdstring | nullThe id of the report template this report is written under, or null once that template has been deleted, which leaves the report unreachable on the platform.
statusenumWhere a report is in its life: IN_PROGRESS while its sections are still being written, COMPLETED once it is readable, ERRORED when writing it failed.
Show 3 enum valuesHide 3 enum values
IN_PROGRESSCOMPLETEDERRORED
errorstring | nullWhy the report failed, when it did.
metadataobject | nullThe report's stored header information. A field the report was written without comes back as null.
Show 4 propertiesHide 4 properties
reportTitlestring | nullThe report's title, as rendered in its header.
descriptionstring | nullOne line on what the report covers.
dateRangeobject | nullThe window a report describes, shown in its header.
Show 2 propertiesHide 2 properties
startDatestringThe start of the window, as an ISO 8601 datetime.
endDatestringThe end of the window, as an ISO 8601 datetime.
generatedAtstring | nullWhen the report was written. Always stamped by Confident AI.
createdAtstringWhen the report was created.
updatedAtstringWhen the report was last updated.
sectionslist of objectsThe report's sections, ordered as they render.
Show 7 propertiesHide 7 properties
idstringThe id of the section, generated by Confident AI.
typeenumWhat a section renders as, which decides the shape of its content: CONTENT is prose, ADMONITION a callout, STAT_CARDS a row of headline numbers, TABLE a grid, and GRAPH a chart.
Show 5 enum valuesHide 5 enum values
CONTENTSTAT_CARDSTABLEGRAPHADMONITION
headingstring | nullThe heading rendered above the section, or null when it has none.
orderintegerThe section's position in the report, starting at 0.
contentobject | object | object | object | object | object | nullShow 7 variantsHide 7 variants
Narrative ContentobjectThe content of a CONTENT section — a block of prose.
Show 3 propertiesHide 3 properties
kindenumAlways
narrative.Show 1 enum valueHide 1 enum value
narrative
narrativestringPlain text only — no markdown headings, bold, or code fences. Do not repeat the section's heading, which renders above this text. Express a list as one item per line, each starting with "- ".
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Admonition ContentobjectThe content of an ADMONITION section — a callout carrying a severity.
Show 3 propertiesHide 3 properties
severityenumHow an ADMONITION section's callout is styled.
Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
textstringOne to three sentences.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Stat Cards ContentobjectThe content of a STAT_CARDS section — a row of headline numbers.
Show 3 propertiesHide 3 properties
cardslist of objectsThree to five cards read best. At least one is required.
Show 3 propertiesHide 3 properties
labelstringA short Title Case phrase of 2-4 words — never a sentence or a raw column name.
valuestringA number, percentage, or short phrase, with numbers rounded to 2 decimal places.
captionstring | nullOne short supporting line of 10 words or fewer.
highlightsarray | nullAt most three standout findings. Omit rather than padding.
Show 2 propertiesHide 2 properties
labelstringA short Title Case phrase.
valuestringThe highlighted value.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Table ContentobjectThe content of a TABLE section — headers and the rows beneath them.
Show 3 propertiesHide 3 properties
headerslist of stringsThe column headers. At least one is required.
rowslist of list of stringsThe rows. Every row must hold exactly as many cells as there are headers, in the same order.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Graph ContentobjectThe content of a GRAPH section — a chart with its data baked in. This is the only chart form you can write over the API, so the chart always renders exactly the numbers you supply.
Show 7 propertiesHide 7 properties
typeenumAlways
snapshot.Show 1 enum valueHide 1 enum value
snapshot
graphTypeenumThe chart style a GRAPH section renders as.
Show 4 enum valuesHide 4 enum values
LINEAREABARSTACKED_BAR
categorieslist of stringsThe x-axis labels. At least one is required.
serieslist of objectsOne entry per plotted line. Every series'
valuesmust be the same length ascategories.Show 3 propertiesHide 3 properties
namestringThe series label, which doubles as its legend entry.
valueslist of numbersOne number per category, aligned positionally with them.
colorstring | nullA colour for the series. Confident AI picks one when omitted.
xAxisLabelstring | nullA label for the x-axis.
yAxisLabelstring | nullA label for the y-axis.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
Graph Config ContentobjectThe content of a GRAPH section that Confident AI generated as a live query rather than a snapshot. It carries no data of its own: the query is run against your project when the report is rendered. Read-only — a chart you write yourself is always a snapshot.
Show 11 propertiesHide 11 properties
typeenumAlways
config.Show 1 enum valueHide 1 enum value
config
sourcestring | nullWhich data source resolves the query.
titlestringThe chart title.
dataModelstringThe data model queried, such as TRACE, SPAN or METRIC_DATA.
metricstringThe aggregate plotted, such as
error_rateortotal_cost.dimensionstring | nullThe property the metric is split by, giving one line per value. Null for a plain trend over time.
granularitystring | nullThe time bucket, such as
hour,day,weekormonth.spanTypestring | nullThe span type queried, for SPAN charts only.
startDatestring | nullThe start of the queried window as an ISO 8601 datetime, pinning the chart to a point in time.
endDatestring | nullThe end of the queried window as an ISO 8601 datetime.
sourcesarray | nullReader-facing labels for the data this section draws on, rendered beneath it. Omit them unless you want the section to cite where its numbers came from.
- OR
null
errorstring | nullWhy this section failed to generate, when it did.
startOnNewPageboolean | nullWhether the section starts on a new page in the exported report.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.