Delete Benchmark
curl --request DELETE \
--url https://api.nugen.in/api/v3/benchmarks/{benchmark_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/benchmarks/{benchmark_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/benchmarks/{benchmark_id}', 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.nugen.in/api/v3/benchmarks/{benchmark_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nugen.in/api/v3/benchmarks/{benchmark_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.nugen.in/api/v3/benchmarks/{benchmark_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/benchmarks/{benchmark_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"message": "Benchmark successfully deleted"
}{
"detail": {
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"message": "Benchmark not found or does not belong to you"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Benchmarks
Delete Benchmark
Delete a benchmark permanently.
This endpoint permanently removes a benchmark and all its associated data. Only the owner of the benchmark can delete it.
Path Parameters:
benchmark_id: Unique identifier of the benchmark to delete
Returns:
Success response containing:
benchmark_id: The deleted benchmark identifiermessage: Confirmation message
Raises:
404: If benchmark not found or doesn’t belong to the user
Example Request:
DELETE /api/v3/benchmarks/benchmark_01k4x9m2p7q3r6a1
Headers: {"Authorization": "Bearer <api_key>"}
Example Response:
{
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"message": "Benchmark successfully deleted"
}
Warning:
This action is permanent and cannot be undone. All benchmark questions and answers will be permanently deleted.
DELETE
/
api
/
v3
/
benchmarks
/
{benchmark_id}
Delete Benchmark
curl --request DELETE \
--url https://api.nugen.in/api/v3/benchmarks/{benchmark_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/benchmarks/{benchmark_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/benchmarks/{benchmark_id}', 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.nugen.in/api/v3/benchmarks/{benchmark_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nugen.in/api/v3/benchmarks/{benchmark_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.nugen.in/api/v3/benchmarks/{benchmark_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/benchmarks/{benchmark_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"message": "Benchmark successfully deleted"
}{
"detail": {
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"message": "Benchmark not found or does not belong to you"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Was this page helpful?