Robot Documentations

Targets API

Manage navigation targets and waypoints for the robot.

Get the list of all targets of the robot

Retrieve the list of all targets of the robot. This endpoint returns all targets with their site, floor, and name information.

GET
/api/v1/targets

Response Body

Successful Response

responseRequiredResponse Get Targets Api V1 Targets Get
curl -X GET "http://localhost:7242/api/v1/targets"
fetch("http://localhost:7242/api/v1/targets")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/targets"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/targets"

response = requests.request("GET", url)

print(response.text)
[
  {
    "name": "string",
    "uid": "string",
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "eg": "eg_name",
    "eg_dir": "eg_direction",
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "default",
    "label": "{}",
    "cid": ""
  }
]

Add a new target to the robot

Add a new target to the robot. This endpoint allows you to create a new target with specific site, floor, and name. You can also specify whether to use the current position as the target.

POST
/api/v1/targets

Request Body

application/jsonRequired
nameRequiredName

The name of the target.

Minimum length: 1
siteRequiredSite

The site where the target is located.

Minimum length: 1
floorRequiredFloor

The floor where the target is located.

Minimum length: 1
egRequiredEg

The entry point of the target.

eg_dirRequiredEg Dir

The direction of the entry point.

use_current_positionUse Current Position

If True, the current position of the robot will be used as the target position.

Default: false
pxPx

The x coordinate of the target in meters.

Default: 0
pyPy

The y coordinate of the target in meters.

Default: 0
yaw_degYaw Deg

The yaw angle of the target in degrees.

Default: 0
tolTol

The tolerance for reaching the target in meters.

Default: 0.5
typeType

The type of the target (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).

Default: "target"
labelstring | null | null
cidCid

The unique identifier of the target, if any.

Default: ""

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Validation Error

detailDetail
curl -X POST "http://localhost:7242/api/v1/targets" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }'
const body = JSON.stringify({
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
})

fetch("http://localhost:7242/api/v1/targets", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:7242/api/v1/targets"
  body := strings.NewReader(`{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }`)
  req, _ := http.NewRequest("POST", url, body)
  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 = "http://localhost:7242/api/v1/targets"
body = {
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
}
response = requests.request("POST", url, json = body, headers = {
  "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"
    }
  ]
}

Get the list of targets by site

Retrieve the list of targets filtered by site. This endpoint returns all targets that match the specified site.

GET
/api/v1/targets/{site}

Path Parameters

siteRequiredSite

Response Body

Successful Response

responseRequiredResponse Get Targets By Site Api V1 Targets Site Get

No targets found for the specified site.

Validation Error

detailDetail
curl -X GET "http://localhost:7242/api/v1/targets/string"
fetch("http://localhost:7242/api/v1/targets/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/targets/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/targets/string"

response = requests.request("GET", url)

print(response.text)
[
  {
    "name": "string",
    "uid": "string",
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "eg": "eg_name",
    "eg_dir": "eg_direction",
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "default",
    "label": "{}",
    "cid": ""
  }
]
{
  "status_code": 404,
  "success": false,
  "message": "No targets found for the specified site.",
  "error": {
    "code": "TARGETS_NOT_FOUND",
    "message": "No targets found for the specified site."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get the list of targets filtered by site and floor

Retrieve the list of targets filtered by site and floor. This endpoint returns all targets that match the specified site and floor.

GET
/api/v1/targets/{site}/{floor}

Path Parameters

siteRequiredSite
floorRequiredFloor

Response Body

Successful Response

responseRequiredResponse Get Targets By Site And Floor Api V1 Targets Site Floor Get

No targets found for the specified site and floor.

Validation Error

detailDetail
curl -X GET "http://localhost:7242/api/v1/targets/string/string"
fetch("http://localhost:7242/api/v1/targets/string/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/targets/string/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/targets/string/string"

response = requests.request("GET", url)

print(response.text)
[
  {
    "name": "string",
    "uid": "string",
    "site_floor": {
      "site": "site",
      "floor": "floor"
    },
    "eg": "eg_name",
    "eg_dir": "eg_direction",
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "default",
    "label": "{}",
    "cid": ""
  }
]
{
  "status_code": 404,
  "success": false,
  "message": "No targets found for the specified site and floor.",
  "error": {
    "code": "TARGETS_NOT_FOUND",
    "message": "No targets found for the specified site and floor."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get a specific target by site, floor, and name

Retrieve a specific target by its site, floor, and name. This endpoint returns the target information if it exists, otherwise it raises a 404 error.

GET
/api/v1/targets/{site}/{floor}/{name}

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Successful Response

nameRequiredName

The name of the target.

Minimum length: 1
uidRequiredUid

The unique identifier of the target.

Minimum length: 1
site_floorSiteFloorModel

The site and floor of the target.

egEg

The entry point of the target.

Default: ""
eg_dirEg Dir

The direction of the entry point.

Default: ""
pxnumber | null | null
pynumber | null | null
yaw_degnumber | null | null
tolTol

The tolerance for reaching the target in meters.

Default: 0.5
typeType

The type of the target('default','charge','waiting','filling','delivery','target','unloading','table','escape','tag').

Default: "default='default'"
labelstring | null | null
cidCid

The unique identifier of the target, if any.

Default: ""

Target not found for the specified site, floor, and name.

Validation Error

detailDetail
curl -X GET "http://localhost:7242/api/v1/targets/string/string/string"
fetch("http://localhost:7242/api/v1/targets/string/string/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/targets/string/string/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/targets/string/string/string"

response = requests.request("GET", url)

print(response.text)
{
  "name": "string",
  "uid": "string",
  "site_floor": {
    "site": "site",
    "floor": "floor"
  },
  "eg": "eg_name",
  "eg_dir": "eg_direction",
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "default",
  "label": "{}",
  "cid": ""
}
{
  "status_code": 404,
  "success": false,
  "message": "Target not found for the specified site, floor, and name.",
  "error": {
    "code": "TARGET_NOT_FOUND",
    "message": "Target not found for the specified site, floor, and name."
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update a specific target by site, floor, and name

Update a specific target by its site, floor, and name. This endpoint allows you to modify the target's information, including whether to use the current position as the target.

PATCH
/api/v1/targets/{site}/{floor}/{name}

Request Body

application/jsonRequired
nameRequiredName

The name of the target.

Minimum length: 1
siteRequiredSite

The site where the target is located.

Minimum length: 1
floorRequiredFloor

The floor where the target is located.

Minimum length: 1
egRequiredEg

The entry point of the target.

eg_dirRequiredEg Dir

The direction of the entry point.

use_current_positionUse Current Position

If True, the current position of the robot will be used as the target position.

Default: false
pxPx

The x coordinate of the target in meters.

Default: 0
pyPy

The y coordinate of the target in meters.

Default: 0
yaw_degYaw Deg

The yaw angle of the target in degrees.

Default: 0
tolTol

The tolerance for reaching the target in meters.

Default: 0.5
typeType

The type of the target (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).

Default: "target"
labelstring | null | null
cidCid

The unique identifier of the target, if any.

Default: ""

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Validation Error

detailDetail
curl -X PATCH "http://localhost:7242/api/v1/targets/string/string/string" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }'
const body = JSON.stringify({
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
})

fetch("http://localhost:7242/api/v1/targets/string/string/string", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "http://localhost:7242/api/v1/targets/string/string/string"
  body := strings.NewReader(`{
    "name": "string",
    "site": "string",
    "floor": "string",
    "eg": "string",
    "eg_dir": "string",
    "use_current_position": false,
    "px": 0,
    "py": 0,
    "yaw_deg": 0,
    "tol": 0.5,
    "type": "target",
    "label": "{}",
    "cid": ""
  }`)
  req, _ := http.NewRequest("PATCH", url, body)
  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 = "http://localhost:7242/api/v1/targets/string/string/string"
body = {
  "name": "string",
  "site": "string",
  "floor": "string",
  "eg": "string",
  "eg_dir": "string",
  "use_current_position": false,
  "px": 0,
  "py": 0,
  "yaw_deg": 0,
  "tol": 0.5,
  "type": "target",
  "label": "{}",
  "cid": ""
}
response = requests.request("PATCH", url, json = body, headers = {
  "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"
    }
  ]
}

Delete a specific target by site, floor, and name

Delete a specific target by its site, floor, and name. This endpoint allows you to remove a target from the robot's configuration.

DELETE
/api/v1/targets/{site}/{floor}/{name}

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Successful Response

status_codeStatus Code

HTTP status code of the response.

Default: 200
successSuccess

Indicates whether the operation was successful.

Default: true
messageMessage

A message providing additional information about the operation.

Default: ""
dataobject | null | null
errorobject | null | null

Validation Error

detailDetail
curl -X DELETE "http://localhost:7242/api/v1/targets/string/string/string"
fetch("http://localhost:7242/api/v1/targets/string/string/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:7242/api/v1/targets/string/string/string"

  req, _ := http.NewRequest("DELETE", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:7242/api/v1/targets/string/string/string"

response = requests.request("DELETE", url)

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