Execute shell or JavaScript
/v1/disks/{disk}/execconst url = 'https://api.wabe.sh/v1/disks/demo/exec?kind=bash';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/plain'}, body: 'echo Hello'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.wabe.sh/v1/disks/demo/exec?kind=bash' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: text/plain' \ --data 'echo Hello'Select body, script or path as source. Source limit is 64 KiB. HTTP 200 starts the response; require a final exit record and inspect its code. Runtime failures are stderr/exit records. Default elapsed deadline is 30 seconds. JS runs as an async function body on Linux.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
demoProject disk name, or the disk ID in the actor runtime disk URL.
Query Parameters
Section titled “Query Parameters”UTF-8 source as query text; the body becomes stdin.
Stored virtual JS source path; requires kind=js. Body becomes stdin.
Request Body
Section titled “Request Body”Example
echo HelloResponses
Section titled “Responses”Newline-delimited JSON records; consume or close the body to release the request lease.
Example
{"type":"stdout","data":"SGVsbG8K"}{"type":"exit","code":0}Invalid input, query, name or source.
Missing, invalid or revoked project API key, or an invalid runtime access token.
object
Actor runtime token does not authorize this disk or instance generation.
object
Requested file, parent or script was not found.
Storage, I/O or corruption failure.
Disk unavailable.