Robot Dokümantasyonu

Katman API

Harita katmanlarını ve haritada gösterilen verileri yönetin.

Robotun tüm katmanlarının listesini alma

Robotun tüm katmanlarının listesini döndürür. Bu uç nokta, tüm katmanları site, kat ve ad bilgileriyle birlikte döndürür.

GET
/layers

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Response Body

Başarılı yanıt

responseRequiredResponse Get Layer List Api V1 Layers Get

Katman bulunamadı.

curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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."
  }
}

Katmanların listesini siteye göre alma

Siteye göre filtrelenmiş katman listesini döndürür. Bu uç nokta, belirtilen siteyle eşleşen tüm katmanları döndürür.

GET
/layers/{site}

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Path Parameters

siteRequiredSite

Response Body

Başarılı yanıt

responseRequiredResponse Get Layer By Site Api V1 Layers Site Get

Doğrulama hatası

detailDetail
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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

Katmanların listesini site ve kata göre alma

Site ve kata göre filtrelenmiş katman listesini döndürür. Bu uç nokta, belirtilen site ve katla eşleşen tüm katmanları döndürür.

GET
/layers/{site}/{floor}

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Path Parameters

siteRequiredSite
floorRequiredFloor

Response Body

Başarılı yanıt

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

Belirtilen site ve kat için katman bulunamadı.

Doğrulama hatası

detailDetail
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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

Belirli bir katmanı site, kat ve UID'ye göre alma

Belirli bir katmanı site, kat ve UID'sine göre döndürür. Katman varsa bilgilerini döndürür, yoksa 404 hatası verir.

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

Authorization

x-api-key<token>

Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı

In: header

Path Parameters

siteRequiredSite
floorRequiredFloor
uidRequiredUid

Response Body

Başarılı yanıt

idRequiredId

Katmanın tanımlayıcısı.

uidRequiredUid

Katmanın benzersiz tanımlayıcısı.

site_floorSiteFloorModel

Katmanın site ve katı.

pointsPoints

Katman alanını tanımlayan noktaların listesi.

layersLayers

Katman modeliyle ilişkili katmanların listesi.

Belirtilen site, kat ve UID için katman bulunamadı.

Doğrulama hatası

detailDetail
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string/string", {
  headers: {
    "x-api-key": "<token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string/string"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("x-api-key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/layers/string/string/string"

response = requests.request("GET", url, headers = {
  "x-api-key": "<token>"
})

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