curl --request POST \
--url https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"access_mode": "bare-metal",
"network_mode": "private",
"ssh_key_ids": [
"88888888-8888-4888-8888-888888888888"
],
"request_id": "switch-2026-10-16-a"
}
'import requests
url = "https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access"
payload = {
"access_mode": "bare-metal",
"network_mode": "private",
"ssh_key_ids": ["88888888-8888-4888-8888-888888888888"],
"request_id": "switch-2026-10-16-a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
access_mode: 'bare-metal',
network_mode: 'private',
ssh_key_ids: ['88888888-8888-4888-8888-888888888888'],
request_id: 'switch-2026-10-16-a'
})
};
fetch('https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access', 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}/switch-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'access_mode' => 'bare-metal',
'network_mode' => 'private',
'ssh_key_ids' => [
'88888888-8888-4888-8888-888888888888'
],
'request_id' => 'switch-2026-10-16-a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access"
payload := strings.NewReader("{\n \"access_mode\": \"bare-metal\",\n \"network_mode\": \"private\",\n \"ssh_key_ids\": [\n \"88888888-8888-4888-8888-888888888888\"\n ],\n \"request_id\": \"switch-2026-10-16-a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"access_mode\": \"bare-metal\",\n \"network_mode\": \"private\",\n \"ssh_key_ids\": [\n \"88888888-8888-4888-8888-888888888888\"\n ],\n \"request_id\": \"switch-2026-10-16-a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"access_mode\": \"bare-metal\",\n \"network_mode\": \"private\",\n \"ssh_key_ids\": [\n \"88888888-8888-4888-8888-888888888888\"\n ],\n \"request_id\": \"switch-2026-10-16-a\"\n}"
response = http.request(request)
puts response.read_body{
"nodes": [
{
"node_id": "33333333-3333-4333-8333-333333333333",
"reservation_id": "11111111-1111-4111-8111-111111111111",
"controller_id": null,
"status": "bare-metal",
"hostname": "gpu-host-01",
"ip": "203.0.113.10",
"port": 22,
"username": "tenant",
"ssh_endpoint": "tenant@203.0.113.10",
"gpu_type": "H100",
"gpu_count": 8,
"authorized_key_fingerprints": [],
"authorized_key_metadata": [],
"keys_pushed_at": null,
"reboot": null,
"health_readiness": {
"ready": true,
"status": "ready",
"reasons": [],
"advisory_reasons": []
}
}
]
}{
"detail": "unsupported_access_mode"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "reservation_not_found",
"message": "Ornn could not find that reservation."
}
}{
"detail": {
"code": "insufficient_available_nodes",
"message": "Not enough nodes in this reservation are free right now. Lower the machine count or wait for nodes to come back."
}
}{
"code": "<string>",
"detail": "<string>"
}Switch access mode or network
Re-provisions access on the reservation’s nodes with a new access mode, network mode, or both. Omitted fields keep the reservation’s defaults. Switching between VM and Bare Metal tears down the existing environment and destroys data stored on the machine; copy it off first. Changing only the network interrupts SSH until access is ready again. A 202 response is acceptance, not readiness. Poll the VMs or nodes as after a launch. SSH key selection works as for launch.
curl --request POST \
--url https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"access_mode": "bare-metal",
"network_mode": "private",
"ssh_key_ids": [
"88888888-8888-4888-8888-888888888888"
],
"request_id": "switch-2026-10-16-a"
}
'import requests
url = "https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access"
payload = {
"access_mode": "bare-metal",
"network_mode": "private",
"ssh_key_ids": ["88888888-8888-4888-8888-888888888888"],
"request_id": "switch-2026-10-16-a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
access_mode: 'bare-metal',
network_mode: 'private',
ssh_key_ids: ['88888888-8888-4888-8888-888888888888'],
request_id: 'switch-2026-10-16-a'
})
};
fetch('https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access', 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}/switch-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'access_mode' => 'bare-metal',
'network_mode' => 'private',
'ssh_key_ids' => [
'88888888-8888-4888-8888-888888888888'
],
'request_id' => 'switch-2026-10-16-a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access"
payload := strings.NewReader("{\n \"access_mode\": \"bare-metal\",\n \"network_mode\": \"private\",\n \"ssh_key_ids\": [\n \"88888888-8888-4888-8888-888888888888\"\n ],\n \"request_id\": \"switch-2026-10-16-a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"access_mode\": \"bare-metal\",\n \"network_mode\": \"private\",\n \"ssh_key_ids\": [\n \"88888888-8888-4888-8888-888888888888\"\n ],\n \"request_id\": \"switch-2026-10-16-a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/nodes/reservations/{reservation_id}/switch-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"access_mode\": \"bare-metal\",\n \"network_mode\": \"private\",\n \"ssh_key_ids\": [\n \"88888888-8888-4888-8888-888888888888\"\n ],\n \"request_id\": \"switch-2026-10-16-a\"\n}"
response = http.request(request)
puts response.read_body{
"nodes": [
{
"node_id": "33333333-3333-4333-8333-333333333333",
"reservation_id": "11111111-1111-4111-8111-111111111111",
"controller_id": null,
"status": "bare-metal",
"hostname": "gpu-host-01",
"ip": "203.0.113.10",
"port": 22,
"username": "tenant",
"ssh_endpoint": "tenant@203.0.113.10",
"gpu_type": "H100",
"gpu_count": 8,
"authorized_key_fingerprints": [],
"authorized_key_metadata": [],
"keys_pushed_at": null,
"reboot": null,
"health_readiness": {
"ready": true,
"status": "ready",
"reasons": [],
"advisory_reasons": []
}
}
]
}{
"detail": "unsupported_access_mode"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "reservation_not_found",
"message": "Ornn could not find that reservation."
}
}{
"detail": {
"code": "insufficient_available_nodes",
"message": "Not enough nodes in this reservation are free right now. Lower the machine count or wait for nodes to come back."
}
}{
"code": "<string>",
"detail": "<string>"
}ornn machines switch <reservation-id> --network private. Changing between VM and Bare Metal also requires --mode and --erase-local-data.Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
An owned reservation ID (reservationId in reservation responses).
Body
Defaults to the reservation's access mode. Use the mode your reservation was booked with.
virtual-machine, bare-metal VM only. Overrides the reservation's saved disk for VMs this request creates. When omitted, the saved disk is used; a VM launch with no disk available fails with disk_required. Must be omitted for Bare Metal.
public exposes SSH on the host's public address. private connects the machine to your organization's private network.
public, private Private networking only. An existing private network in your organization. Omit it to use the organization's shared network. This does not create a network.
How many of the reservation's nodes to provision when launch starts provisioning. Defaults to every reserved node and cannot exceed it. Ignored when the reservation already has machines.
x >= 1Active SSH keys in your organization to authorize. The keys are also attached to the reservation. Omit to use the reservation's current keys, or every active organization key when none are selected.
Optional client token for this request. Reuse it when you retry the same launch so Ornn can recognize repeated commands.
Response
Switch accepted. The body lists the reservation's nodes.
Show child attributes
Show child attributes
Was this page helpful?