curl -X POST https://api.buntime.sh/execution/kill \
-H "Authorization: Bearer $BUNTIME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sessionId": "ses_abc123", "pid": 1234}'
await client.execution.kill({
sessionId: 'ses_abc123',
pid: 1234 // Optional
});
{
"killed": 1,
"pids": [1234]
}
Execution
Kill Process
Stop running processes in a session
POST
/
execution
/
kill
curl -X POST https://api.buntime.sh/execution/kill \
-H "Authorization: Bearer $BUNTIME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sessionId": "ses_abc123", "pid": 1234}'
await client.execution.kill({
sessionId: 'ses_abc123',
pid: 1234 // Optional
});
{
"killed": 1,
"pids": [1234]
}
Request
string
required
Session ID containing the process
integer
Specific process ID to kill. If omitted, kills all processes.
string
required
Bearer token with your API key
Response
integer
Number of processes killed
array
Array of killed process IDs
Example
curl -X POST https://api.buntime.sh/execution/kill \
-H "Authorization: Bearer $BUNTIME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sessionId": "ses_abc123", "pid": 1234}'
await client.execution.kill({
sessionId: 'ses_abc123',
pid: 1234 // Optional
});
{
"killed": 1,
"pids": [1234]
}