Robot Documentations

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.

GET
/api/v1/layers

Response Body

Successful Response

responseRequiredResponse Get Layer List Api V1 Layers Get

No 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.

GET
/api/v1/layers/{site}

Path Parameters

siteRequiredSite

Response Body

Successful Response

responseRequiredResponse Get Layer By Site Api V1 Layers Site Get

Validation Error

detailDetail
curl -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.

GET
/api/v1/layers/{site}/{floor}

Path Parameters

siteRequiredSite
floorRequiredFloor

Response Body

Successful Response

responseRequiredResponse Get Layer By Site And Floor Api V1 Layers Site Floor Get

No layers found for the specified site and floor.

Validation Error

detailDetail
curl -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.

GET
/api/v1/layers/{site}/{floor}/{uid}

Path Parameters

siteRequiredSite
floorRequiredFloor
uidRequiredUid

Response Body

Successful Response

idRequiredId

The identifier of the layer.

uidRequiredUid

The unique identifier of the layer.

site_floorSiteFloorModel

The site and floor of the layer.

pointsPoints

List of points defining the layer area.

layersLayers

List of layers associated with the layer model.

Layer not found for the specified site, floor, and uid.

Validation Error

detailDetail
curl -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"
    }
  ]
}