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.
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
routeRouteRobot için ayarlanacak rotanın adı.
""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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredrouteRouteRobot için ayarlanacak rotanın adı.
""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/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.
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 Getcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequirednameRequiredNameDolaşımın adı.
1waypointsWaypointsDolaşımdaki yol noktalarının UID listesi.
siteRequiredSiteDolaşımın bulunduğu site.
1floorRequiredFloorDolaşımın bulunduğu kat.
1Response 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/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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredcruise_cmdRequiredCruise CmdDolaşımı kontrol etme komutu (ör. 'CMD_START', 'CMD_STOP').
cruise_routeCruise RouteKontrol edilecek dolaşım rotasının adı. Boş bırakılırsa varsayılan rota kullanılır.
""number_of_roundsNumber Of RoundsDolaşımda yapılacak tur sayısı.
1Response 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/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.
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 Cruise By Site Api V1 Cruises Site GetBelirtilen site için dolaşım bulunamadı.
Doğrulama hatası
detailDetailcurl -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.
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 Cruise By Site And Floor Api V1 Cruises Site Floor GetBelirtilen site ve kat için dolaşım bulunamadı.
Doğrulama hatası
detailDetailcurl -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.
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
nameRequiredNameDolaşımın adı.
1waypointsWaypointsDolaşımdaki yol noktalarının listesi.
site_floorSiteFloorModelDolaşımın site ve katı.
Belirtilen site, kat ve ad için dolaşım bulunamadı.
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequirednameRequiredNameDolaşımın adı.
1waypointsWaypointsDolaşımdaki yol noktalarının UID listesi.
siteRequiredSiteDolaşımın bulunduğu site.
1floorRequiredFloorDolaşımın bulunduğu kat.
1Path Parameters
nameRequiredNamesiteRequiredSitefloorRequiredFloorResponse 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/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.
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/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"
}
]
}