API, CLI, and Python quickstart
Make a read-only API request, use the Attma CLI, and work with workspace files from Python.
Obtain the CLI and SDK package for your deployment from Attma or your organization administrator. The web console and programmatic clients use your workspace permissions.
Make your first API request
Use the API base URL and workspace slug supplied by your Attma administrator. Set ATTMA_API_URL to that base URL, ATTMA_WORKSPACE to the workspace slug, and load an Attma bearer access token as ATTMA_TOKEN from your secret manager.
This request lists up to ten items in the workspace’s Data root. It reads metadata without downloading file contents.
curl --fail-with-body --silent --show-error --get \
"${ATTMA_API_URL%/}/api/v1/data/fs/${ATTMA_WORKSPACE}/ls" \
--header "Authorization: Bearer ${ATTMA_TOKEN}" \
--data-urlencode "path=/" \
--data-urlencode "limit=10"
The JSON response contains an items array. A 401 means the request needs a valid token. Check workspace access and the path if the requested folder is unavailable.
CLI quickstart
attma login
attma workspace ls
attma workspace use example-lab
attma ls attma:///
attma --json stat attma:///example.txt
attma:///example.txt resolves in the active workspace. attma://example-lab.account/example.txt names the workspace explicitly. Use attma --help or a command's --help to check the options available in your installed version.
Python Data quickstart
from attma.ldata import LPath
for item in LPath("attma:///").iterdir():
print(item.name())
Use a client with the same authorized workspace when acting on a path in a workflow. For downloads or file use that needs to be reproduced, keep the exact Data version ID.
- Use
/to join anLPathwith a child name, anditerdir()to list immediate children. - Read metadata with
name(),node_id(),type(),size(),size_recursive(),content_type(), andversion_id(). These methods fetch metadata when needed. Callfetch_metadata()to refresh it. - Use
exists()oris_dir()to check a path. HandleAttmaPathErrorwhen an operation fails. - Use
download(),upload_from(), andcopy_to()for transfers. Directory operations includemkdirp()and the recursive delete methodrmr().
Workflows API
Use the Workflows client or the CLI to discover installed definitions, submit runs, and inspect results. The workflow guide describes the run review, versioning, and troubleshooting behavior. A workflow must be installed and a compatible runner must be available before submission.
Keep API credentials in your secret manager. Send them only to the Attma endpoint your administrator supplies. Keep approval records and the immutable IDs you used when reproducing a run.