const terminal = await api.compute.terminals.create({
storageId: "YOUR_OBJECT_STORAGE_ID",
name: "shell",
command: "npm run dev",
by: "user",
port: 3000,
});terminal = api.compute.terminals.create(
storage_id="YOUR_OBJECT_STORAGE_ID",
name="shell",
command="npm run dev",
by="user",
port=3000,
)storageIdstringrequiredObject Storage mounted at /workspace.
namestringOptional display name; defaults to shell.
commandstring|nullOptional first command to run.
bystringOptional origin label recorded on the terminal; defaults to user.
portinteger|nullOptional port to expose for a preview. The terminal's url is null when no port is requested.
The returned object contains the terminal ID and current state. Keep the ID private to the account that created it.