Skip to main content
POST
/
v1
/
materialized-views
/
{name}
/
refresh
curl -X POST "https://api.dune.com/api/v1/materialized-views/my_matview/refresh" \
  -H "X-Dune-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "performance": "medium"
  }'
{
  "execution_id": "01HZ065JVE23C23FM2HKWQP2RT",
  "sql_id": "dune.dune.result_erc_20_token_summary"
}
This endpoint refreshes a materialized view, triggering a new execution to update its data.
  • By default, the refresh runs on the medium engine. To boost performance, pass in a JSON body with {{"performance": "large"}}. Credits are consumed based on actual compute resources used for the refresh operation.
  • If you prefer medium performance, you can omit the performance parameter.
  • You must own the materialized view to refresh it.

Path Parameters

name
string
required
The name of the materialized view to refresh

Request Body

performance
string
Performance level of the refresh. Available options: medium, large. Defaults to medium.
  • medium: Extended timeout, 1x compute, priority queue. Best for most queries.
  • large: Extended timeout, 2x compute, priority queue. For complex queries.

Response

execution_id
string
Unique identifier for the execution triggered to refresh the materialized viewExample: 01HZ065JVE23C23FM2HKWQP2RT
sql_id
string
Unique identifier for the materialized viewExample: dune.dune.result_erc_20_token_summary
curl -X POST "https://api.dune.com/api/v1/materialized-views/my_matview/refresh" \
  -H "X-Dune-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "performance": "medium"
  }'
{
  "execution_id": "01HZ065JVE23C23FM2HKWQP2RT",
  "sql_id": "dune.dune.result_erc_20_token_summary"
}

Notes

  • Refreshing a materialized view triggers a query execution to update the view with the latest data
  • Use the returned execution_id to check the status of the refresh operation
  • Credits are consumed based on actual compute resources used and the performance tier selected

Headers

X-Dune-Api-Key
string
required

API Key for the service

Path Parameters

name
string
required

Matview Name

Query Parameters

api_key
string

API Key, alternative to using the HTTP header X-Dune-Api-Key

Body

*/*

MatviewsRefreshRequest

performance
string

Performance level of the refresh Available options: medium, large, defaults to medium

Response

OK

execution_id
string

Unique identifier for the execution triggered to refresh the materialized view

Example:

"01HZ065JVE23C23FM2HKWQP2RT"

sql_id
string

Unique identifier for the materialized view

Example:

"dune.dune.result_erc_20_token_summary"