Skip to main content
POST
/
v1
/
sandbox
/
execute
ExecuteCode
curl --request POST \
  --url https://app.textql.com/v1/sandbox/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sandboxId": "<string>",
  "code": "<string>"
}
'
{
  "output": [
    "<string>"
  ],
  "error": "<string>",
  "files": [
    {
      "name": "<string>",
      "url": "<string>",
      "mimeType": "<string>"
    }
  ],
  "dataframes": [
    {
      "name": "<string>",
      "numRows": 123,
      "numCols": 123
    }
  ],
  "executionTimeMs": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Connect-Protocol-Version
enum<number>
required

Define the version of the Connect protocol

Available options:
1
Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/json
sandboxId
string
required
code
string
required

Python code to execute

Response

Success

output
string[]

Lines of stdout output

error
string | null

Error message if execution failed

files
FileOutput · object[]

Files generated during execution

dataframes
DataFrameOutput · object[]

DataFrames created or modified during execution

executionTimeMs
integer<int64>