curl --request PUT \
--url https://use.hoop.dev/api/serverconfig/misc \
--header 'Content-Type: application/json' \
--data '
{
"grpc_server_url": "grpc://127.0.0.1:8010",
"http_proxy_server_config": {
"listen_address": "http://0.0.0.0:18888"
},
"postgres_server_config": {
"listen_address": "0.0.0.0:15432"
},
"product_analytics": "active",
"rdp_server_config": {
"listen_address": "0.0.0.0:3389"
},
"ssh_server_config": {
"hosts_key": "base64-pem-encoded-hosts-key",
"listen_address": "0.0.0.0:12222"
}
}
'import requests
url = "https://use.hoop.dev/api/serverconfig/misc"
payload = {
"grpc_server_url": "grpc://127.0.0.1:8010",
"http_proxy_server_config": { "listen_address": "http://0.0.0.0:18888" },
"postgres_server_config": { "listen_address": "0.0.0.0:15432" },
"product_analytics": "active",
"rdp_server_config": { "listen_address": "0.0.0.0:3389" },
"ssh_server_config": {
"hosts_key": "base64-pem-encoded-hosts-key",
"listen_address": "0.0.0.0:12222"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
grpc_server_url: 'grpc://127.0.0.1:8010',
http_proxy_server_config: {listen_address: 'http://0.0.0.0:18888'},
postgres_server_config: {listen_address: '0.0.0.0:15432'},
product_analytics: 'active',
rdp_server_config: {listen_address: '0.0.0.0:3389'},
ssh_server_config: {hosts_key: 'base64-pem-encoded-hosts-key', listen_address: '0.0.0.0:12222'}
})
};
fetch('https://use.hoop.dev/api/serverconfig/misc', 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://use.hoop.dev/api/serverconfig/misc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'grpc_server_url' => 'grpc://127.0.0.1:8010',
'http_proxy_server_config' => [
'listen_address' => 'http://0.0.0.0:18888'
],
'postgres_server_config' => [
'listen_address' => '0.0.0.0:15432'
],
'product_analytics' => 'active',
'rdp_server_config' => [
'listen_address' => '0.0.0.0:3389'
],
'ssh_server_config' => [
'hosts_key' => 'base64-pem-encoded-hosts-key',
'listen_address' => '0.0.0.0:12222'
]
]),
CURLOPT_HTTPHEADER => [
"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://use.hoop.dev/api/serverconfig/misc"
payload := strings.NewReader("{\n \"grpc_server_url\": \"grpc://127.0.0.1:8010\",\n \"http_proxy_server_config\": {\n \"listen_address\": \"http://0.0.0.0:18888\"\n },\n \"postgres_server_config\": {\n \"listen_address\": \"0.0.0.0:15432\"\n },\n \"product_analytics\": \"active\",\n \"rdp_server_config\": {\n \"listen_address\": \"0.0.0.0:3389\"\n },\n \"ssh_server_config\": {\n \"hosts_key\": \"base64-pem-encoded-hosts-key\",\n \"listen_address\": \"0.0.0.0:12222\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://use.hoop.dev/api/serverconfig/misc")
.header("Content-Type", "application/json")
.body("{\n \"grpc_server_url\": \"grpc://127.0.0.1:8010\",\n \"http_proxy_server_config\": {\n \"listen_address\": \"http://0.0.0.0:18888\"\n },\n \"postgres_server_config\": {\n \"listen_address\": \"0.0.0.0:15432\"\n },\n \"product_analytics\": \"active\",\n \"rdp_server_config\": {\n \"listen_address\": \"0.0.0.0:3389\"\n },\n \"ssh_server_config\": {\n \"hosts_key\": \"base64-pem-encoded-hosts-key\",\n \"listen_address\": \"0.0.0.0:12222\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/serverconfig/misc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"grpc_server_url\": \"grpc://127.0.0.1:8010\",\n \"http_proxy_server_config\": {\n \"listen_address\": \"http://0.0.0.0:18888\"\n },\n \"postgres_server_config\": {\n \"listen_address\": \"0.0.0.0:15432\"\n },\n \"product_analytics\": \"active\",\n \"rdp_server_config\": {\n \"listen_address\": \"0.0.0.0:3389\"\n },\n \"ssh_server_config\": {\n \"hosts_key\": \"base64-pem-encoded-hosts-key\",\n \"listen_address\": \"0.0.0.0:12222\"\n }\n}"
response = http.request(request)
puts response.read_body{
"grpc_server_url": "grpc://127.0.0.1:8010",
"http_proxy_server_config": {
"listen_address": "http://0.0.0.0:18888"
},
"postgres_server_config": {
"listen_address": "0.0.0.0:15432"
},
"product_analytics": "active",
"rdp_server_config": {
"listen_address": "0.0.0.0:3389"
},
"ssh_server_config": {
"hosts_key": "base64-pem-encoded-hosts-key",
"listen_address": "0.0.0.0:12222"
}
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Update Server Miscellaneous Configuration
Update server miscellaneous configuration
curl --request PUT \
--url https://use.hoop.dev/api/serverconfig/misc \
--header 'Content-Type: application/json' \
--data '
{
"grpc_server_url": "grpc://127.0.0.1:8010",
"http_proxy_server_config": {
"listen_address": "http://0.0.0.0:18888"
},
"postgres_server_config": {
"listen_address": "0.0.0.0:15432"
},
"product_analytics": "active",
"rdp_server_config": {
"listen_address": "0.0.0.0:3389"
},
"ssh_server_config": {
"hosts_key": "base64-pem-encoded-hosts-key",
"listen_address": "0.0.0.0:12222"
}
}
'import requests
url = "https://use.hoop.dev/api/serverconfig/misc"
payload = {
"grpc_server_url": "grpc://127.0.0.1:8010",
"http_proxy_server_config": { "listen_address": "http://0.0.0.0:18888" },
"postgres_server_config": { "listen_address": "0.0.0.0:15432" },
"product_analytics": "active",
"rdp_server_config": { "listen_address": "0.0.0.0:3389" },
"ssh_server_config": {
"hosts_key": "base64-pem-encoded-hosts-key",
"listen_address": "0.0.0.0:12222"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
grpc_server_url: 'grpc://127.0.0.1:8010',
http_proxy_server_config: {listen_address: 'http://0.0.0.0:18888'},
postgres_server_config: {listen_address: '0.0.0.0:15432'},
product_analytics: 'active',
rdp_server_config: {listen_address: '0.0.0.0:3389'},
ssh_server_config: {hosts_key: 'base64-pem-encoded-hosts-key', listen_address: '0.0.0.0:12222'}
})
};
fetch('https://use.hoop.dev/api/serverconfig/misc', 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://use.hoop.dev/api/serverconfig/misc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'grpc_server_url' => 'grpc://127.0.0.1:8010',
'http_proxy_server_config' => [
'listen_address' => 'http://0.0.0.0:18888'
],
'postgres_server_config' => [
'listen_address' => '0.0.0.0:15432'
],
'product_analytics' => 'active',
'rdp_server_config' => [
'listen_address' => '0.0.0.0:3389'
],
'ssh_server_config' => [
'hosts_key' => 'base64-pem-encoded-hosts-key',
'listen_address' => '0.0.0.0:12222'
]
]),
CURLOPT_HTTPHEADER => [
"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://use.hoop.dev/api/serverconfig/misc"
payload := strings.NewReader("{\n \"grpc_server_url\": \"grpc://127.0.0.1:8010\",\n \"http_proxy_server_config\": {\n \"listen_address\": \"http://0.0.0.0:18888\"\n },\n \"postgres_server_config\": {\n \"listen_address\": \"0.0.0.0:15432\"\n },\n \"product_analytics\": \"active\",\n \"rdp_server_config\": {\n \"listen_address\": \"0.0.0.0:3389\"\n },\n \"ssh_server_config\": {\n \"hosts_key\": \"base64-pem-encoded-hosts-key\",\n \"listen_address\": \"0.0.0.0:12222\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://use.hoop.dev/api/serverconfig/misc")
.header("Content-Type", "application/json")
.body("{\n \"grpc_server_url\": \"grpc://127.0.0.1:8010\",\n \"http_proxy_server_config\": {\n \"listen_address\": \"http://0.0.0.0:18888\"\n },\n \"postgres_server_config\": {\n \"listen_address\": \"0.0.0.0:15432\"\n },\n \"product_analytics\": \"active\",\n \"rdp_server_config\": {\n \"listen_address\": \"0.0.0.0:3389\"\n },\n \"ssh_server_config\": {\n \"hosts_key\": \"base64-pem-encoded-hosts-key\",\n \"listen_address\": \"0.0.0.0:12222\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/serverconfig/misc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"grpc_server_url\": \"grpc://127.0.0.1:8010\",\n \"http_proxy_server_config\": {\n \"listen_address\": \"http://0.0.0.0:18888\"\n },\n \"postgres_server_config\": {\n \"listen_address\": \"0.0.0.0:15432\"\n },\n \"product_analytics\": \"active\",\n \"rdp_server_config\": {\n \"listen_address\": \"0.0.0.0:3389\"\n },\n \"ssh_server_config\": {\n \"hosts_key\": \"base64-pem-encoded-hosts-key\",\n \"listen_address\": \"0.0.0.0:12222\"\n }\n}"
response = http.request(request)
puts response.read_body{
"grpc_server_url": "grpc://127.0.0.1:8010",
"http_proxy_server_config": {
"listen_address": "http://0.0.0.0:18888"
},
"postgres_server_config": {
"listen_address": "0.0.0.0:15432"
},
"product_analytics": "active",
"rdp_server_config": {
"listen_address": "0.0.0.0:3389"
},
"ssh_server_config": {
"hosts_key": "base64-pem-encoded-hosts-key",
"listen_address": "0.0.0.0:12222"
}
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Body
The request body resource
The gRPC server URL used to advertise the gRPC server to clients
The HTTP proxy server configuration
Show child attributes
Show child attributes
The PostgreSQL server proxy configuration
Show child attributes
Show child attributes
Either to enable or disable the product analytics tracking
"active"
The RDP server proxy configuration
Show child attributes
Show child attributes
The SSH server proxy configuration
Show child attributes
Show child attributes
Response
OK
The gRPC server URL used to advertise the gRPC server to clients
The HTTP proxy server configuration
Show child attributes
Show child attributes
The PostgreSQL server proxy configuration
Show child attributes
Show child attributes
Either to enable or disable the product analytics tracking
"active"
The RDP server proxy configuration
Show child attributes
Show child attributes
The SSH server proxy configuration
Show child attributes
Show child attributes
Was this page helpful?