cURL
curl -X DELETE "https://api.ionq.co/v0.4/jobs" \
-H "Authorization: apiKey your-api-key" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"617a1f8b-59d4-435d-aa33-695433d7155e",
"2ccf2773-4c28-468e-a290-2f8554808a25",
"f92df2b6-d212-4f4a-b9ea-024b58c5c3e8"
]
}'
import requests
url = "https://api.ionq.co/v0.4/jobs"
payload = { "ids": ["<string>"] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>']})
};
fetch('https://api.ionq.co/v0.4/jobs', 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.ionq.co/v0.4/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ionq.co/v0.4/jobs"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.ionq.co/v0.4/jobs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionq.co/v0.4/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"ids": [
"<string>"
],
"status": "deleted"
}Jobs
Delete jobs
Permanently remove multiple jobs and their data.
DELETE
/
jobs
cURL
curl -X DELETE "https://api.ionq.co/v0.4/jobs" \
-H "Authorization: apiKey your-api-key" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"617a1f8b-59d4-435d-aa33-695433d7155e",
"2ccf2773-4c28-468e-a290-2f8554808a25",
"f92df2b6-d212-4f4a-b9ea-024b58c5c3e8"
]
}'
import requests
url = "https://api.ionq.co/v0.4/jobs"
payload = { "ids": ["<string>"] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['<string>']})
};
fetch('https://api.ionq.co/v0.4/jobs', 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.ionq.co/v0.4/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ionq.co/v0.4/jobs"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.ionq.co/v0.4/jobs")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ionq.co/v0.4/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"ids": [
"<string>"
],
"status": "deleted"
}Permanently remove multiple jobs and their associated data by providing a list of job UUIDs. This bulk operation cannot be undone and will delete all job metadata, results, and history for the specified jobs.
Authorizations
API keys are associated with a user and can be created on the IonQ Quantum Cloud application. To authenticate, prefix your API Key with apiKey and place it in the Authorization request header. Ex: Authorization: apiKey your-api-key
Body
application/json
Was this page helpful?
⌘I

