Node SSH access
const options = {method: 'POST'};
fetch('https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/ssh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/ssh"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request POST \
--url https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/sshimport requests
url = "https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/ssh"
response = requests.post(url)
print(response.text){
"success": true,
"data": {
"host": "<string>",
"port": 22,
"username": "<string>",
"privateKey": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}Clusters
Node SSH access
Get SSH access credentials for a specific cluster node
POST
/
v1
/
regions
/
{region}
/
compute
/
clusters
/
{clusterId}
/
nodes
/
{nodeId}
/
ssh
Node SSH access
const options = {method: 'POST'};
fetch('https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/ssh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/ssh"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request POST \
--url https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/sshimport requests
url = "https://api.example.com/v1/regions/{region}/compute/clusters/{clusterId}/nodes/{nodeId}/ssh"
response = requests.post(url)
print(response.text){
"success": true,
"data": {
"host": "<string>",
"port": 22,
"username": "<string>",
"privateKey": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}Was this page helpful?