Layer API
Manage map layers and spatial data visualization.
Get the list of all layers of the robot
Retrieve the list of all layers of the robot. This endpoint returns all layers with their site, floor, and name information.
Response Body
Successful Response
responseRequiredResponse Get Layer List Api V1 Layers GetNo layers found.
curl -X GET "http://localhost:7242/api/v1/layers"fetch("http://localhost:7242/api/v1/layers")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/layers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "http://localhost:7242/api/v1/layers"
response = requests.request("GET", url)
print(response.text)[
{
"id": 1,
"uid": "site_floor_layer-1",
"site_floor": {
"floor": "floor",
"site": "site"
},
"points": [
{
"x": 0,
"y": 0,
"z": 0
},
{
"x": 1,
"y": 1,
"z": 0
}
],
"layers": [
{
"enable": true,
"options": {
"escapes": [
"site_floor_target-1",
"site_floor_target-2"
]
},
"type": "elev"
},
{
"enable": false,
"options": {},
"type": "buzzer"
}
]
}
]{
"status_code": 404,
"success": false,
"message": "No layers found.",
"error": {
"code": "LAYERS_NOT_FOUND",
"message": "No layers found."
}
}Get the list of layers by site
Retrieve the list of layers filtered by site. This endpoint returns all layers that match the specified site.
Path Parameters
siteRequiredSiteResponse Body
Successful Response
responseRequiredResponse Get Layer By Site Api V1 Layers Site GetValidation Error
detailDetailcurl -X GET "http://localhost:7242/api/v1/layers/string"fetch("http://localhost:7242/api/v1/layers/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/layers/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "http://localhost:7242/api/v1/layers/string"
response = requests.request("GET", url)
print(response.text)[
{
"id": 1,
"uid": "site_floor_layer-1",
"site_floor": {
"floor": "floor",
"site": "site"
},
"points": [
{
"x": 0,
"y": 0,
"z": 0
},
{
"x": 1,
"y": 1,
"z": 0
}
],
"layers": [
{
"enable": true,
"options": {
"escapes": [
"site_floor_target-1",
"site_floor_target-2"
]
},
"type": "elev"
},
{
"enable": false,
"options": {},
"type": "buzzer"
}
]
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get the list of layers filtered by site and floor
Retrieve the list of layers filtered by site and floor. This endpoint returns all layers that match the specified site and floor.
Path Parameters
siteRequiredSitefloorRequiredFloorResponse Body
Successful Response
responseRequiredResponse Get Layer By Site And Floor Api V1 Layers Site Floor GetNo layers found for the specified site and floor.
Validation Error
detailDetailcurl -X GET "http://localhost:7242/api/v1/layers/string/string"fetch("http://localhost:7242/api/v1/layers/string/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/layers/string/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "http://localhost:7242/api/v1/layers/string/string"
response = requests.request("GET", url)
print(response.text)[
{
"id": 1,
"uid": "site_floor_layer-1",
"site_floor": {
"floor": "floor",
"site": "site"
},
"points": [
{
"x": 0,
"y": 0,
"z": 0
},
{
"x": 1,
"y": 1,
"z": 0
}
],
"layers": [
{
"enable": true,
"options": {
"escapes": [
"site_floor_target-1",
"site_floor_target-2"
]
},
"type": "elev"
},
{
"enable": false,
"options": {},
"type": "buzzer"
}
]
}
]{
"status_code": 404,
"success": false,
"message": "No layers found for the specified site and floor.",
"error": {
"code": "LAYERS_NOT_FOUND",
"message": "No layers found for the specified site and floor."
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get a specific layer by site, floor, and uid
Retrieve a specific layer by its site, floor, and uid. This endpoint returns the layer information if it exists, otherwise it raises a 404 error.
Path Parameters
siteRequiredSitefloorRequiredFlooruidRequiredUidResponse Body
Successful Response
idRequiredIdThe identifier of the layer.
uidRequiredUidThe unique identifier of the layer.
site_floorSiteFloorModelThe site and floor of the layer.
pointsPointsList of points defining the layer area.
layersLayersList of layers associated with the layer model.
Layer not found for the specified site, floor, and uid.
Validation Error
detailDetailcurl -X GET "http://localhost:7242/api/v1/layers/string/string/string"fetch("http://localhost:7242/api/v1/layers/string/string/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/layers/string/string/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "http://localhost:7242/api/v1/layers/string/string/string"
response = requests.request("GET", url)
print(response.text){
"id": 1,
"uid": "site_floor_layer-1",
"site_floor": {
"floor": "floor",
"site": "site"
},
"points": [
{
"x": 0,
"y": 0,
"z": 0
},
{
"x": 1,
"y": 1,
"z": 0
}
],
"layers": [
{
"enable": true,
"options": {
"escapes": [
"site_floor_target-1",
"site_floor_target-2"
]
},
"type": "elev"
},
{
"enable": false,
"options": {},
"type": "buzzer"
}
]
}{
"status_code": 404,
"success": false,
"message": "Layer not found for the specified site, floor, and uid.",
"error": {
"code": "LAYER_NOT_FOUND",
"message": "Layer not found for the specified site, floor, and uid."
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}