Skip to content

Skills API

Requires JWT with access_level: ENCHANTER or ADMIN.

Upload Skill

  • Endpoint: /api/{{ API_VERSION }}/skill/upload/
  • Function: Upload a .py skill (optionally prefixed disabled.).
  • Method: POST
  • Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/upload/" \
  -H "Authorization: Bearer <token>" \
  -F "skill=@/path/to/skill.py"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/upload/"
headers = {"Authorization": "Bearer <token>"}
files = {"skill": open("/path/to/skill.py","rb")}
resp = requests.post(url, headers=headers, files=files)
print(resp.json())

Remove Skill

  • Endpoint: /api/{{ API_VERSION }}/skill/remove/
  • Function: Delete a skill file.
  • Method: DELETE
  • Shell Command:
curl -X DELETE "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/remove/?skill_name=skill.py" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/remove/"
headers = {"Authorization": "Bearer <token>"}
params = {"skill_name":"skill.py"}
resp = requests.delete(url, params=params, headers=headers)
print(resp.json())

List Skills

  • Endpoint: /api/{{ API_VERSION }}/skill/list/
  • Function: List all uploaded skills.
  • Method: GET
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/list/" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/list/"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())

Enable/Disable Skill

  • Endpoint: /api/{{ API_VERSION }}/skill/enable/
  • Function: Enable or disable a skill.
  • Method: PATCH
  • Shell Command:
curl -X PATCH "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/enable/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"skill.py","value":true}'
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/enable/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"skill.py","value":True}
resp = requests.patch(url, json=data, headers=headers)
print(resp.json())

Download Skill

  • Endpoint: /api/{{ API_VERSION }}/skill/download/{skill_name}
  • Function: Download a skill file.
  • Method: GET
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/download/skill.py" \
  -H "Authorization: Bearer <token>" --output skill.py
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/download/skill.py"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
with open("skill.py","wb") as f:
    f.write(resp.content)
print("Downloaded")

Rename Skill

  • Endpoint: /api/{{ API_VERSION }}/skill/rename/
  • Function: Rename a skill file.
  • Method: PATCH
  • Shell Command:
curl -X PATCH "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/rename/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"old_name":"foo.py","new_name":"bar.py"}'
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/skill/rename/"
headers = {"Authorization": "Bearer <token>"}
data = {"old_name":"foo.py","new_name":"bar.py"}
resp = requests.patch(url, json=data, headers=headers)
print(resp.json())