Delete a dashboard schedule
curl --request DELETE \
--url https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule \
--header 'X-Dune-Api-Key: <x-dune-api-key>'import requests
url = "https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule"
headers = {"X-Dune-Api-Key": "<x-dune-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Dune-Api-Key': '<x-dune-api-key>'}};
fetch('https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Dune-Api-Key: <x-dune-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Dune-Api-Key", "<x-dune-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule")
.header("X-Dune-Api-Key", "<x-dune-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Dune-Api-Key"] = '<x-dune-api-key>'
response = http.request(request)
puts response.read_body{
"deleted": true
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Not allowed to execute query. Query is archived, unsaved or not enough permissions"
}{
"error": "Object not found"
}{
"error": "Internal error"
}Schedules
Delete Dashboard Schedule
Stop refreshing a dashboard on a schedule. Returns deleted false when the dashboard has no schedule.
DELETE
/
v1
/
dashboards
/
{dashboard_id}
/
schedule
Delete a dashboard schedule
curl --request DELETE \
--url https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule \
--header 'X-Dune-Api-Key: <x-dune-api-key>'import requests
url = "https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule"
headers = {"X-Dune-Api-Key": "<x-dune-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Dune-Api-Key': '<x-dune-api-key>'}};
fetch('https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Dune-Api-Key: <x-dune-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Dune-Api-Key", "<x-dune-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule")
.header("X-Dune-Api-Key", "<x-dune-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dune.com/api/v1/dashboards/{dashboard_id}/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Dune-Api-Key"] = '<x-dune-api-key>'
response = http.request(request)
puts response.read_body{
"deleted": true
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Not allowed to execute query. Query is archived, unsaved or not enough permissions"
}{
"error": "Object not found"
}{
"error": "Internal error"
}Minimum required API key scope:
Read/WriteUse Cases
- Stop Credit Use: Stop refreshing a dashboard that no longer needs fresh data.
- Safe Retries: When the dashboard has no schedule, the call returns
deleted: falseand not an error.
Was this page helpful?