Start and stop
recording = machine.desktop.start_recording(name="demo")
machine.desktop.move(500, 500)
machine.desktop.click(500, 500)
finished = machine.desktop.stop_recording(recording.id)
print(finished.status, finished.file_size_bytes)
nullspace machine desktop recording start mch_123 --name demo
nullspace machine desktop move mch_123 500 500
nullspace machine desktop click mch_123 500 500
nullspace machine desktop recording stop mch_123 rec_456
curl -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/desktop/recording/start" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
-H "Content-Type: application/json" -d '{"name": "demo"}'
curl -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/desktop/recording/stop" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
-H "Content-Type: application/json" -d '{"recording_id": "rec_456"}'
List and inspect
for item in machine.desktop.list_recordings():
print(item.id, item.status, item.file_size_bytes)
info = machine.desktop.get_recording(recording.id)
print(info.file_path)
nullspace machine desktop recording list mch_123
nullspace machine desktop recording get mch_123 rec_456
curl "${NULLSPACE_API_URL}/v1/machines/mch_123/desktop/recording" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}"
curl "${NULLSPACE_API_URL}/v1/machines/mch_123/desktop/recording/rec_456" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}"
Download and delete
content = machine.desktop.download_recording(recording.id)
machine.desktop.download_recording(recording.id, local_path="./recording.mp4")
machine.desktop.delete_recording(recording.id)
nullspace machine desktop recording download mch_123 rec_456 -o ./recording.mp4
nullspace machine desktop recording delete mch_123 rec_456
curl "${NULLSPACE_API_URL}/v1/machines/mch_123/desktop/recording/rec_456/download" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
-o ./recording.mp4
curl -X DELETE "${NULLSPACE_API_URL}/v1/machines/mch_123/desktop/recording/rec_456" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}"