Skip to content

Skill Files

Total endpoints: 6 Example base URL: https://<ROBOT_IP>/rest Required access for this section: ADMIN

Download Skill File

  • Endpoint: /api/v2/skill/download/{skill_name}
  • Function: Download skill file.
  • Method: GET
  • Parameters:
  • skill_name (path, str)
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/skill/download/example" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/v2/skill/download/example"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)

print(response.status_code)
print(response.json())
  • Response Example (200):
Status: 200
Content-Type: application/octet-stream
Body: Binary `.py` file content.

Enable Skill

  • Endpoint: /api/v2/skill/enable/
  • Function: Enable skill.
  • Method: PATCH
  • Parameters:
  • data (body, BoolCommand)
  • Shell Command:
curl -X PATCH "https://<ROBOT_IP>/rest/api/v2/skill/enable/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command": "example", "value": true}'
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/v2/skill/enable/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'command': 'example', 'value': True}
response = requests.patch(url, headers=headers, json=json_payload, timeout=10)

print(response.status_code)
print(response.json())
  • Response Example (200):
{
  "message": "Skill 'wave.py' enabled successfully."
}

Get Skills List

  • Endpoint: /api/v2/skill/list/
  • Function: Get skills list.
  • Method: GET
  • Parameters: none
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/skill/list/" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/v2/skill/list/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)

print(response.status_code)
print(response.json())
  • Response Example (200):
{
  "skills": [
    "wave.py",
    "disabled.demo.py"
  ]
}

Remove Skill

  • Endpoint: /api/v2/skill/remove/
  • Function: Remove skill.
  • Method: DELETE
  • Parameters:
  • skill_name (query, str)
  • Shell Command:
curl -X DELETE "https://<ROBOT_IP>/rest/api/v2/skill/remove/?skill_name=example" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/v2/skill/remove/"
headers = {"Authorization": "Bearer <token>"}
params = {'skill_name': 'example'}
response = requests.delete(url, headers=headers, params=params, timeout=10)

print(response.status_code)
print(response.json())
  • Response Example (200):
{
  "message": "Skill 'wave.py' removed successfully."
}

Rename Skill

  • Endpoint: /api/v2/skill/rename/
  • Function: Rename skill.
  • Method: PATCH
  • Parameters:
  • data (body, dict)
  • Shell Command:
curl -X PATCH "https://<ROBOT_IP>/rest/api/v2/skill/rename/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/v2/skill/rename/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'key': 'value'}
response = requests.patch(url, headers=headers, json=json_payload, timeout=10)

print(response.status_code)
print(response.json())
  • Response Example (200):
{
  "message": "Skill renamed successfully.",
  "old_name": "old.py",
  "new_name": "new.py"
}

Upload Skill File

  • Endpoint: /api/v2/skill/upload/
  • Function: Upload skill file.
  • Method: POST
  • Parameters:
  • skill (form-data, UploadFile). Default: UPLOAD_SKILL_FILE_PARAM
  • Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/skill/upload/" \
  -H "Authorization: Bearer <token>" \
  -F "skill=@/path/to/skill.py"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/v2/skill/upload/"
headers = {"Authorization": "Bearer <token>"}

with open("/path/to/skill.py", "rb") as f:
    files = {"skill": f}
    response = requests.post(url, headers=headers, files=files, timeout=10)

print(response.status_code)
print(response.json())
  • Response Example (200):
{
  "message": "Skill uploaded successfully.",
  "skill_name": "wave.py"
}