Robot Dokümantasyonu

Kullanıcı Arayüzü API

Robotun ekranını, konuşmasını ve kullanıcı etkileşimi özelliklerini kontrol edin.

Robota metin okuma (text to speech) komutu gönderme

Robota metin okuma (text to speech) komutu gönderir. Bu uç nokta ile robotun ekran komut yayıncısına bir metin ve dil kodu gönderebilirsiniz. Robot, gönderilen metni belirtilen dilde seslendirir.

POST
/ui/speech

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
langRequiredLang

Robotun seslendireceği metnin dili (ör. 'tr', 'en').

textRequiredText

Robotun seslendireceği metin.

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/ui/speech" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "lang": "tr",
    "text": "Hello world"
  }'
const body = JSON.stringify({
  "lang": "tr",
  "text": "Hello world"
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/ui/speech", {
  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/ui/speech"
  body := strings.NewReader(`{
    "lang": "tr",
    "text": "Hello world"
  }`)
  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/ui/speech"
body = {
  "lang": "tr",
  "text": "Hello world"
}
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 Pixel ekranındaki videoyu değiştirme

Robotun Pixel ekranındaki videoyu değiştirir. Bu uç nokta ile robotun Pixel ekranında gösterilecek video için bir MP4 dosya URL'si belirtebilirsiniz.

POST
/ui/screen/pixel

Authorization

x-api-key<token>

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

In: header

Query Parameters

urlRequiredUrl

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/ui/screen/pixel?url=string" \
  -H "x-api-key: <token>"
fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/ui/screen/pixel?url=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/ui/screen/pixel?url=string"

  req, _ := http.NewRequest("POST", 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/ui/screen/pixel?url=string"

response = requests.request("POST", 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"
    }
  ]
}

Robotun terminal günlüklerinin anlık kaydını alma

Robotun terminal günlüklerinin anlık kaydını alır. Bu uç nokta ile robotun terminal günlüklerinin anlık kaydını almasını tetikleyebilirsiniz. Kayıt robotta saklanır ve destek ekibi sorun gidermek için bu kayda erişebilir. İsteğe bağlı olarak tanılama yüklemesi için bir açıklama ekleyebilirsiniz.

POST
/ui/snapshot

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonOptional
descriptionDescription

Tanılama kaydı için isteğe bağlı açıklama.

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

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