Robot Dokümantasyonu

Hedefler API

Robotun navigasyon hedeflerini ve yol noktalarını yönetin.

Robotun tüm hedeflerinin listesini alma

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

GET
/targets

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 Targets Api V1 Targets Get
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets", {
  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/targets"

  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/targets"

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

print(response.text)
[
  {
    "name": "string",
    "uid": "string",
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "eg": "eg_name",
    "eg_dir": "eg_direction",
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "default",
    "label": "{}",
    "cid": ""
  }
]

Robota yeni hedef ekleme

Robota yeni bir hedef ekler. Bu uç nokta ile belirli bir site, kat ve adla yeni hedef oluşturabilirsiniz. Robotun güncel konumunun hedef olarak kullanılıp kullanılmayacağını da belirtebilirsiniz.

POST
/targets

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
nameRequiredName

Hedefin adı.

Minimum length: 1
siteRequiredSite

Hedefin bulunduğu site.

Minimum length: 1
floorRequiredFloor

Hedefin bulunduğu kat.

Minimum length: 1
egRequiredEg

Hedefin giriş noktası.

eg_dirRequiredEg Dir

Giriş noktasının yönü.

use_current_positionUse Current Position

True ise robotun güncel konumu hedef konumu olarak kullanılır.

Default: false
pxPx

Hedefin metre cinsinden x koordinatı.

Default: 0
pyPy

Hedefin metre cinsinden y koordinatı.

Default: 0
yaw_degYaw Deg

Hedefin derece cinsinden yön (yaw) açısı.

Default: 0
tolTol

Hedefe varış için metre cinsinden tolerans.

Default: 0.5
typeType

Hedefin türü (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).

Default: "target"
labelstring | null | null
cidCid

Varsa hedefin benzersiz tanımlayıcısı.

Default: ""

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

Default: ""
dataobject | null | null
errorobject | null | null

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }'
const body = JSON.stringify({
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets"
  body := strings.NewReader(`{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("x-api-key", "<token>")
  req.Header.Add("Content-Type", "application/json")
  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/targets"
body = {
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
}
response = requests.request("POST", url, json = body, headers = {
  "x-api-key": "<token>",
  "Content-Type": "application/json"
})

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Hedeflerin listesini siteye göre alma

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

GET
/targets/{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 Targets By Site Api V1 Targets Site Get

Belirtilen site için hedef bulunamadı.

Doğrulama hatası

detailDetail
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/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/targets/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/targets/string"

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

print(response.text)
[
  {
    "name": "string",
    "uid": "string",
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "eg": "eg_name",
    "eg_dir": "eg_direction",
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "default",
    "label": "{}",
    "cid": ""
  }
]
{
  "status_code": 404,
  "success": false,
  "message": "No targets found for the specified site.",
  "error": {
    "code": "TARGETS_NOT_FOUND",
    "message": "No targets found for the specified site."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Hedeflerin listesini site ve kata göre alma

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

GET
/targets/{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 Targets By Site And Floor Api V1 Targets Site Floor Get

Belirtilen site ve kat için hedef bulunamadı.

Doğrulama hatası

detailDetail
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/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/targets/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/targets/string/string"

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

print(response.text)
[
  {
    "name": "string",
    "uid": "string",
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "eg": "eg_name",
    "eg_dir": "eg_direction",
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "default",
    "label": "{}",
    "cid": ""
  }
]
{
  "status_code": 404,
  "success": false,
  "message": "No targets found for the specified site and floor.",
  "error": {
    "code": "TARGETS_NOT_FOUND",
    "message": "No targets found for the specified site and floor."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Belirli bir hedefi site, kat ve ada göre alma

Belirli bir hedefi site, kat ve adına göre döndürür. Hedef varsa bilgilerini döndürür, yoksa 404 hatası verir.

GET
/targets/{site}/{floor}/{name}

Authorization

x-api-key<token>

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

In: header

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Başarılı yanıt

nameRequiredName

Hedefin adı.

Minimum length: 1
uidRequiredUid

Hedefin benzersiz tanımlayıcısı.

Minimum length: 1
site_floorSiteFloorModel

Hedefin site ve katı.

egEg

Hedefin giriş noktası.

Default: ""
eg_dirEg Dir

Giriş noktasının yönü.

Default: ""
pxnumber | null | null
pynumber | null | null
yaw_degnumber | null | null
tolTol

Hedefe varış için metre cinsinden tolerans.

Default: 0.5
typeType

Hedefin türü ('default','charge','waiting','filling','delivery','target','unloading','table','escape','tag').

Default: "default='default'"
labelstring | null | null
cidCid

Varsa hedefin benzersiz tanımlayıcısı.

Default: ""

Belirtilen site, kat ve ad için hedef bulunamadı.

Doğrulama hatası

detailDetail
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string/string/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/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/targets/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/targets/string/string/string"

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

print(response.text)
{
  "name": "string",
  "uid": "string",
  "site_floor": {
    "site": "site",
    "floor": "floor"
  },
  "eg": "eg_name",
  "eg_dir": "eg_direction",
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "default",
  "label": "{}",
  "cid": ""
}
{
  "status_code": 404,
  "success": false,
  "message": "Target not found for the specified site, floor, and name.",
  "error": {
    "code": "TARGET_NOT_FOUND",
    "message": "Target not found for the specified site, floor, and name."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Belirli bir hedefi site, kat ve ada göre güncelleme

Belirli bir hedefi site, kat ve adına göre günceller. Bu uç nokta ile, robotun güncel konumunun hedef olarak kullanılıp kullanılmayacağı dahil hedef bilgilerini değiştirebilirsiniz.

PATCH
/targets/{site}/{floor}/{name}

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
nameRequiredName

Hedefin adı.

Minimum length: 1
siteRequiredSite

Hedefin bulunduğu site.

Minimum length: 1
floorRequiredFloor

Hedefin bulunduğu kat.

Minimum length: 1
egRequiredEg

Hedefin giriş noktası.

eg_dirRequiredEg Dir

Giriş noktasının yönü.

use_current_positionUse Current Position

True ise robotun güncel konumu hedef konumu olarak kullanılır.

Default: false
pxPx

Hedefin metre cinsinden x koordinatı.

Default: 0
pyPy

Hedefin metre cinsinden y koordinatı.

Default: 0
yaw_degYaw Deg

Hedefin derece cinsinden yön (yaw) açısı.

Default: 0
tolTol

Hedefe varış için metre cinsinden tolerans.

Default: 0.5
typeType

Hedefin türü (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).

Default: "target"
labelstring | null | null
cidCid

Varsa hedefin benzersiz tanımlayıcısı.

Default: ""

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

Default: ""
dataobject | null | null
errorobject | null | null

Doğrulama hatası

detailDetail
curl -X PATCH "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string/string/string" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }'
const body = JSON.stringify({
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string/string/string", {
  headers: {
    "x-api-key": "<token>"
  },
  body
})
package main

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

func main() {
  url := "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string/string/string"
  body := strings.NewReader(`{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }`)
  req, _ := http.NewRequest("PATCH", url, body)
  req.Header.Add("x-api-key", "<token>")
  req.Header.Add("Content-Type", "application/json")
  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/targets/string/string/string"
body = {
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
}
response = requests.request("PATCH", url, json = body, headers = {
  "x-api-key": "<token>",
  "Content-Type": "application/json"
})

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Belirli bir hedefi site, kat ve ada göre silme

Belirli bir hedefi site, kat ve adına göre siler. Bu uç nokta ile bir hedefi robotun yapılandırmasından kaldırabilirsiniz.

DELETE
/targets/{site}/{floor}/{name}

Authorization

x-api-key<token>

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

In: header

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Başarılı yanıt

status_codeStatus Code

Yanıtın HTTP durum kodu.

Default: 200
successSuccess

İşlemin başarılı olup olmadığını belirtir.

Default: true
messageMessage

İşlem hakkında ek bilgi veren mesaj.

Default: ""
dataobject | null | null
errorobject | null | null

Doğrulama hatası

detailDetail
curl -X DELETE "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/string/string/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/targets/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/targets/string/string/string"

  req, _ := http.NewRequest("DELETE", 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/targets/string/string/string"

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

print(response.text)
{
  "status_code": 200,
  "success": true,
  "message": "Operation successful",
  "data": {
    "key": "value"
  },
  "error": {
    "code": "ERROR_CODE",
    "message": "An error occurred"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}