Cruise API
Configure and manage cruise routes for autonomous operation.
Get the default cruise route for the robot
Retrieve the default cruise route for the robot. This endpoint returns the route that the robot will follow during its cruise operations.
Response Body
Successful Response
routeRouteThe name of the route to be set for the robot.
""curl -X GET "http://localhost:7242/api/v1/config/default-route"fetch("http://localhost:7242/api/v1/config/default-route")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/config/default-route"
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/config/default-route"
response = requests.request("GET", url)
print(response.text){
"route": "route_1"
}Set the default cruise route for the robot
Set the default cruise route for the robot. This endpoint allows you to specify the default route that the robot should follow during its cruise operations.
Request Body
application/jsonRequiredrouteRouteThe name of the route to be set for the robot.
""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/config/default-route" \
-H "Content-Type: application/json" \
-d '{
"route": "route_1"
}'const body = JSON.stringify({
"route": "route_1"
})
fetch("http://localhost:7242/api/v1/config/default-route", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "http://localhost:7242/api/v1/config/default-route"
body := strings.NewReader(`{
"route": "route_1"
}`)
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/config/default-route"
body = {
"route": "route_1"
}
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 all cruises of the robot
Retrieve the list of all cruises of the robot. This endpoint returns all cruises with their site, floor, and name information.
Response Body
Successful Response
responseRequiredResponse Get Cruise List Api V1 Cruises Getcurl -X GET "http://localhost:7242/api/v1/cruises"fetch("http://localhost:7242/api/v1/cruises")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/cruises"
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/cruises"
response = requests.request("GET", url)
print(response.text)[
{
"name": "Cruise 1",
"waypoints": [
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 1",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-1",
"yaw_deg": 0
},
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 2",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-2",
"yaw_deg": 0
}
],
"site_floor": {
"floor": "floor",
"site": "site"
}
}
]Add a new cruise to the robot
Add a new cruise to the robot. This endpoint allows you to create a new cruise with specific site, floor, name, and waypoints. You must provide at least one waypoint for the cruise to be valid.
Request Body
application/jsonRequirednameRequiredNameThe name of the cruise.
1waypointsWaypointsList of waypoint UIDs in the cruise.
siteRequiredSiteThe site where the cruise is located.
1floorRequiredFloorThe floor where the cruise is located.
1Response 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/cruises" \
-H "Content-Type: application/json" \
-d '{
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
}'const body = JSON.stringify({
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
})
fetch("http://localhost:7242/api/v1/cruises", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "http://localhost:7242/api/v1/cruises"
body := strings.NewReader(`{
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
}`)
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/cruises"
body = {
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
}
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"
}
]
}Start a cruise on the robot
Start a cruise on the robot. This endpoint allows you to initiate a cruise with a specific site, floor, name, and waypoints.
Request Body
application/jsonRequiredcruise_cmdRequiredCruise CmdThe command to control the cruise (e.g., 'CMD_START, CMD_STOP).
cruise_routeCruise RouteThe name of the cruise route to be controlled. If empty uses default route.
""number_of_roundsNumber Of RoundsThe number of rounds to perform in the cruise.
1Response 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/cruises/control" \
-H "Content-Type: application/json" \
-d '{
"cruise_cmd": "CMD_START",
"cruise_route": "route_1",
"number_of_rounds": 1
}'const body = JSON.stringify({
"cruise_cmd": "CMD_START",
"cruise_route": "route_1",
"number_of_rounds": 1
})
fetch("http://localhost:7242/api/v1/cruises/control", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "http://localhost:7242/api/v1/cruises/control"
body := strings.NewReader(`{
"cruise_cmd": "CMD_START",
"cruise_route": "route_1",
"number_of_rounds": 1
}`)
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/cruises/control"
body = {
"cruise_cmd": "CMD_START",
"cruise_route": "route_1",
"number_of_rounds": 1
}
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 cruises by site
Retrieve the list of cruises filtered by site. This endpoint returns all cruises that match the specified site.
Path Parameters
siteRequiredSiteResponse Body
Successful Response
responseRequiredResponse Get Cruise By Site Api V1 Cruises Site GetNo cruises found for the specified site.
Validation Error
detailDetailcurl -X GET "http://localhost:7242/api/v1/cruises/string"fetch("http://localhost:7242/api/v1/cruises/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/cruises/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/cruises/string"
response = requests.request("GET", url)
print(response.text)[
{
"name": "Cruise 1",
"waypoints": [
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 1",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-1",
"yaw_deg": 0
},
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 2",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-2",
"yaw_deg": 0
}
],
"site_floor": {
"floor": "floor",
"site": "site"
}
}
]{
"status_code": 404,
"success": false,
"message": "No cruises found for the specified site.",
"error": {
"code": "CRUISES_NOT_FOUND",
"message": "No cruises found for the specified site."
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get the list of cruises filtered by site and floor
Retrieve the list of cruises filtered by site and floor. This endpoint returns all cruises that match the specified site and floor.
Path Parameters
siteRequiredSitefloorRequiredFloorResponse Body
Successful Response
responseRequiredResponse Get Cruise By Site And Floor Api V1 Cruises Site Floor GetNo cruises found for the specified site and floor.
Validation Error
detailDetailcurl -X GET "http://localhost:7242/api/v1/cruises/string/string"fetch("http://localhost:7242/api/v1/cruises/string/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/cruises/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/cruises/string/string"
response = requests.request("GET", url)
print(response.text)[
{
"name": "Cruise 1",
"waypoints": [
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 1",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-1",
"yaw_deg": 0
},
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 2",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-2",
"yaw_deg": 0
}
],
"site_floor": {
"floor": "floor",
"site": "site"
}
}
]{
"status_code": 404,
"success": false,
"message": "No cruises found for the specified site and floor.",
"error": {
"code": "CRUISES_NOT_FOUND",
"message": "No cruises found for the specified site and floor."
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get a specific cruise by site, floor, and name
Retrieve a specific cruise by its site, floor, and name. This endpoint returns the cruise information if it exists, otherwise it raises a 404 error.
Path Parameters
siteRequiredSitefloorRequiredFloornameRequiredNameResponse Body
Successful Response
nameRequiredNameThe name of the cruise.
1waypointsWaypointsList of waypoints in the cruise.
site_floorSiteFloorModelThe site and floor of the cruise.
Cruise not found for the specified site, floor, and name.
Validation Error
detailDetailcurl -X GET "http://localhost:7242/api/v1/cruises/string/string/string"fetch("http://localhost:7242/api/v1/cruises/string/string/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/cruises/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/cruises/string/string/string"
response = requests.request("GET", url)
print(response.text){
"name": "Cruise 1",
"waypoints": [
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 1",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-1",
"yaw_deg": 0
},
{
"cid": "",
"eg": "",
"eg_dir": "",
"label": "{}",
"name": "Waypoint 2",
"px": 0,
"py": 0,
"site_floor": {
"floor": "floor",
"site": "site"
},
"tol": 0.5,
"type": "default='default'",
"uid": "site_floor_target-2",
"yaw_deg": 0
}
],
"site_floor": {
"floor": "floor",
"site": "site"
}
}{
"status_code": 404,
"success": false,
"message": "Cruise not found for the specified site, floor, and name.",
"error": {
"code": "CRUISE_NOT_FOUND",
"message": "Cruise not found for the specified site, floor, and name."
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Update a specific cruise by name
Update a specific cruise by its name. This endpoint allows you to modify the cruise's site, floor, name, and waypoints. You must provide at least one waypoint for the cruise to be valid.
Request Body
application/jsonRequirednameRequiredNameThe name of the cruise.
1waypointsWaypointsList of waypoint UIDs in the cruise.
siteRequiredSiteThe site where the cruise is located.
1floorRequiredFloorThe floor where the cruise is located.
1Path Parameters
nameRequiredNamesiteRequiredSitefloorRequiredFloorResponse 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/cruises/string/string/string" \
-H "Content-Type: application/json" \
-d '{
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
}'const body = JSON.stringify({
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
})
fetch("http://localhost:7242/api/v1/cruises/string/string/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "http://localhost:7242/api/v1/cruises/string/string/string"
body := strings.NewReader(`{
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
}`)
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/cruises/string/string/string"
body = {
"name": "Cruise 1",
"waypoints": [
"site_floor_target-1",
"site_floor_target-2"
],
"site": "site",
"floor": "floor"
}
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 cruise by name
Delete a specific cruise by its name. This endpoint allows you to remove a cruise from the robot's configuration. You must specify the site, floor, and name of the cruise to be deleted.
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/cruises/string/string/string"fetch("http://localhost:7242/api/v1/cruises/string/string/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:7242/api/v1/cruises/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/cruises/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"
}
]
}