curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/execution/{{execution_id}}/cancel"
'''
Download Dune Python SDK by running `pip install dune-client`
For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38
'''
import json
from dune_client.types import QueryParameter
from dune_client.client import DuneClient
from dune_client.query import QueryBase
# setup Dune Python client
dune = DuneClient()
result = dune.cancel_execution(job_id = '01HM79YYNXADPK66YWZK5X0NXB') # pass in the execution_id
import requests
url = "https://api.dune.com/api/v1/execution/{execution_id}/cancel"
headers = {"X-DUNE-API-KEY": "<x-dune-api-key>"}
response = requests.request("POST", url, headers=headers)
print(response.text)
const options = {method: 'POST', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
fetch('https://api.dune.com/api/v1/execution/{execution_id}/cancel', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.dune.com/api/v1/execution/{execution_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-DUNE-API-KEY", "<x-dune-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dune.com/api/v1/execution/{execution_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}
HttpResponse<String> response = Unirest.post("https://api.dune.com/api/v1/execution/{execution_id}/cancel")
.header("X-DUNE-API-KEY", "<x-dune-api-key>")
.asString();
{
"success": true
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Object not found"
}{
"error": "Internal error"
}Executions and Results
Cancel Execution
Cancel a triggered execution request given the execution ID
POST
/
v1
/
execution
/
{execution_id}
/
cancel
curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/execution/{{execution_id}}/cancel"
'''
Download Dune Python SDK by running `pip install dune-client`
For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38
'''
import json
from dune_client.types import QueryParameter
from dune_client.client import DuneClient
from dune_client.query import QueryBase
# setup Dune Python client
dune = DuneClient()
result = dune.cancel_execution(job_id = '01HM79YYNXADPK66YWZK5X0NXB') # pass in the execution_id
import requests
url = "https://api.dune.com/api/v1/execution/{execution_id}/cancel"
headers = {"X-DUNE-API-KEY": "<x-dune-api-key>"}
response = requests.request("POST", url, headers=headers)
print(response.text)
const options = {method: 'POST', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
fetch('https://api.dune.com/api/v1/execution/{execution_id}/cancel', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.dune.com/api/v1/execution/{execution_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-DUNE-API-KEY", "<x-dune-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dune.com/api/v1/execution/{execution_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}
HttpResponse<String> response = Unirest.post("https://api.dune.com/api/v1/execution/{execution_id}/cancel")
.header("X-DUNE-API-KEY", "<x-dune-api-key>")
.asString();
{
"success": true
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Object not found"
}{
"error": "Internal error"
}Minimum required API key scope:
Readexecution_id obtained from making an execute query POST request.
The result returns a boolean for whether the execution is successfully canceled.
curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/execution/{{execution_id}}/cancel"
'''
Download Dune Python SDK by running `pip install dune-client`
For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38
'''
import json
from dune_client.types import QueryParameter
from dune_client.client import DuneClient
from dune_client.query import QueryBase
# setup Dune Python client
dune = DuneClient()
result = dune.cancel_execution(job_id = '01HM79YYNXADPK66YWZK5X0NXB') # pass in the execution_id
import requests
url = "https://api.dune.com/api/v1/execution/{execution_id}/cancel"
headers = {"X-DUNE-API-KEY": "<x-dune-api-key>"}
response = requests.request("POST", url, headers=headers)
print(response.text)
const options = {method: 'POST', headers: {'X-DUNE-API-KEY': '<x-dune-api-key>'}};
fetch('https://api.dune.com/api/v1/execution/{execution_id}/cancel', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.dune.com/api/v1/execution/{execution_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-DUNE-API-KEY", "<x-dune-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dune.com/api/v1/execution/{execution_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}
HttpResponse<String> response = Unirest.post("https://api.dune.com/api/v1/execution/{execution_id}/cancel")
.header("X-DUNE-API-KEY", "<x-dune-api-key>")
.asString();
Was this page helpful?
⌘I