Unassign an SSH key from a reservation
curl --request DELETE \
--url https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "reservation_ssh_key_not_found",
"message": "That SSH key is not registered on this reservation. It may already be removed."
}
}{
"detail": {
"code": "reservation_not_launchable",
"message": "This reservation cannot launch in its current state."
}
}{
"error": "rate_limited",
"retry_after": 42,
"detail": "Too many requests. Try again in 42 seconds."
}{
"code": "<string>",
"detail": "<string>"
}Unassign an SSH key from a reservation
Removes an assignment you created and queues the reservation’s remaining key set for its active machines. An API key acts as its creator, so it can remove only assignments made by that person. If no assigned keys remain, the reservation returns to its default and every active organization key is queued. To stop a key from working everywhere, revoke it instead. Existing SSH sessions stay connected.
DELETE
/
v1
/
orchestrator
/
nodes
/
reservations
/
{reservation_id}
/
ssh-keys
/
{key_id}
Unassign an SSH key from a reservation
curl --request DELETE \
--url https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/ssh-keys/{key_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{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "reservation_ssh_key_not_found",
"message": "That SSH key is not registered on this reservation. It may already be removed."
}
}{
"detail": {
"code": "reservation_not_launchable",
"message": "This reservation cannot launch in its current state."
}
}{
"error": "rate_limited",
"retry_after": 42,
"detail": "Too many requests. Try again in 42 seconds."
}{
"code": "<string>",
"detail": "<string>"
}Unassigning a key does not revoke it. To block a key on every reservation, revoke it.
Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
A reservation your organization holds. Keys are delivered to its VM and Bare Metal machines.
Organization SSH key ID assigned to the reservation.
Response
The assignment is removed and the remaining key set is queued.
Was this page helpful?