REST
Connect your own software to the Product API.
Every Captic device hosts the Product API, a local REST API that exposes everything you can do in the Product UI, and more. Use it when you want full flexibility or a tight integration with your own software.
You send HTTP requests and get JSON responses back.
API
http://[device-ip]:5004
API documentation
http://[serial-number].local:3000/api/docs
API documentation
The full, interactive API documentation, with every endpoint, payload and response schema, is served by the device itself. It always matches the software version running on that device, and you can try requests directly from your browser.
Open it on a computer on the same network as the device:
http://[serial-number].local:3000/api/docsExample (Python)
This example starts a vision job, fetches its result and extracts the pose:
import requests
HOST = "http://[device-ip]:5004"
def run_vision_job():
# start a job on the depalletizer pipeline
response = requests.post(f"{HOST}/api/v1/runs/", json={"pipeline_id": "depal"})
run_id = response.json()["run_id"]
# fetch the result
result = requests.get(f"{HOST}/api/v1/runs/{run_id}").json()["result"]
return {axis: result[axis] for axis in ("x", "y", "z", "a", "b", "c")}
run_vision_job()The pipeline ID and result fields depend on your product. Check the API documentation on your device for the exact names.
Last updated