Commands Mapping
Total endpoints: 14
Example base URL: https://<ROBOT_IP>/rest
Required access for this section: USER
Add New Location
- Endpoint:
/api/v2/commands/add_new_location/ - Function: Execute the
add_new_locationcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,DictValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/add_new_location/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": {"key": "value"}}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/add_new_location/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': {'key': 'value'}}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Stop Map Recording
- Endpoint:
/api/v2/commands/stop_map_recording/ - Function: Start a mission that stops the active Travel map recording; the stopped command resolves through its own
CANCELEDfeedback. - Method:
POST - Parameters: none
- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/stop_map_recording/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/stop_map_recording/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
{
"command": {
"command": "stop_map_recording"
},
"result": {
"called": true,
"msg": "<mission-id>"
}
}
Reset Map
- Endpoint:
/api/v2/commands/reset_map/ - Function: Start a mission that restarts the current mapping session, discarding the map and recording built so far.
- Method:
POST - Parameters: none
- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/reset_map/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/reset_map/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Delete Location
- Endpoint:
/api/v2/commands/delete_location/ - Function: Execute the
delete_locationcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,StrValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/delete_location/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": "example"}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/delete_location/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': 'example'}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Delete Map
- Endpoint:
/api/v2/commands/delete_map/ - Function: Execute the
delete_mapcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,StrValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/delete_map/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": "example"}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/delete_map/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': 'example'}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Get Active Map Id
- Endpoint:
/api/v2/commands/get_active_map_id/ - Function: Execute the
get_active_map_idcommand through the v2 command bridge. - Method:
GET - Parameters: none
- Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/commands/get_active_map_id/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/get_active_map_id/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Get Current Request Id
- Endpoint:
/api/v2/commands/get_current_request_id/ - Function: Execute the
get_current_request_idcommand through the v2 command bridge. - Method:
GET - Parameters: none
- Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/commands/get_current_request_id/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/get_current_request_id/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Get Travel Cmd Feedback
- Endpoint:
/api/v2/commands/get_travel_cmd_feedback/ - Function: Execute the
get_travel_cmd_feedbackcommand through the v2 command bridge. - Method:
GET - Parameters: none
- Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/commands/get_travel_cmd_feedback/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/get_travel_cmd_feedback/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Load Map And Relocalize
- Endpoint:
/api/v2/commands/load_map_and_relocalize/ - Function: Execute the
load_map_and_relocalizecommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,StrValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/load_map_and_relocalize/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": "example"}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/load_map_and_relocalize/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': 'example'}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Maps List
- Endpoint:
/api/v2/commands/maps_list/ - Function: Execute the
maps_listcommand through the v2 command bridge. - Method:
GET - Parameters: none
- Shell Command:
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/maps_list/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Save Current Location
- Endpoint:
/api/v2/commands/save_current_location/ - Function: Execute the
save_current_locationcommand through the v2 command bridge. - Method:
POST - Parameters: none
- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/save_current_location/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/save_current_location/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Save Map
- Endpoint:
/api/v2/commands/save_map/ - Function: Execute the
save_mapcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,DictValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/save_map/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": {"key": "value"}}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/save_map/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': {'key': 'value'}}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Start Map Recording
- Endpoint:
/api/v2/commands/start_map_recording/ - Function: Execute the
start_map_recordingcommand through the v2 command bridge. - Method:
POST - Parameters: none
- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/start_map_recording/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/start_map_recording/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Update Location
- Endpoint:
/api/v2/commands/update_location/ - Function: Execute the
update_locationcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,DictValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/update_location/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": {"key": "value"}}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/update_location/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': {'key': 'value'}}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.