Robot Dokümantasyonu

Profil ve Mod API

Robotun hız, davranış ve mekân ayarları için profillerini yapılandırın.

Robotun güncel profillerini alma

Kullanılabilir hız, davranış ve mekân profilleri dahil robotun güncel profillerini döndürür. Yanıt, şu anda etkin olan profilleri ve her profil türü için kullanılabilir seçenekleri içerir.

GET
/profile

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

avaible_environment_profilesAvaible Environment Profiles

Robot için kullanılabilir mekân profillerinin listesi.

avaible_behavior_profilesAvaible Behavior Profiles

Robot için kullanılabilir davranış profillerinin listesi.

avaible_speed_profilesAvaible Speed Profiles

Robot için kullanılabilir hız profillerinin listesi.

current_environment_profileCurrent Environment Profile

Robotun mevcut mekân profili.

Default: "indoor"
current_behavior_profileCurrent Behavior Profile

Robotun mevcut davranış profili.

Default: "normal"
current_speed_profileCurrent Speed Profile

Robotun mevcut hız profili.

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

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

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

print(response.text)
{
  "avaible_environment_profiles": [
    "Mall",
    "Restaurant"
  ],
  "avaible_behavior_profiles": [
    "Nova",
    "Default"
  ],
  "avaible_speed_profiles": [
    "slow",
    "normal",
    "fast",
    "faster",
    "fastest"
  ],
  "current_environment_profile": "Restaurant",
  "current_behavior_profile": "Nova",
  "current_speed_profile": "Faster"
}

Robotun mekân profilini değiştirme

Robotun mekân profilini değiştirir. Bu uç nokta ile robotun farklı ortamlardaki performansını iyileştirmek için mekân profilini ayarlayabilirsiniz.

POST
/profile/environment

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
profileProfile

Robotun profili.

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

Mekân profili değiştirilemedi

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/profile/environment" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "profile": "normal"
  }'
const body = JSON.stringify({
  "profile": "normal"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/profile/environment", {
  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/profile/environment"
  body := strings.NewReader(`{
    "profile": "normal"
  }`)
  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/profile/environment"
body = {
  "profile": "normal"
}
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"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to change environment profile",
  "error": {
    "code": "PROFILE_CHANGE_ERROR",
    "message": "Failed to change environment profile"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Robotun davranış profilini değiştirme

Robotun davranış profilini değiştirir. Bu uç nokta ile robotun çevresiyle etkileşimini iyileştirmek için davranış profilini ayarlayabilirsiniz.

POST
/profile/behavior

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
profileProfile

Robotun profili.

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

Davranış profili değiştirilemedi

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/profile/behavior" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "profile": "normal"
  }'
const body = JSON.stringify({
  "profile": "normal"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/profile/behavior", {
  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/profile/behavior"
  body := strings.NewReader(`{
    "profile": "normal"
  }`)
  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/profile/behavior"
body = {
  "profile": "normal"
}
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"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to change behavior profile",
  "error": {
    "code": "PROFILE_CHANGE_ERROR",
    "message": "Failed to change behavior profile"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Robotun hız profilini değiştirme

Robotun hız profilini değiştirir. Bu uç nokta ile robotun hareket hızını ve verimliliğini iyileştirmek için hız profilini ayarlayabilirsiniz.

POST
/profile/speed

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
profileProfile

Robotun profili.

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

Hız profili değiştirilemedi

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/profile/speed" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "profile": "normal"
  }'
const body = JSON.stringify({
  "profile": "normal"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/profile/speed", {
  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/profile/speed"
  body := strings.NewReader(`{
    "profile": "normal"
  }`)
  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/profile/speed"
body = {
  "profile": "normal"
}
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"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to change speed profile",
  "error": {
    "code": "PROFILE_CHANGE_ERROR",
    "message": "Failed to change speed profile"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Kullanılabilir robot modlarını alma

Kullanılabilir robot modlarını döndürür. Yanıt, şu anda etkin olan modları ve kullanılabilir robot modu seçeneklerini içerir.

GET
/mode

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

avaible_modesAvaible Modes

Robot için kullanılabilir modların listesi.

current_modesCurrent Modes

Robotun mevcut modlarının listesi.

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

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

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

print(response.text)
{
  "avaible_modes": [
    "elev"
  ],
  "current_modes": [
    ""
  ]
}

Robot modunu ayarlama

Robot modunu ayarlar. Bu uç nokta ile robotun çalışmasını farklı görev ve ortamlara göre iyileştirmek için modunu değiştirebilirsiniz.

POST
/mode

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
modeMode

Robotun modu.

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

Robot modu ayarlanamadı

Doğrulama hatası

detailDetail
curl -X POST "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/mode" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "normal"
  }'
const body = JSON.stringify({
  "mode": "normal"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/mode", {
  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/mode"
  body := strings.NewReader(`{
    "mode": "normal"
  }`)
  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/mode"
body = {
  "mode": "normal"
}
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"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to set robot mode",
  "error": {
    "code": "MODE_CHANGE_ERROR",
    "message": "Failed to set robot mode"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Robot modunu kaldırma

Bir robot modunu kaldırır. Bu uç nokta ile artık gerekmeyen veya uygulanamayan belirli bir robot modunu kaldırabilirsiniz.

DELETE
/mode/{name}

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
modeMode

Robotun modu.

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

Robot modu kaldırılamadı

Doğrulama hatası

detailDetail
curl -X DELETE "https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/mode/{name}" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "normal"
  }'
const body = JSON.stringify({
  "mode": "normal"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/mode/{name}", {
  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/mode/{name}"
  body := strings.NewReader(`{
    "mode": "normal"
  }`)
  req, _ := http.NewRequest("DELETE", 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/mode/{name}"
body = {
  "mode": "normal"
}
response = requests.request("DELETE", 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"
  }
}
{
  "status_code": 400,
  "success": false,
  "message": "Failed to remove robot mode",
  "error": {
    "code": "MODE_REMOVE_ERROR",
    "message": "Failed to remove robot mode"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}