Attma Logo
    Attma
    Resources

    Get started

    • Get started with Attma
    • Set up a workspace
    • Connect external services
    • Troubleshoot a workspace

    Products

    • Upload, find, and share files
    • Build a sample sheet
    • Launch and monitor a workflow
    • Start a compute Pod
    • Create charts, notebooks, and Apps
    • Curate a single-cell dataset
    • Use Attma Agents
    • Review a research case
    • Protect workspace data

    Developers

    • API, CLI, and Python quickstart
    Guide index for AI tools

    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 an LPath with a child name, and iterdir() to list immediate children.
    • Read metadata with name(), node_id(), type(), size(), size_recursive(), content_type(), and version_id(). These methods fetch metadata when needed. Call fetch_metadata() to refresh it.
    • Use exists() or is_dir() to check a path. Handle AttmaPathError when an operation fails.
    • Use download(), upload_from(), and copy_to() for transfers. Directory operations include mkdirp() and the recursive delete method rmr().

    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.

    Read as Markdown

    Product guidesDeveloper quickstartFrequently asked questionsPrivacy PolicyNotice to European UsersTerms of Service