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.
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 ProfilesRobot için kullanılabilir mekân profillerinin listesi.
avaible_behavior_profilesAvaible Behavior ProfilesRobot için kullanılabilir davranış profillerinin listesi.
avaible_speed_profilesAvaible Speed ProfilesRobot için kullanılabilir hız profillerinin listesi.
current_environment_profileCurrent Environment ProfileRobotun mevcut mekân profili.
"indoor"current_behavior_profileCurrent Behavior ProfileRobotun mevcut davranış profili.
"normal"current_speed_profileCurrent Speed ProfileRobotun mevcut hız profili.
"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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredprofileProfileRobotun profili.
""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 | nullMekân profili değiştirilemedi
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredprofileProfileRobotun profili.
""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 | nullDavranış profili değiştirilemedi
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredprofileProfileRobotun profili.
""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 | nullHız profili değiştirilemedi
Doğrulama hatası
detailDetailcurl -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.
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 ModesRobot için kullanılabilir modların listesi.
current_modesCurrent ModesRobotun 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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredmodeModeRobotun modu.
""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 | nullRobot modu ayarlanamadı
Doğrulama hatası
detailDetailcurl -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.
Authorization
x-api-key<token>Robotun projesinde Robot Gateway Client rolü olan bir istemcinin API anahtarı
In: header
Request Body
application/jsonRequiredmodeModeRobotun modu.
""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 | nullRobot modu kaldırılamadı
Doğrulama hatası
detailDetailcurl -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"
}
]
}