Delete a short link
curl --request DELETE \
--url https://{domain}/api/v1/biolinks/links/{link} \
--header 'Authorization: Bearer <token>' \
--header 'If-Match: <if-match>'import requests
url = "https://{domain}/api/v1/biolinks/links/{link}"
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Bearer <token>'}
};
fetch('https://{domain}/api/v1/biolinks/links/{link}', 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://{domain}/api/v1/biolinks/links/{link}",
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>",
"If-Match: <if-match>"
],
]);
$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://{domain}/api/v1/biolinks/links/{link}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
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://{domain}/api/v1/biolinks/links/{link}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/biolinks/links/{link}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyShort links
Delete a short link
Required permission: biolinks:links:delete
Changing an active link also needs biolinks:links:publish.
DELETE
/
links
/
{link}
Delete a short link
curl --request DELETE \
--url https://{domain}/api/v1/biolinks/links/{link} \
--header 'Authorization: Bearer <token>' \
--header 'If-Match: <if-match>'import requests
url = "https://{domain}/api/v1/biolinks/links/{link}"
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Bearer <token>'}
};
fetch('https://{domain}/api/v1/biolinks/links/{link}', 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://{domain}/api/v1/biolinks/links/{link}",
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>",
"If-Match: <if-match>"
],
]);
$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://{domain}/api/v1/biolinks/links/{link}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
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://{domain}/api/v1/biolinks/links/{link}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/biolinks/links/{link}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAuthorizations
bearerAuthapiKeyHeader
A workspace API key: Authorization: Bearer osk_...
Headers
The current revision in quotes, from the resource's ETag. Missing returns 428; out of date returns 412.
Example:
"\"a1b2c3\""
Path Parameters
Link ID.
Response
204
Deleted