POST
/
v1
/
materialized-views
/
{name}
/
refresh
curl --request POST \
  --url https://api.dune.com/api/v1/materialized-views/{name}/refresh \
  --header 'Content-Type: application/json' \
  --header 'X-DUNE-API-KEY: <x-dune-api-key>' \
  --data '{
  "performance": "medium"
}'
{
  "sql_id": "dune.dune.result_erc_20_token_summary",
  "execution_id": "01HZ065JVE23C23FM2HKWQP2RT"
}
  • By default, the refresh runs on the medium engine, costing 10 credits per refresh. To boost performance, pass in a JSON body with {"performance": "large"}, which consumes 20 credits per refresh.
  • If you prefer medium performance, you can omit the performance parameter.
  • You must own the materialized view to refresh it.
  • After triggering the refresh, you can check the status by passing the returned execution_id into the Get Execution Status endpoint.
  • To find the name of a materialized view:

Headers

X-DUNE-API-KEY
string
required

API Key for the service

Path Parameters

name
string
required

unique identifier of the materialized view

Query Parameters

api_key
string

API Key for the service, alternative to using the HTTP header X-DUNE-API-KEY.

Body

application/json
performance
enum<string>
default: medium

Performance level of the refresh

Available options:
medium,
large

Response

200 - application/json
sql_id
string

Unique identifier for the materialized view

execution_id
string

Unique identifier for the execution triggered to refresh the materialized view