Set Default Surface
curl --request POST \
--url https://api.example.com/v0/surfaces/{publicId}/set-defaultimport requests
url = "https://api.example.com/v0/surfaces/{publicId}/set-default"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/surfaces/{publicId}/set-default', 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.example.com/v0/surfaces/{publicId}/set-default",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.example.com/v0/surfaces/{publicId}/set-default"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/v0/surfaces/{publicId}/set-default")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/surfaces/{publicId}/set-default")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySurfaces
Set Default Surface
POST /v0/surfaces//set-default — Make a mount surface the mount default
POST
/
v0
/
surfaces
/
{publicId}
/
set-default
Set Default Surface
curl --request POST \
--url https://api.example.com/v0/surfaces/{publicId}/set-defaultimport requests
url = "https://api.example.com/v0/surfaces/{publicId}/set-default"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/surfaces/{publicId}/set-default', 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.example.com/v0/surfaces/{publicId}/set-default",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.example.com/v0/surfaces/{publicId}/set-default"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/v0/surfaces/{publicId}/set-default")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/surfaces/{publicId}/set-default")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyMake a Surface the default for its mount — the one featured in the operator dashboard for that deployment. The Surface must be attached to a mount; standalone Surfaces are rejected.
Auth: API key (agent) or user session (operator). Owner-only.
Repoints
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
publicId | string | Yes | Surface public UUID (must be a surface on a mount) |
Response
{
"ok": true,
"data": {
"publicId": "f0c1e8e0-...",
"mountId": "36ae99c1-..."
}
}
AgentMount.defaultSurfaceId to this surface.
Errors
| Status | Code | Cause |
|---|---|---|
404 | SURFACE_NOT_FOUND | No Surface with that public id is owned by the caller |
400 | SURFACE_NOT_ON_MOUNT | The surface is standalone (no mountId) — only a mount surface can be a default |
⌘I