Skip to main content
List and manage background code execution processes.

Endpoints

List Processes

GET {sandbox_public_host}/execute/processes
Response:
{
  "processes": [
    {
      "process_id": "proc_abc123",
      "name": "data_processing",
      "status": "running",
      "started_at": "2025-01-15T10:30:00Z",
      "language": "python"
    }
  ]
}

Kill Process

POST {sandbox_public_host}/execute/kill/{process_id}

Examples

cURL

# List processes
curl -H "Authorization: Bearer {auth_token}" \
     https://1761048129dsaqav4n.hopx.dev/execute/processes

# Kill process
curl -X POST \
     -H "Authorization: Bearer {auth_token}" \
     https://1761048129dsaqav4n.hopx.dev/execute/kill/proc_abc123

Python

# List processes
response = requests.get(
    f"{sandbox_public_host}/execute/processes",
    headers={"Authorization": f"Bearer {auth_token}"}
)
processes = response.json()["processes"]

# Kill process
response = requests.post(
    f"{sandbox_public_host}/execute/kill/proc_abc123",
    headers={"Authorization": f"Bearer {auth_token}"}
)

JavaScript

// List processes
const response = await fetch(`${sandboxPublicHost}/execute/processes`, {
  headers: {
    'Authorization': `Bearer ${authToken}`
  }
});
const data = await response.json();
const processes = data.processes;

// Kill process
await fetch(`${sandboxPublicHost}/execute/kill/proc_abc123`, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${authToken}`
  }
});