Programmatic Access
Personal Access Token
In order to configure programmatic access to your Roboto account, you can create an access token.
Login to your Roboto account, and follow these instructions:
- Navigate to the Tokens tab on the Settings page.
- Fill out the Create a new access token section and click Create.
You will see a modal window appear with your new token. Save it to ~/.roboto/config.json on your machine. You will not be able to see it again.
Your ~/.roboto/config.json file should look like this:
{
"version": "v1",
"profiles": {
"prod": {
"api_key": "robo_pat_123456789"
}
},
"default_profile": "prod"
}
You can then install the Roboto SDK & CLI to interact with your account programmatically.
Restricting a Token
A token you create in the web app can do everything your account can. When a token goes somewhere you trust less, such as a script that only uploads data, you can restrict it with API scopes when you create it through the SDK:
datasets.create: create datasets.files.uploadandfiles.import: add files to datasets, by uploading them or importing them from your own storage.api.everything_else: every other endpoint.
A token holding all four scopes, or created without any, is unrestricted.
from roboto.auth.scope import ApiScope
from roboto.domain.tokens import Token
token, secret = Token.create(
name="uploader",
api_scopes=ApiScope.minimal_uploader(),
)
Some endpoints, such as AI chat, accept only unrestricted tokens. The REST API reference lists the scopes each endpoint needs under “Access control”. A restricted token cannot create a token that may do more than it can, and its scopes never give it more than your account itself may do.
Device Access Token
Access tokens for robots and other entities can be provisioned using the instructions in Devices.
SDK & CLI
The Roboto SDK is a Python library that provides access to Roboto. The CLI is distributed separately as a standalone binary; in a Python environment with the SDK installed, it can also be run as python -m roboto.cli.
Learn more at SDK & CLI and refer to the latest installation instructions available on GitHub.
REST API
The Roboto REST API is a JSON API that also provides programmatic access to Roboto.
See reference documentation for the REST API.