Launch Week 02 wrapped — explore all five launches

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.

PUT/v1/reports/{reportId}
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"
}'
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • reportIdstringRequired

    The id of the report.

Request body

  • sectionslist of objects

    Full replacement of the section list — omitted sections are removed.

    Show 4 propertiesHide 4 properties
    • typeenumRequired

      What this section renders as. Determines the shape of content.

      Show 5 enum valuesHide 5 enum values
      • CONTENT
      • STAT_CARDS
      • TABLE
      • GRAPH
      • ADMONITION
    • headingstring

      The heading rendered above the section.

    • contentobject | object | object | object | objectRequired

      A 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
      • ReportNarrativeContentobject

        The content of a CONTENT section — a block of prose.

        Show 2 propertiesHide 2 properties
        • kindenumRequired

          Always narrative.

          Show 1 enum valueHide 1 enum value
          • narrative
        • narrativestringRequired

          Plain 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
      • ReportAdmonitionContentobject

        The content of an ADMONITION section — a callout carrying a severity.

        Show 2 propertiesHide 2 properties
        • severityenumRequired

          How the callout is styled.

          Show 4 enum valuesHide 4 enum values
          • INFO
          • SUCCESS
          • WARNING
          • DANGER
        • textstringRequired

          One to three sentences.

      • OR
      • ReportStatCardsContentobject

        The content of a STAT_CARDS section — a row of headline numbers.

        Show 2 propertiesHide 2 properties
        • cardslist of objectsRequired

          Three to five cards. At least one is required.

          Show 3 propertiesHide 3 properties
          • labelstringRequired

            A short Title Case phrase of 2-4 words — never a sentence or a raw column name.

          • valuestringRequired

            A number, percentage, or short phrase, with numbers rounded to 2 decimal places.

          • captionstring

            One short supporting line of 10 words or fewer.

        • highlightslist of objects

          At most three standout findings. Omit rather than padding.

          Show 2 propertiesHide 2 properties
          • labelstringRequired

            A short Title Case phrase.

          • valuestringRequired

            The highlighted value.

      • OR
      • ReportTableContentobject

        The content of a TABLE section.

        Show 2 propertiesHide 2 properties
        • headerslist of stringsRequired

          The column headers. At least one is required.

        • rowslist of list of stringsRequired

          The rows. Every row must contain exactly as many cells as there are headers, in the same order.

      • OR
      • ReportGraphContentobject

        The 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
        • typeenumRequired

          Always snapshot.

          Show 1 enum valueHide 1 enum value
          • snapshot
        • graphTypeenumRequired

          The chart style.

          Show 4 enum valuesHide 4 enum values
          • LINE
          • AREA
          • BAR
          • STACKED_BAR
        • categorieslist of stringsRequired

          The x-axis labels. At least one is required.

        • serieslist of objectsRequired

          One entry per plotted line. Every series' values must be the same length as categories.

          Show 3 propertiesHide 3 properties
          • namestringRequired

            The series label.

          • valueslist of numbersRequired

            One number per category, aligned positionally with categories.

          • colorstring

            An optional colour for the series.

        • xAxisLabelstring

          An optional x-axis label.

        • yAxisLabelstring

          An optional y-axis label.

    • startOnNewPageboolean

      Whether the section starts on a new page in the exported report.

  • metadataobject

    Merged onto the report's stored metadata.

    Show 3 propertiesHide 3 properties
    • reportTitlestring

      The report's title. Defaults to the name of the report template it belongs to.

    • descriptionstring

      One line on what the report covers.

    • dateRangeobject

      The window a report describes, shown in its header.

      Show 2 propertiesHide 2 properties
      • startDatestringRequired

        The start of the window, as an ISO 8601 timestamp.

      • endDatestringRequired

        The end of the window, as an ISO 8601 timestamp.

  • statusenum

    The report's generation state.

    Show 3 enum valuesHide 3 enum values
    • IN_PROGRESS
    • COMPLETED
    • ERRORED
  • errorstring

    Why the report failed. Pair with a status of ERRORED.

Response

The updated report, and a link to read it in Confident AI.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The report, including its sections.

    Show 1 propertyHide 1 property
    • reportobject

      Show 8 propertiesHide 8 properties
      • idstring

        The id of the report.

      • reportTemplateIdstring

        The report template this report was generated from. Null once that template has been deleted, which leaves the report unreachable.

      • statusenum

        The report's generation state.

        Show 3 enum valuesHide 3 enum values
        • IN_PROGRESS
        • COMPLETED
        • ERRORED
      • errorstring

        Why generation failed, when it did.

      • metadataobject

        The report's header information.

        Show 4 propertiesHide 4 properties
        • reportTitlestring

          The report's title.

        • descriptionstring

          One line on what the report covers.

        • dateRangeobject

          The window a report describes, shown in its header.

          Show 2 propertiesHide 2 properties
          • startDatestring

            The start of the window, as an ISO 8601 timestamp.

          • endDatestring

            The end of the window, as an ISO 8601 timestamp.

        • generatedAtstring

          When the report was written. Always set by Confident AI.

      • createdAtstring

        When the report was created.

      • updatedAtstring

        When the report was last updated.

      • sectionslist of objects

        The report's sections, ordered as they render.

        Show 7 propertiesHide 7 properties
        • idstring

          The id of the report section.

        • typeenum

          What this section renders as. Determines the shape of content.

          Show 5 enum valuesHide 5 enum values
          • CONTENT
          • STAT_CARDS
          • TABLE
          • GRAPH
          • ADMONITION
        • headingstring

          The heading rendered above the section.

        • orderinteger

          The section's position in the report, starting at 0.

        • contentobject

          The section's content. Null when the generator has not authored it yet.

        • errorstring

          Why this section failed to generate, when it did.

        • startOnNewPageboolean

          Whether the section starts on a new page in the exported report.

  • linkstring

    The URL where a person can read this report in Confident AI. Absent once the report's template has been deleted, which leaves it unreachable.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI