Skip to Content
Homemade
Dashboard

Create a sandbox

POST
/api/sandboxes

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).

Authorization

apiKey
headerAuthorizationBearer <hmk_…>

An API key from the dashboard or homemade api-key create.

Request Body

application/json
  1. body
env?

Env vars every command run through this API gets. Stored encrypted.

orgId?string

The team it belongs to. Defaults to your first team (an API key's own team).

projectId?string

Start from this project's current image instead of the plain base image.

region?string
Value in"eu""us"
size?string
Value in"nano""tiny""small""medium""large"
ttlMinutes?integer

Minutes until the sandbox is deleted. Default 60, at most 1440.

Range1 <= value <= 1440
Default60

Response Body

The sandbox was created and is starting.

application/json
  1. response
sandbox*

A throwaway VM. It never sleeps and is deleted when its time runs out.

Example Request
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  }}