Robot Dokümantasyonu

Dolaşım API

Otonom çalışma için dolaşım rotalarını yapılandırın ve yönetin.

Robotun varsayılan dolaşım rotasını alma

Robotun varsayılan dolaşım rotasını döndürür. Bu uç nokta, robotun dolaşım sırasında izleyeceği rotayı döndürür.

GET
/config/default-route

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

routeRoute

Robot için ayarlanacak rotanın adı.

Default: ""
curl -X GET "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/config/default-route" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/config/default-route", {
  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/config/default-route"

  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/config/default-route"

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

print(response.text)
{
  "route": "route_1"
}

Robotun varsayılan dolaşım rotasını ayarlama

Robotun varsayılan dolaşım rotasını ayarlar. Bu uç nokta ile robotun dolaşım sırasında izleyeceği varsayılan rotayı belirtebilirsiniz.

POST
/config/default-route

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
routeRoute

Robot için ayarlanacak rotanın adı.

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/config/default-route" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "route": "route_1"
  }'
const body = JSON.stringify({
  "route": "route_1"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/config/default-route", {
  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/config/default-route"
  body := strings.NewReader(`{
    "route": "route_1"
  }`)
  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/config/default-route"
body = {
  "route": "route_1"
}
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"
    }
  ]
}

Robotun tüm dolaşımlarının listesini alma

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

GET
/cruises

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

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

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

print(response.text)
[
  {
    "name": "Cruise 1",
    "waypoints": [
      {
        "cid": "",
        "eg": "",
        "eg_dir": "",
        "label": "{}",
        "name": "Waypoint 1",
        "px": 0,
        "py": 0,
        "site_floor": {
          "floor": "floor",
          "site": "site"
        },
        "tol": 0.5,
        "type": "default='default'",
        "uid": "site_floor_target-1",
        "yaw_deg": 0
      },
      {
        "cid": "",
        "eg": "",
        "eg_dir": "",
        "label": "{}",
        "name": "Waypoint 2",
        "px": 0,
        "py": 0,
        "site_floor": {
          "floor": "floor",
          "site": "site"
        },
        "tol": 0.5,
        "type": "default='default'",
        "uid": "site_floor_target-2",
        "yaw_deg": 0
      }
    ],
    "site_floor": {
      "floor": "floor",
      "site": "site"
    }
  }
]

Robota yeni dolaşım ekleme

Robota yeni bir dolaşım ekler. Bu uç nokta ile belirli bir site, kat, ad ve yol noktalarıyla yeni dolaşım oluşturabilirsiniz. Dolaşımın geçerli olması için en az bir yol noktası vermelisiniz.

POST
/cruises

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
nameRequiredName

Dolaşımın adı.

Minimum length: 1
waypointsWaypoints

Dolaşımdaki yol noktalarının UID listesi.

siteRequiredSite

Dolaşımın bulunduğu site.

Minimum length: 1
floorRequiredFloor

Dolaşımın bulunduğu kat.

Minimum length: 1

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/cruises" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cruise 1",
    "waypoints": [
      "site_floor_target-1",
      "site_floor_target-2"
    ],
    "site": "site",
    "floor": "floor"
  }'
const body = JSON.stringify({
  "name": "Cruise 1",
  "waypoints": [
    "site_floor_target-1",
    "site_floor_target-2"
  ],
  "site": "site",
  "floor": "floor"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/cruises", {
  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/cruises"
  body := strings.NewReader(`{
    "name": "Cruise 1",
    "waypoints": [
      "site_floor_target-1",
      "site_floor_target-2"
    ],
    "site": "site",
    "floor": "floor"
  }`)
  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/cruises"
body = {
  "name": "Cruise 1",
  "waypoints": [
    "site_floor_target-1",
    "site_floor_target-2"
  ],
  "site": "site",
  "floor": "floor"
}
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"
    }
  ]
}

Robotta dolaşım başlatma

Robotta bir dolaşım başlatır. Bu uç nokta ile belirli bir site, kat, ad ve yol noktalarıyla dolaşım başlatabilirsiniz.

POST
/cruises/control

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
cruise_cmdRequiredCruise Cmd

Dolaşımı kontrol etme komutu (ör. 'CMD_START', 'CMD_STOP').

cruise_routeCruise Route

Kontrol edilecek dolaşım rotasının adı. Boş bırakılırsa varsayılan rota kullanılır.

Default: ""
number_of_roundsNumber Of Rounds

Dolaşımda yapılacak tur sayısı.

Default: 1

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/cruises/control" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "cruise_cmd": "CMD_START",
    "cruise_route": "route_1",
    "number_of_rounds": 1
  }'
const body = JSON.stringify({
  "cruise_cmd": "CMD_START",
  "cruise_route": "route_1",
  "number_of_rounds": 1
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/cruises/control", {
  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/cruises/control"
  body := strings.NewReader(`{
    "cruise_cmd": "CMD_START",
    "cruise_route": "route_1",
    "number_of_rounds": 1
  }`)
  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/cruises/control"
body = {
  "cruise_cmd": "CMD_START",
  "cruise_route": "route_1",
  "number_of_rounds": 1
}
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"
    }
  ]
}

Dolaşımların listesini siteye göre alma

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

GET
/cruises/{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 Cruise By Site Api V1 Cruises Site Get

Belirtilen site için dolaşım bulunamadı.

Doğrulama hatası

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

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

print(response.text)
[
  {
    "name": "Cruise 1",
    "waypoints": [
      {
        "cid": "",
        "eg": "",
        "eg_dir": "",
        "label": "{}",
        "name": "Waypoint 1",
        "px": 0,
        "py": 0,
        "site_floor": {
          "floor": "floor",
          "site": "site"
        },
        "tol": 0.5,
        "type": "default='default'",
        "uid": "site_floor_target-1",
        "yaw_deg": 0
      },
      {
        "cid": "",
        "eg": "",
        "eg_dir": "",
        "label": "{}",
        "name": "Waypoint 2",
        "px": 0,
        "py": 0,
        "site_floor": {
          "floor": "floor",
          "site": "site"
        },
        "tol": 0.5,
        "type": "default='default'",
        "uid": "site_floor_target-2",
        "yaw_deg": 0
      }
    ],
    "site_floor": {
      "floor": "floor",
      "site": "site"
    }
  }
]
{
  "status_code": 404,
  "success": false,
  "message": "No cruises found for the specified site.",
  "error": {
    "code": "CRUISES_NOT_FOUND",
    "message": "No cruises found for the specified site."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Dolaşımların listesini site ve kata göre alma

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

GET
/cruises/{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 Cruise By Site And Floor Api V1 Cruises Site Floor Get

Belirtilen site ve kat için dolaşım bulunamadı.

Doğrulama hatası

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

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

print(response.text)
[
  {
    "name": "Cruise 1",
    "waypoints": [
      {
        "cid": "",
        "eg": "",
        "eg_dir": "",
        "label": "{}",
        "name": "Waypoint 1",
        "px": 0,
        "py": 0,
        "site_floor": {
          "floor": "floor",
          "site": "site"
        },
        "tol": 0.5,
        "type": "default='default'",
        "uid": "site_floor_target-1",
        "yaw_deg": 0
      },
      {
        "cid": "",
        "eg": "",
        "eg_dir": "",
        "label": "{}",
        "name": "Waypoint 2",
        "px": 0,
        "py": 0,
        "site_floor": {
          "floor": "floor",
          "site": "site"
        },
        "tol": 0.5,
        "type": "default='default'",
        "uid": "site_floor_target-2",
        "yaw_deg": 0
      }
    ],
    "site_floor": {
      "floor": "floor",
      "site": "site"
    }
  }
]
{
  "status_code": 404,
  "success": false,
  "message": "No cruises found for the specified site and floor.",
  "error": {
    "code": "CRUISES_NOT_FOUND",
    "message": "No cruises found for the specified site and floor."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Belirli bir dolaşımı site, kat ve ada göre alma

Belirli bir dolaşımı site, kat ve adına göre döndürür. Dolaşım varsa bilgilerini döndürür, yoksa 404 hatası verir.

GET
/cruises/{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

Dolaşımın adı.

Minimum length: 1
waypointsWaypoints

Dolaşımdaki yol noktalarının listesi.

site_floorSiteFloorModel

Dolaşımın site ve katı.

Belirtilen site, kat ve ad için dolaşım bulunamadı.

Doğrulama hatası

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

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

print(response.text)
{
  "name": "Cruise 1",
  "waypoints": [
    {
      "cid": "",
      "eg": "",
      "eg_dir": "",
      "label": "{}",
      "name": "Waypoint 1",
      "px": 0,
      "py": 0,
      "site_floor": {
        "floor": "floor",
        "site": "site"
      },
      "tol": 0.5,
      "type": "default='default'",
      "uid": "site_floor_target-1",
      "yaw_deg": 0
    },
    {
      "cid": "",
      "eg": "",
      "eg_dir": "",
      "label": "{}",
      "name": "Waypoint 2",
      "px": 0,
      "py": 0,
      "site_floor": {
        "floor": "floor",
        "site": "site"
      },
      "tol": 0.5,
      "type": "default='default'",
      "uid": "site_floor_target-2",
      "yaw_deg": 0
    }
  ],
  "site_floor": {
    "floor": "floor",
    "site": "site"
  }
}
{
  "status_code": 404,
  "success": false,
  "message": "Cruise not found for the specified site, floor, and name.",
  "error": {
    "code": "CRUISE_NOT_FOUND",
    "message": "Cruise not found for the specified site, floor, and name."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Belirli bir dolaşımı ada göre güncelleme

Belirli bir dolaşımı adına göre günceller. Bu uç nokta ile dolaşımın site, kat, ad ve yol noktalarını değiştirebilirsiniz. Dolaşımın geçerli olması için en az bir yol noktası vermelisiniz.

PATCH
/cruises/{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

Dolaşımın adı.

Minimum length: 1
waypointsWaypoints

Dolaşımdaki yol noktalarının UID listesi.

siteRequiredSite

Dolaşımın bulunduğu site.

Minimum length: 1
floorRequiredFloor

Dolaşımın bulunduğu kat.

Minimum length: 1

Path Parameters

nameRequiredName
siteRequiredSite
floorRequiredFloor

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/cruises/string/string/string" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cruise 1",
    "waypoints": [
      "site_floor_target-1",
      "site_floor_target-2"
    ],
    "site": "site",
    "floor": "floor"
  }'
const body = JSON.stringify({
  "name": "Cruise 1",
  "waypoints": [
    "site_floor_target-1",
    "site_floor_target-2"
  ],
  "site": "site",
  "floor": "floor"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/cruises/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/cruises/string/string/string"
  body := strings.NewReader(`{
    "name": "Cruise 1",
    "waypoints": [
      "site_floor_target-1",
      "site_floor_target-2"
    ],
    "site": "site",
    "floor": "floor"
  }`)
  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/cruises/string/string/string"
body = {
  "name": "Cruise 1",
  "waypoints": [
    "site_floor_target-1",
    "site_floor_target-2"
  ],
  "site": "site",
  "floor": "floor"
}
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 dolaşımı ada göre silme

Belirli bir dolaşımı adına göre siler. Bu uç nokta ile bir dolaşımı robotun yapılandırmasından kaldırabilirsiniz. Silinecek dolaşımın site, kat ve adını belirtmelisiniz.

DELETE
/cruises/{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/cruises/string/string/string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/cruises/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/cruises/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/cruises/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"
    }
  ]
}