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.
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 Getcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequirednameRequiredNameHedefin adı.
1siteRequiredSiteHedefin bulunduğu site.
1floorRequiredFloorHedefin bulunduğu kat.
1egRequiredEgHedefin giriş noktası.
eg_dirRequiredEg DirGiriş noktasının yönü.
use_current_positionUse Current PositionTrue ise robotun güncel konumu hedef konumu olarak kullanılır.
falsepxPxHedefin metre cinsinden x koordinatı.
0pyPyHedefin metre cinsinden y koordinatı.
0yaw_degYaw DegHedefin derece cinsinden yön (yaw) açısı.
0tolTolHedefe varış için metre cinsinden tolerans.
0.5typeTypeHedefin türü (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).
"target"labelstring | null | nullcidCidVarsa hedefin benzersiz tanımlayıcısı.
""Response Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Path Parameters
siteRequiredSiteResponse Body
Başarılı yanıt
responseRequiredResponse Get Targets By Site Api V1 Targets Site GetBelirtilen site için hedef bulunamadı.
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Path Parameters
siteRequiredSitefloorRequiredFloorResponse Body
Başarılı yanıt
responseRequiredResponse Get Targets By Site And Floor Api V1 Targets Site Floor GetBelirtilen site ve kat için hedef bulunamadı.
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Başarılı yanıt
nameRequiredNameHedefin adı.
1uidRequiredUidHedefin benzersiz tanımlayıcısı.
1site_floorSiteFloorModelHedefin site ve katı.
egEgHedefin giriş noktası.
""eg_dirEg DirGiriş noktasının yönü.
""pxnumber | null | nullpynumber | null | nullyaw_degnumber | null | nulltolTolHedefe varış için metre cinsinden tolerans.
0.5typeTypeHedefin türü ('default','charge','waiting','filling','delivery','target','unloading','table','escape','tag').
"default='default'"labelstring | null | nullcidCidVarsa hedefin benzersiz tanımlayıcısı.
""Belirtilen site, kat ve ad için hedef bulunamadı.
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequirednameRequiredNameHedefin adı.
1siteRequiredSiteHedefin bulunduğu site.
1floorRequiredFloorHedefin bulunduğu kat.
1egRequiredEgHedefin giriş noktası.
eg_dirRequiredEg DirGiriş noktasının yönü.
use_current_positionUse Current PositionTrue ise robotun güncel konumu hedef konumu olarak kullanılır.
falsepxPxHedefin metre cinsinden x koordinatı.
0pyPyHedefin metre cinsinden y koordinatı.
0yaw_degYaw DegHedefin derece cinsinden yön (yaw) açısı.
0tolTolHedefe varış için metre cinsinden tolerans.
0.5typeTypeHedefin türü (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).
"target"labelstring | null | nullcidCidVarsa hedefin benzersiz tanımlayıcısı.
""Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Başarılı yanıt
status_codeStatus CodeYanıtın HTTP durum kodu.
200successSuccessİşlemin başarılı olup olmadığını belirtir.
truemessageMessageİşlem hakkında ek bilgi veren mesaj.
""dataobject | null | nullerrorobject | null | nullDoğrulama hatası
detailDetailcurl -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"
}
]
}