Robot Dokümantasyonu

Haritalama API

Robot haritalarını yönetin, haritalama işlemlerini başlatın ve konumlandırma işlemlerini yürütün.

Kullanılabilir haritaların listesini alma

Robotun kullanabileceği haritaların (katların) listesini döndürür. Her harita, site ve kat bilgisiyle gösterilir.

GET
/mapping

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

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

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

print(response.text)
[
  {
    "site": "",
    "name": "",
    "title": "",
    "elev_groups_default": "",
    "elev_groups": "[]",
    "has_map": false
  }
]

Robotun varsayılan haritasını alma

Robotun varsayılan haritasını döndürür. Bu uç nokta, robotun şu anda varsayılan harita olarak kullanacak şekilde ayarlandığı site ve katı döndürür.

GET
/mapping/default-map

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

siteSite

Hedefin bulunduğu site.

Default: ""
floorFloor

Hedefin bulunduğu kat.

Default: ""

Yapılandırmada varsayılan site ve kat bilgisi ayarlanmamış.

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

  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/mapping/default-map"

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

print(response.text)
{
  "site": "site",
  "floor": "floor"
}
{
  "status_code": 400,
  "success": false,
  "message": "Default site and floor information is not set in the configuration.",
  "error": {
    "code": "DEFAULT_MAP_ERROR",
    "message": "Default site and floor information is not set in the configuration."
  }
}

Robotun varsayılan haritasını ayarlama

Robotun varsayılan haritasını ayarlar. Bu uç nokta ile robotun navigasyon ve haritalama için kullanacağı varsayılan site ve katı belirtebilirsiniz.

POST
/mapping/default-map

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
siteSite

Hedefin bulunduğu site.

Default: ""
floorFloor

Hedefin bulunduğu kat.

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

Varsayılan harita ayarlanamadı

Doğrulama hatası

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

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

Robotun güncel haritasını base64 kodlu olarak alma

Robotun güncel haritasını base64 kodlu PNG biçiminde döndürür. Harita; site ve kat bilgisini, çözünürlüğü, boyutları ve başlangıç noktası (origin) koordinatlarını içerir.

GET
/mapping/map

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

site_floorSiteFloorModel

Haritanın site ve katı.

resolutionRequiredResolution

Haritanın metre/piksel cinsinden çözünürlüğü.

widthRequiredWidth

Haritanın piksel cinsinden genişliği.

heightRequiredHeight

Haritanın piksel cinsinden yüksekliği.

originVector3

Haritanın robotun koordinat sistemindeki başlangıç noktası (origin).

map_png_base64RequiredMap Png Base64

Haritanın base64 kodlu PNG görüntüsü.

Minimum length: 1

Yapılandırmada varsayılan site ve kat bilgisi ayarlanmamış.

Harita işlenirken sunucu iç hatası oluştu

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

  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/mapping/map"

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

print(response.text)
{
  "site_floor": {
    "floor": "floor",
    "site": "site"
  },
  "resolution": 0.05,
  "width": 1024,
  "height": 1024,
  "origin": {
    "x": 0,
    "y": 0,
    "z": 0
  },
  "map_png_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "status_code": 400,
  "success": false,
  "message": "Default site and floor information is not set in the configuration.",
  "error": {
    "code": "DEFAULT_MAP_ERROR",
    "message": "Default site and floor information is not set in the configuration."
  }
}
{
  "status_code": 500,
  "success": false,
  "message": "Internal server error during map processing",
  "error": {
    "code": "MAP_PROCESSING_ERROR",
    "message": "Internal server error during map processing"
  }
}

Robotun seçili haritasını base64 kodlu olarak alma

Robotun belirli bir site ve kat için seçili haritasını base64 kodlu PNG biçiminde döndürür. Harita; çözünürlüğü, boyutları, başlangıç noktası (origin) koordinatlarını ve base64 kodlu harita görüntüsünü içerir.

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

site_floorSiteFloorModel

Haritanın site ve katı.

resolutionRequiredResolution

Haritanın metre/piksel cinsinden çözünürlüğü.

widthRequiredWidth

Haritanın piksel cinsinden genişliği.

heightRequiredHeight

Haritanın piksel cinsinden yüksekliği.

originVector3

Haritanın robotun koordinat sistemindeki başlangıç noktası (origin).

map_png_base64RequiredMap Png Base64

Haritanın base64 kodlu PNG görüntüsü.

Minimum length: 1

Doğrulama hatası

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

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

print(response.text)
{
  "site_floor": {
    "floor": "floor",
    "site": "site"
  },
  "resolution": 0.05,
  "width": 1024,
  "height": 1024,
  "origin": {
    "x": 0,
    "y": 0,
    "z": 0
  },
  "map_png_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Robotun seçili haritasını silme

Robotun belirli bir site ve kat için seçili haritasını siler. Bu uç nokta ile belirli bir site ve kat kombinasyonunun harita verilerini kaldırabilirsiniz.

DELETE
/mapping/{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

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

Haritalama işlemini başlatma

Robot için haritalama işlemini başlatır. Bu uç nokta ile haritalamayı belirtilen site, kat, başlık ve robotun haritası olup olmadığı bilgisiyle başlatabilirsiniz.

POST
/mapping/start

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
site_floorSiteFloorModel

Haritalamanın site ve katı.

titleTitle

Haritalamanın başlığı.

Default: ""Minimum length: 1
has_mapHas Map
Default: false

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/mapping/start" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "title": "site_floor",
    "has_map": false
  }'
const body = JSON.stringify({
  "site_floor": {
    "site": "site",
    "floor": "floor"
  },
  "title": "site_floor",
  "has_map": false
})

fetch("https://robots.saharobotik.com/api/v1/YOUR_ROBOT_ID/robot/mapping/start", {
  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/mapping/start"
  body := strings.NewReader(`{
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "title": "site_floor",
    "has_map": false
  }`)
  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/mapping/start"
body = {
  "site_floor": {
    "site": "site",
    "floor": "floor"
  },
  "title": "site_floor",
  "has_map": false
}
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"
    }
  ]
}

Devam eden haritalama işlemini iptal etme

Robotun devam eden haritalama işlemini iptal eder. Bu uç nokta ile devam eden haritalamayı durdurabilir ve geçici verileri temizleyebilirsiniz.

POST
/mapping/cancel

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

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

  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/mapping/cancel"

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"
  }
}

Robotun güncel haritasını değiştirme

Robotun güncel haritasını yeni bir site ve kata geçirir. Bu uç nokta ile robotun güncel haritasını farklı bir site ve kata değiştirebilirsiniz.

POST
/mapping/change

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
siteSite

Hedefin bulunduğu site.

Default: ""
floorFloor

Hedefin bulunduğu kat.

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

Harita değiştirilemedi

Doğrulama hatası

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

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

Yeniden haritalama işlemini başlatma

Robot için yeniden haritalama işlemini başlatır. Bu uç nokta ile yeniden haritalamayı belirtilen site ve katla başlatabilirsiniz.

POST
/mapping/remap

Authorization

x-api-key<token>

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

In: header

Request Body

application/jsonRequired
siteSite

Hedefin bulunduğu site.

Default: ""
floorFloor

Hedefin bulunduğu kat.

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

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

Robotun güncel haritasını kaydetme

Robotun güncel haritasını kaydeder. Bu uç nokta ile site ve kat bilgisi dahil güncel harita verilerini kaydedebilirsiniz.

POST
/mapping/save

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

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

  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/mapping/save"

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"
  }
}