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
The name of the materialized view to refresh
Request Body
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
Unique identifier for the execution triggered to refresh the materialized view Example: 01HZ065JVE23C23FM2HKWQP2RT
Unique identifier for the materialized view Example: 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"
}'
200 OK
400 Bad Request
401 Unauthorized
404 Not Found
500 Internal Server Error
{
"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
API Key, alternative to using the HTTP header X-Dune-Api-Key
Performance level of the refresh
Available options: medium , large , defaults to medium
Unique identifier for the execution triggered to refresh the materialized view
Example: "01HZ065JVE23C23FM2HKWQP2RT"
Unique identifier for the materialized view
Example: "dune.dune.result_erc_20_token_summary"