Skip to content
Discussion options

You must be logged in to vote

Yes, you can create a chart with query_context in a single API call — no need to create first and update later.

The ChartPostSchema accepts query_context as an optional field during chart creation:

POST /api/v1/chart/
{
    "slice_name": "My Chart",
    "datasource_id": 1,
    "datasource_type": "table",
    "viz_type": "table",
    "params": "{...}",  # your form_data as JSON string
    "query_context": "{...}"  # your query_context as JSON string
}

So your workflow can be:

  1. Build your params (form_data) and query_context JSON strings
  2. Create the chart with both in one POST request
  3. Then warm_up_cache will work immediately since query_context is already stored

To reply, just mention @dosu.

Replies: 3 comments 16 replies

Comment options

You must be logged in to vote
10 replies
@rsaleev
Comment options

@dosubot
Comment options

@rsaleev
Comment options

@dosubot
Comment options

Answer selected by rsaleev
@rsaleev
Comment options

@dosubot
Comment options

Comment options

You must be logged in to vote
1 reply
@rsaleev
Comment options

Comment options

You must be logged in to vote
5 replies
@dosubot
Comment options

@rsaleev
Comment options

@dosubot
Comment options

@rsaleev
Comment options

@dosubot
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants