Create a visualization
Creates a visualization. Rejects a specification that fails to build a chart from the data. If a visualization draws the same chart from the same data, returns it instead, regardless of name and labels.
Requires an API key with the write scope.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Chart specification. It needs a chart_type: line, bar, scatter, box, or violin with traces, a list of {x_field, y_field, title?, group_by?, group_label?}; image with image_field and an optional caption_field; cube with x_field, y_field, channel_field, and intensity_field; big_number with value_field and optional aggregation, unit, and decimal_places; or sankey with stage_fields, two or more columns in stage order, and an optional value_field. Optional title, x_label, and y_label label the chart. Every field must be a column the data returns.
SQL query: a single read-only SELECT statement. Reference parameters as :name. The query is saved as a dataset named after the visualization, unless a dataset with the same query and default parameters exists.