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.
Response Body
Successful Response
responseRequiredResponse Get Targets Api V1 Targets Getcurl -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.
Request Body
application/jsonRequirednameRequiredNameThe name of the target.
1siteRequiredSiteThe site where the target is located.
1floorRequiredFloorThe floor where the target is located.
1egRequiredEgThe entry point of the target.
eg_dirRequiredEg DirThe direction of the entry point.
use_current_positionUse Current PositionIf True, the current position of the robot will be used as the target position.
falsepxPxThe x coordinate of the target in meters.
0pyPyThe y coordinate of the target in meters.
0yaw_degYaw DegThe yaw angle of the target in degrees.
0tolTolThe tolerance for reaching the target in meters.
0.5typeTypeThe type of the target (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).
"target"labelstring | null | nullcidCidThe unique identifier of the target, if any.
""Response Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullValidation Error
detailDetailcurl -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.
Path Parameters
siteRequiredSiteResponse Body
Successful Response
responseRequiredResponse Get Targets By Site Api V1 Targets Site GetNo targets found for the specified site.
Validation Error
detailDetailcurl -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.
Path Parameters
siteRequiredSitefloorRequiredFloorResponse Body
Successful Response
responseRequiredResponse Get Targets By Site And Floor Api V1 Targets Site Floor GetNo targets found for the specified site and floor.
Validation Error
detailDetailcurl -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.
Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Successful Response
nameRequiredNameThe name of the target.
1uidRequiredUidThe unique identifier of the target.
1site_floorSiteFloorModelThe site and floor of the target.
egEgThe entry point of the target.
""eg_dirEg DirThe direction of the entry point.
""pxnumber | null | nullpynumber | null | nullyaw_degnumber | null | nulltolTolThe tolerance for reaching the target in meters.
0.5typeTypeThe type of the target('default','charge','waiting','filling','delivery','target','unloading','table','escape','tag').
"default='default'"labelstring | null | nullcidCidThe unique identifier of the target, if any.
""Target not found for the specified site, floor, and name.
Validation Error
detailDetailcurl -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.
Request Body
application/jsonRequirednameRequiredNameThe name of the target.
1siteRequiredSiteThe site where the target is located.
1floorRequiredFloorThe floor where the target is located.
1egRequiredEgThe entry point of the target.
eg_dirRequiredEg DirThe direction of the entry point.
use_current_positionUse Current PositionIf True, the current position of the robot will be used as the target position.
falsepxPxThe x coordinate of the target in meters.
0pyPyThe y coordinate of the target in meters.
0yaw_degYaw DegThe yaw angle of the target in degrees.
0tolTolThe tolerance for reaching the target in meters.
0.5typeTypeThe type of the target (default, charge, waiting, filling, delivery, target, unloading, table, escape, tag).
"target"labelstring | null | nullcidCidThe unique identifier of the target, if any.
""Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullValidation Error
detailDetailcurl -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.
Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Successful Response
status_codeStatus CodeHTTP status code of the response.
200successSuccessIndicates whether the operation was successful.
truemessageMessageA message providing additional information about the operation.
""dataobject | null | nullerrorobject | null | nullValidation Error
detailDetailcurl -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"
}
]
}