curl --request GET \
--url https://melso.ai/api/workspaces/{id}/private-network \
--header 'Authorization: Bearer <token>'import requests
url = "https://melso.ai/api/workspaces/{id}/private-network"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://melso.ai/api/workspaces/{id}/private-network', 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://melso.ai/api/workspaces/{id}/private-network",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://melso.ai/api/workspaces/{id}/private-network"
req, _ := http.NewRequest("GET", 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.get("https://melso.ai/api/workspaces/{id}/private-network")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/workspaces/{id}/private-network")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"private_network": {
"provider": "<string>",
"enabled": true,
"client_id": "<string>",
"tags": [
"<string>"
],
"login_server": "<string>",
"accept_routes": true,
"accept_dns": true,
"generation": 123,
"configured_by": "<string>",
"configured_at": "2023-11-07T05:31:56Z",
"verified_at": "2023-11-07T05:31:56Z",
"last_error": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Get workspace private network
Workspace member (a person), or an admin API key.
Request: None.
Response: {private_network:PrivateNetwork|null}, where null means none is connected. PrivateNetwork is {provider:"tailscale"|"headscale",enabled:boolean,client_id:string,tags:string[],login_server:string,accept_routes:boolean,accept_dns:boolean,generation:integer,configured_by:UUID,configured_at:timestamp,verified_at:timestamp|null,last_error:string}. client_id and tags apply to Tailscale, login_server to Headscale. verified_at is the last successful check (null until one succeeds); last_error the last failure.
Status: 200; 403 this endpoint is only available to human actors for a credential that is neither a person’s nor an admin API key, and workspace_key_scope for a tasks API key. Authentication and resource-access errors follow Overview.
curl --request GET \
--url https://melso.ai/api/workspaces/{id}/private-network \
--header 'Authorization: Bearer <token>'import requests
url = "https://melso.ai/api/workspaces/{id}/private-network"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://melso.ai/api/workspaces/{id}/private-network', 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://melso.ai/api/workspaces/{id}/private-network",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://melso.ai/api/workspaces/{id}/private-network"
req, _ := http.NewRequest("GET", 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.get("https://melso.ai/api/workspaces/{id}/private-network")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/workspaces/{id}/private-network")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"private_network": {
"provider": "<string>",
"enabled": true,
"client_id": "<string>",
"tags": [
"<string>"
],
"login_server": "<string>",
"accept_routes": true,
"accept_dns": true,
"generation": 123,
"configured_by": "<string>",
"configured_at": "2023-11-07T05:31:56Z",
"verified_at": "2023-11-07T05:31:56Z",
"last_error": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Company API key (mwk_) or personal access token (mel_). A PAT requires X-Workspace-ID on company-scoped routes. An API key implies its own company.
Headers
Company UUID for a personal token on company-scoped operations. A company API key already binds its company.
Path Parameters
id from the corresponding authorized response.
Response
{private_network:PrivateNetwork|null}, where null means none is connected. PrivateNetwork is {provider:"tailscale"|"headscale",enabled:boolean,client_id:string,tags:string[],login_server:string,accept_routes:boolean,accept_dns:boolean,generation:integer,configured_by:UUID,configured_at:timestamp,verified_at:timestamp|null,last_error:string}. client_id and tags apply to Tailscale, login_server to Headscale. verified_at is the last successful check (null until one succeeds); last_error the last failure.
Show child attributes
Show child attributes