Create a sandbox
POST
Creates a sandbox: a throwaway VM with no project, on the plain base image or on one of your projects' images. It answers at once while the sandbox starts; a command sent to it waits until it is up. It never sleeps and is deleted when ttlMinutes runs out (default 60, at most 1440).
apiKeyheader
AuthorizationBearer <hmk_…>An API key from the dashboard or homemade api-key create.
application/json- body
env?Env vars every command run through this API gets. Stored encrypted.
orgId?stringThe team it belongs to. Defaults to your first team (an API key's own team).
projectId?stringStart from this project's current image instead of the plain base image.
region?stringValue in
"eu""us"size?stringValue in
"nano""tiny""small""medium""large"ttlMinutes?integerMinutes until the sandbox is deleted. Default 60, at most 1440.
Range
1 <= value <= 1440Default
60The sandbox was created and is starting.
application/json- response
sandbox*A throwaway VM. It never sleeps and is deleted when its time runs out.
curl -X POST 'https://api.homemade.dev/api/sandboxes' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "sandbox": { "createdAt": "2019-08-24T14:15:22Z", "createdBy": { "apiKeyName": "string", "clientName": "string", "userName": "string", "via": "dashboard" }, "envNames": [ "string" ], "expiresAt": "2019-08-24T14:15:22Z", "id": "string", "projectId": "string", "projectName": "string", "region": "string", "size": "string", "startedAt": "2019-08-24T14:15:22Z", "state": "queued", "urls": { "property1": "string", "property2": "string" }, "property1": null, "property2": null }}