process
Execute a command
Execute a command and return process information. If Accept header is text/event-stream, streams logs in SSE format and returns the process response as a final event.
post/process
Request
- Base URLhttps://api.blaxel.ai/v0
- Auth
- OAuth 2Authorization code/oauth/authorizeClient credentialsToken URL/oauth/tokenScopesadmin
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"command": "ls -la",
"env": {
"{\"PORT\"": " \"3000\"}"
},
"maxRestarts": 3,
"name": "my-process",
"restartOnFailure": true,
"timeout": 30,
"waitForPorts": [
3000,
8080
],
"workingDir": "/home/user"
}Response
Process information
Example response
{
"command": "ls -la",
"completedAt": "Wed, 01 Jan 2023 12:01:00 GMT",
"logs": "logs output",
"maxRestarts": 3,
"name": "my-process",
"pid": "1234",
"restartCount": 2,
"restartOnFailure": true,
"startedAt": "Wed, 01 Jan 2023 12:00:00 GMT",
"status": "running",
"stderr": "stderr output",
"stdout": "stdout output",
"workingDir": "/home/user"
}Changes
No recorded changes to this operation across all 1 revision of this API.