Robot Documentations

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.

GET
/api/v1/config/default-route

Response Body

Successful Response

routeRoute

The name of the route to be set for the robot.

Default: ""
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.

POST
/api/v1/config/default-route

Request Body

application/jsonRequired
routeRoute

The name of the route to be set for the robot.

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/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.

GET
/api/v1/cruises

Response Body

Successful Response

responseRequiredResponse Get Cruise List Api V1 Cruises Get
curl -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.

POST
/api/v1/cruises

Request Body

application/jsonRequired
nameRequiredName

The name of the cruise.

Minimum length: 1
waypointsWaypoints

List of waypoint UIDs in the cruise.

siteRequiredSite

The site where the cruise is located.

Minimum length: 1
floorRequiredFloor

The floor where the cruise is located.

Minimum length: 1

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/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.

POST
/api/v1/cruises/control

Request Body

application/jsonRequired
cruise_cmdRequiredCruise Cmd

The command to control the cruise (e.g., 'CMD_START, CMD_STOP).

cruise_routeCruise Route

The name of the cruise route to be controlled. If empty uses default route.

Default: ""
number_of_roundsNumber Of Rounds

The number of rounds to perform in the cruise.

Default: 1

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/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.

GET
/api/v1/cruises/{site}

Path Parameters

siteRequiredSite

Response Body

Successful Response

responseRequiredResponse Get Cruise By Site Api V1 Cruises Site Get

No cruises found for the specified site.

Validation Error

detailDetail
curl -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.

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

Path Parameters

siteRequiredSite
floorRequiredFloor

Response Body

Successful Response

responseRequiredResponse Get Cruise By Site And Floor Api V1 Cruises Site Floor Get

No cruises found for the specified site and floor.

Validation Error

detailDetail
curl -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.

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

Path Parameters

siteRequiredSite
floorRequiredFloor
nameRequiredName

Response Body

Successful Response

nameRequiredName

The name of the cruise.

Minimum length: 1
waypointsWaypoints

List of waypoints in the cruise.

site_floorSiteFloorModel

The site and floor of the cruise.

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

Validation Error

detailDetail
curl -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.

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

Request Body

application/jsonRequired
nameRequiredName

The name of the cruise.

Minimum length: 1
waypointsWaypoints

List of waypoint UIDs in the cruise.

siteRequiredSite

The site where the cruise is located.

Minimum length: 1
floorRequiredFloor

The floor where the cruise is located.

Minimum length: 1

Path Parameters

nameRequiredName
siteRequiredSite
floorRequiredFloor

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/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.

DELETE
/api/v1/cruises/{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/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"
    }
  ]
}