Launch Week 02 wrapped — explore all five launches

Update Report Template

PUThttps://api.confident-ai.com/v1/report-templates/{reportTemplateId}

Updates a report template. 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.

PUT/v1/report-templates/{reportTemplateId}
curl -X PUT "https://api.confident-ai.com/v1/report-templates/{reportTemplateId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false
}'
200
{
  "success": true,
  "data": {
    "reportTemplate": {
      "id": "REPORT-TEMPLATE-ID",
      "name": "Weekly Production Health",
      "description": "Give me an overall health check for the last week.",
      "type": "EXECUTIVE_REPORT",
      "enabled": false,
      "schedule": {
        "recurrence": "INTERVAL",
        "repeatEvery": 1,
        "repeatUnit": "WEEK",
        "startAt": null,
        "maxRuns": null,
        "endAt": null,
        "runCount": 3,
        "lastRunAt": "2024-01-22T00:00:00.000Z"
      },
      "createdAt": "2024-01-01T00:00:00.000Z",
      "templateSections": []
    }
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • reportTemplateIdstringRequired

    The id of the report template.

Request body

  • namestring

    The template's new name.

  • descriptionstring

    The template's new description.

  • enabledboolean

    Whether scheduled generation runs. False pauses it while keeping past reports readable.

  • templateSectionslist of objects

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

    Show 7 propertiesHide 7 properties
    • idstring

      An optional client-supplied id. Assigned automatically when omitted.

    • typeenumRequired

      What this section renders as.

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

      The heading rendered above the section. Omit for an unheaded section.

    • useAIboolean

      Whether the generator authors this section from prompt. Defaults to false.

    • promptstring

      Required when useAI is true — a single directive for what this section must cover.

    • contentobject

      The static content of a hardcoded (non-AI) template section. Null for AI-authored sections.

      Show 2 propertiesHide 2 properties
      • textstring

        The section's literal text, written verbatim into every generated report.

      • severityenum

        ADMONITION sections only. Defaults to INFO.

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

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

  • recurrenceenum

    Switch between a repeating (INTERVAL) and one-off (ONCE) schedule. An INTERVAL schedule must end up with both repeatEvery and repeatUnit set, whether from this request or from what is already stored.

    Show 2 enum valuesHide 2 enum values
    • INTERVAL
    • ONCE
  • repeatEveryinteger

    The new interval count. Send null only when switching to ONCE.

  • repeatUnitenum

    The new interval unit. Send null only when switching to ONCE.

    Show 5 enum valuesHide 5 enum values
    • MINUTE
    • HOUR
    • DAY
    • WEEK
    • MONTH
  • startAtstring

    Reschedule the first run, or null to clear it.

  • maxRunsinteger

    The new generation cap, or null to remove it. A schedule that has already hit its cap cannot be re-enabled unless the same request raises or clears it.

  • endAtstring

    The new end date, or null to remove it. A schedule past its end date cannot be re-enabled unless the same request pushes it out or clears it.

Response

The updated report template.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The report template.

    Show 1 propertyHide 1 property
    • reportTemplateobject

      A recurring report definition, generated on the schedule you set (every 1 day by default).

      Show 8 propertiesHide 8 properties
      • idstring

        The id of the report template.

      • namestring

        The template's name, also used as the report's title.

      • descriptionstring

        The question the generated report answers. This drives which data is retrieved.

      • typeenum

        The kind of report this template generates.

        Show 1 enum valueHide 1 enum value
        • EXECUTIVE_REPORT
      • enabledboolean

        Whether scheduled generation is running.

      • scheduleobject

        The template's generation cadence, including how many times it has run.

        Show 8 propertiesHide 8 properties
        • recurrenceenum

          INTERVAL repeats on the repeatEvery/repeatUnit cadence. ONCE generates a single report and then stops.

          Show 2 enum valuesHide 2 enum values
          • INTERVAL
          • ONCE
        • repeatEveryinteger

          How many repeatUnits pass between runs — the 2 in "every 2 weeks". Always set on an INTERVAL schedule, null on a ONCE one.

        • repeatUnitenum

          The unit repeatEvery counts in. Always set on an INTERVAL schedule, null on a ONCE one.

          Show 5 enum valuesHide 5 enum values
          • MINUTE
          • HOUR
          • DAY
          • WEEK
          • MONTH
        • startAtstring

          When the first run was scheduled for, or null if it started immediately.

        • maxRunsinteger

          The number of generations after which the schedule stops, or null for no cap.

        • endAtstring

          The time after which the schedule stops, or null for no end date.

        • runCountinteger

          How many reports this template has generated, counted against maxRuns.

        • lastRunAtstring

          When the template last generated a report, or null if it never has.

      • createdAtstring

        When the template was created.

      • templateSectionslist of objects

        The template's sections, in render order. Empty when the generator chooses the structure.

        Show 8 propertiesHide 8 properties
        • idstring

          The id of the template section.

        • typeenum

          What this section renders as.

          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.

        • useAIboolean

          Whether the generator authors this section.

        • promptstring

          The directive handed to the generator for this section.

        • contentobject

          The static content of a hardcoded (non-AI) template section. Null for AI-authored sections.

          Show 2 propertiesHide 2 properties
          • textstring

            The section's literal text, written verbatim into every generated report.

          • severityenum

            ADMONITION sections only. Defaults to INFO.

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

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI