Update Report
PUThttps://api.confident-ai.com/v1/reports/{reportId}
Updates a report. Only the fields you send are changed, and sections replaces the whole list.
curl -X PUT "https://api.confident-ai.com/v1/reports/{reportId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"status": "COMPLETED"
}'{
"success": true,
"data": {
"report": {
"id": "REPORT-ID",
"reportTemplateId": "REPORT-TEMPLATE-ID",
"status": "COMPLETED",
"error": null,
"metadata": {
"reportTitle": "Weekly Health Check",
"generatedAt": "2024-01-08T00:00:00.000Z"
},
"createdAt": "2024-01-08T00:00:00.000Z",
"updatedAt": "2024-01-08T00:00:00.000Z",
"sections": []
}
},
"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
sectionslist of objectsFull replacement of the section list — omitted sections are removed.
Show 4 propertiesHide 4 properties
typeenumRequiredWhat this section renders as. Determines the shape of
content.Show 5 enum valuesHide 5 enum values
CONTENTSTAT_CARDSTABLEGRAPHADMONITION
headingstringThe heading rendered above the section.
contentobject | object | object | object | objectRequiredA section's content. Its shape is determined by the section's
type— CONTENT takes narrative content, ADMONITION a callout, STAT_CARDS cards, TABLE headers and rows, and GRAPH a chart snapshot.Show 5 variantsHide 5 variants
ReportNarrativeContentobjectThe content of a CONTENT section — a block of prose.
Show 2 propertiesHide 2 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 "- ".
- OR
ReportAdmonitionContentobjectThe content of an ADMONITION section — a callout carrying a severity.
Show 2 propertiesHide 2 properties
severityenumRequiredHow the callout is styled.
Show 4 enum valuesHide 4 enum values
INFOSUCCESSWARNINGDANGER
textstringRequiredOne to three sentences.
- OR
ReportStatCardsContentobjectThe content of a STAT_CARDS section — a row of headline numbers.
Show 2 propertiesHide 2 properties
cardslist of objectsRequiredThree to five cards. 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.
captionstringOne short supporting line of 10 words or fewer.
highlightslist of objectsAt most three standout findings. Omit rather than padding.
Show 2 propertiesHide 2 properties
labelstringRequiredA short Title Case phrase.
valuestringRequiredThe highlighted value.
- OR
ReportTableContentobjectThe content of a TABLE section.
Show 2 propertiesHide 2 properties
headerslist of stringsRequiredThe column headers. At least one is required.
rowslist of list of stringsRequiredThe rows. Every row must contain exactly as many cells as there are headers, in the same order.
- OR
ReportGraphContentobjectThe content of a GRAPH section — a chart with its data baked in. Only this snapshot form is accepted over the API, so the chart always renders exactly the numbers you supply.
Show 6 propertiesHide 6 properties
typeenumRequiredAlways
snapshot.Show 1 enum valueHide 1 enum value
snapshot
graphTypeenumRequiredThe chart style.
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.
valueslist of numbersRequiredOne number per category, aligned positionally with
categories.colorstringAn optional colour for the series.
xAxisLabelstringAn optional x-axis label.
yAxisLabelstringAn optional y-axis label.
startOnNewPagebooleanWhether the section starts on a new page in the exported report.
metadataobjectMerged onto the report's stored metadata.
Show 3 propertiesHide 3 properties
reportTitlestringThe report's title. Defaults to the name of the report template it belongs to.
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 timestamp.
endDatestringRequiredThe end of the window, as an ISO 8601 timestamp.
statusenumThe report's generation state.
Show 3 enum valuesHide 3 enum values
IN_PROGRESSCOMPLETEDERRORED
errorstringWhy the report failed. Pair with a status of ERRORED.
Response
The updated report, and a link to read it in Confident AI.
successbooleanIndicates if the request was successful.
dataobjectThe report, including its sections.
Show 1 propertyHide 1 property
reportobjectShow 8 propertiesHide 8 properties
idstringThe id of the report.
reportTemplateIdstringThe report template this report was generated from. Null once that template has been deleted, which leaves the report unreachable.
statusenumThe report's generation state.
Show 3 enum valuesHide 3 enum values
IN_PROGRESSCOMPLETEDERRORED
errorstringWhy generation failed, when it did.
metadataobjectThe report's header information.
Show 4 propertiesHide 4 properties
reportTitlestringThe report's title.
descriptionstringOne line on what the report covers.
dateRangeobjectThe window a report describes, shown in its header.
Show 2 propertiesHide 2 properties
startDatestringThe start of the window, as an ISO 8601 timestamp.
endDatestringThe end of the window, as an ISO 8601 timestamp.
generatedAtstringWhen the report was written. Always set 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 report section.
typeenumWhat this section renders as. Determines the shape of
content.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.
contentobjectThe section's content. Null when the generator has not authored it yet.
errorstringWhy this section failed to generate, when it did.
startOnNewPagebooleanWhether the section starts on a new page in the exported report.
linkstringThe URL where a person can read this report in Confident AI. Absent once the report's template has been deleted, which leaves it unreachable.
deprecatedbooleanIndicates if this endpoint is deprecated.