cms_ai_suggestions

POST `/api/v0/cms/ai-suggestions/chart-spec` - Generate a Vega-Lite chart specification from a prompt. This endpoint is intended for the CMS chart block editor. It requires the user to have edit access to the referenced page when `page_id` is provided, otherwise it falls back to requiring a teaching role for some course via `Res::AnyCourse`.

Changed on
post/api/v0/cms/ai-suggestions/chart-spec

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

current_specstring nullable
data_formatstring nullable
data_samplestring nullable
data_urlstring nullable
page_idstring uuid nullable
promptstring required

Response

Generated Vega-Lite chart specification

specstring required

Changes