Launch Week 02 wrapped — explore all five launches

Get Template

GEThttps://api.confident-ai.com/v2/report-templates/{reportTemplateId}

Retrieves a report template by id, with its generation cadence and all of its section definitions.

GET/v2/report-templates/{reportTemplateId}
curl -X GET "https://api.confident-ai.com/v2/report-templates/{reportTemplateId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<REPORT-TEMPLATE-ID>",
    "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.",
    "type": "RISK_ASSESSMENT_REPORT",
    "enabled": true,
    "createdAt": "2025-01-01T00:00:00.000Z",
    "schedule": {
      "recurrence": "ONCE",
      "repeatEvery": 1,
      "repeatUnit": "MINUTE",
      "startAt": "2025-01-08T09:00:00.000Z",
      "maxRuns": 12,
      "endAt": null,
      "runCount": 3,
      "lastRunAt": "2025-01-22T09:00:00.000Z"
    },
    "templateSections": [
      {
        "id": "<REPORT-TEMPLATE-SECTION-ID>",
        "type": "CONTENT",
        "heading": "What's Failing",
        "order": 0,
        "useAI": true,
        "prompt": "Summarize the dominant failure modes in 2-4 sentences, citing error counts.",
        "content": {
          "text": "Generated daily for the platform team.",
          "severity": "INFO"
        },
        "startOnNewPage": false
      }
    ]
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • reportTemplateIdstringRequired

    The id of the report template.

Response

Get Template succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A recurring report definition, generated on the schedule you set — every 1 day unless you say otherwise.

    Show 8 propertiesHide 8 properties
    • idstring

      The id of the report template, generated by Confident AI.

    • namestring

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

    • descriptionstring | null

      The question the generated report answers, which drives what data the generator retrieves.

    • typeenum | null

      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.

      Show 2 enum valuesHide 2 enum values
      • RISK_ASSESSMENT_REPORT
      • EXECUTIVE_REPORT
    • enabledboolean

      Whether scheduled generation is running. A disabled template generates nothing.

    • createdAtstring

      When the report template was created.

    • scheduleobject | null

      When a report template generates, and how far it has got: the cadence you set, plus the read-only progress against it.

      Show 8 propertiesHide 8 properties
      • recurrenceenum

        How often a schedule fires: ONCE runs a single time at startAt, INTERVAL repeats every repeatEvery repeatUnits.

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

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

      • repeatUnitenum | null

        The unit repeatEvery counts for an INTERVAL schedule.

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

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

      • maxRunsinteger | null

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

      • endAtstring | null

        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 | null

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

    • templateSectionslist of objects

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

      Show 8 propertiesHide 8 properties
      • idstring

        The id of the template section.

      • typeenum

        What a section renders as. STAT_CARDS, TABLE and GRAPH must be AI-authored; CONTENT and ADMONITION can be either AI-authored or hardcoded.

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

        The heading rendered above the section, or null when it has none.

      • orderinteger

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

      • useAIboolean

        Whether the generator authors this section from prompt.

      • promptstring | null

        The directive handed to the generator for this section, or null when the section is hardcoded.

      • contentobject | null

        The static content of a hardcoded (non-AI) template section. Null for AI-authored sections, which are written by the generator from their prompt.

        Show 2 propertiesHide 2 properties
        • textstring | null

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

        • severityenum | null

          The callout style of an ADMONITION section, from an informational note to a danger warning.

          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