TextQL Sandcastles API
Manage Python sandbox environments for code execution
Operations 14
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which Python sandcastles are running in my TextQL organization?”
“Can I list only stopped sandboxes?”
Tell an agent
List sandcastles with status {status}.
Show the next {limit} sandcastles after cursor {cursor}.
Ask an LLM
“How do I spin up a fresh Python sandbox for running code?”
“Can I restart an existing sandcastle instead of creating a new one?”
Tell an agent
Start a new sandcastle.
Restart sandcastle {sandbox_id}.
Ask an LLM
“How much memory is my sandbox using right now?”
“Which dataframes are loaded in a sandcastle?”
Tell an agent
Get the status of sandcastle {id}.
Show memory usage and loaded dataframes for sandbox {id}.
Ask an LLM
“How do I shut down a sandcastle I'm done with?”
“Can I still read a sandbox's execution history after it is stopped?”
Tell an agent destructive · confirm first
Stop sandcastle {id}.
Destroy the running sandbox {id}.
Ask an LLM
“What code has been run in my sandcastle so far?”
“Does the execution log include SQL and bash runs as well as Python?”
Tell an agent
List executions in sandcastle {id}.
Show the latest {limit} runs in sandbox {id}.
Ask an LLM
“How do I run Python in a sandcastle and get stdout back?”
“Does Python run in a persistent kernel so variables survive between calls?”
Tell an agent
Run Python {code} in sandcastle {id}.
Execute this Python snippet in sandbox {id}: {code}
POST
/v2/sandcastles/{id}/query
Load connector data into a sandcastle dataframe · Load Connector Data
#
Ask an LLM
“How do I pull query results from a connector into a sandbox dataframe?”
“Can I run a saved .tql file instead of inline SQL when loading data?”
Tell an agent
Load {query} from connector {connector_id} into sandcastle {id}.
Run saved TQL {tql_path} on connector {connector_id} into dataframe {dataframe_name} in sandbox {id}.
Ask an LLM
“What files are in my sandbox's working directory?”
“Can I browse a subfolder of the sandcastle, like the mounted library?”
Tell an agent
List files in sandcastle {id}.
List the {path} directory inside sandbox {id}.
Ask an LLM
“How do I put a CSV into my sandbox so Python can read it?”
“Can I upload a file directly into a sandcastle's working directory?”
Tell an agent
Upload {file} to sandcastle {id}.
Send file {file} into sandbox {id}'s working directory.
Ask an LLM
“How do I download a chart or output file my sandbox generated?”
“Can I fetch a file from a nested folder in the sandcastle?”
Tell an agent
Download {path} from sandcastle {id}.
Fetch the bytes of file {path} in sandbox {id}.
Ask an LLM
“How do I remove a file from my sandbox's working directory?”
“Can I delete a whole directory in a sandcastle with one call?”
Tell an agent destructive · confirm first
Delete {path} from sandcastle {id}.
Remove file {path} in sandbox {id}.
Ask an LLM
“Can I run a bash command in my sandbox as a fresh process?”
“Do shell commands share state with the Python kernel in a sandcastle?”
Tell an agent
Run command {command} in sandcastle {id}.
Exec {command} in sandbox {id} with environment {env}.
GET
/v2/sandcastles/{id}/ontology/diff
Preview pending Ontology edits in a sandcastle · Diff Ontology (dry run)
#
Ask an LLM
“Has my sandbox changed any files in its mounted Ontology library?”
“Can I dry-run the diff before writing sandbox edits back to the Ontology?”
Tell an agent
Diff the Ontology mount in sandcastle {id}.
Show pending library changes in sandbox {id} without authoring a change.
POST
/v2/sandcastles/{id}/ontology/changes
Write sandcastle Ontology edits back as a change · Create Ontology Change (writeback)
#
Ask an LLM
“How do I save library edits from my sandbox back to the organization's Ontology?”
“Can I open the writeback change as a draft for review?”
Tell an agent
Create an Ontology change from sandcastle {id} titled {title}.
Write back sandbox {id}'s library edits as a draft described as {description}.
Documentation
Documentation
https://docs.textql.com/api-reference/v2/introduction
APIReference
https://docs.textql.com/api-reference/v2/introduction
Authentication
https://artifacts.apis.io/textql/authentication/textql-authentication.yml
RateLimits
https://artifacts.apis.io/textql/rate-limits/textql-rate-limits.yml
Documentation
https://docs.textql.com/api-reference/introduction
APIReference
https://docs.textql.com/api-reference/introduction
Specifications
Other Resources
OAuthScopes
https://artifacts.apis.io/textql/scopes/textql-scopes.yml
ErrorCatalog
https://artifacts.apis.io/textql/errors/textql-problem-types.yml
Conventions
https://artifacts.apis.io/textql/conventions/textql-conventions.yml
DataModel
https://artifacts.apis.io/textql/data-model/textql-data-model.yml
Webhooks
https://artifacts.apis.io/textql/asyncapi/textql-webhooks.yml
Deprecation
https://artifacts.apis.io/textql/lifecycle/textql-lifecycle.yml
Conformance
https://artifacts.apis.io/textql/conformance/textql-conformance.yml