Visit Later
N/a
General Notes
- Returns widgets ordered by
positionfield - Each widget includes its type (chart/table) and widget subtype (line, bar, pie, etc.)
- SUPER_ADMIN can list widgets for any canvas (bypasses userId ownership check); regular users only see widgets for their own canvases
Flow
Test cases
Method & URL
GET v1/canvases/:canvasId/widgets
Request
Headers
authorization
- Required
- Type : <string>
- Bearer session token
Query
Body
Path parameter
canvasId
- Required
- Type : <string>
- MongoDB ObjectId (24 hex characters)
Response
2xx
success
- Type : true (boolean)
- This indicates that request was executed successfully
message
- Type : <string> | null
- null on success
data
- Type : <object>
data.widgets
- Type : <object>[]
- List of widgets in the canvas, ordered by position ascending
data.widgets[].id
- Type : <string>
- Widget identifier
data.widgets[].title
- Type : <string>
- AI-generated or user-edited widget title
data.widgets[].type
- Type : <string>
- Enum : chart | table
data.widgets[].chartType
- Type : <string> | null
- Enum : line | bar | pie | donut | stackedBar | scatterPlot
- null when type is "table"
data.widgets[].position
- Type : <number>
- Display order within the canvas
data.widgets[].conversationId
- Type : <string> | null
- Reference to the conversation that created this widget
data.widgets[].aiModel
- Type : <string> | null
- Which Claude model generated this widget
data.widgets[].createdAt
- Type : <string>
- ISO date of when the widget was created
data.widgets[].updatedAt
- Type : <string>
- ISO date of when the widget was last updated
data.widgets[].latestExplanation
- Type : <string> | null
- Plain-language explanation of the chart. Populated for type: "chart" only; always null for type: "table"
data.widgets[].latestExplanationGeneratedAt
- Type : <string> (ISO timestamp) | null
- When the explanation was generated
400
success
- Type : false (boolean)
message
- Type : <string>
- "Something went wrong. We're on it." (invalid canvasId format)
404
success
- Type : false (boolean)
message
- Type : <string>
- Canvas not found