Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

15.1 KB
Raw Blame

BoxApi

All URIs are relative to http://localhost:3000

Method HTTP request Description
createAttachTicket POST /box/{boxIdOrName}/attach-tickets Get a one-time ticket for the attach WebSocket
getBox GET /box/{boxIdOrName} Get box details
getBoxesForRunner GET /box/for-runner Get boxes for the authenticated runner
listBoxesPaginated GET /box/paginated List all boxes paginated
recoverBox POST /box/{boxIdOrName}/recover Recover box from error state
updateBoxState PUT /box/{boxId}/state Update box state
updateLastActivity POST /box/{boxId}/last-activity Update box last activity

createAttachTicket

AttachTicket createAttachTicket(createAttachTicket)

Example

import {
    BoxApi,
    Configuration,
    CreateAttachTicket
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let boxIdOrName: string; //ID or name of the box
let createAttachTicket: CreateAttachTicket; //
let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)

const { status, data } = await apiInstance.createAttachTicket(
    boxIdOrName,
    createAttachTicket,
    xBoxLiteOrganizationID
);

Parameters

Name Type Description Notes
createAttachTicket CreateAttachTicket
boxIdOrName [string] ID or name of the box
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined

Return type

AttachTicket

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A single-use ticket for one attach upgrade to the execution -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getBox

Box getBox()

Example

import {
    BoxApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let boxIdOrName: string; //ID or name of the box
let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)
let verbose: boolean; //Include verbose output (optional) (default to undefined)

const { status, data } = await apiInstance.getBox(
    boxIdOrName,
    xBoxLiteOrganizationID,
    verbose
);

Parameters

Name Type Description Notes
boxIdOrName [string] ID or name of the box
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined
verbose [boolean] Include verbose output (optional) defaults to undefined

Return type

Box

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Box details -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getBoxesForRunner

Array getBoxesForRunner()

Example

import {
    BoxApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)
let states: string; //Comma-separated list of box states to filter by (optional) (default to undefined)
let skipReconcilingBoxes: boolean; //Skip boxes where state differs from desired state (optional) (default to undefined)

const { status, data } = await apiInstance.getBoxesForRunner(
    xBoxLiteOrganizationID,
    states,
    skipReconcilingBoxes
);

Parameters

Name Type Description Notes
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined
states [string] Comma-separated list of box states to filter by (optional) defaults to undefined
skipReconcilingBoxes [boolean] Skip boxes where state differs from desired state (optional) defaults to undefined

Return type

Array

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 List of boxes for the authenticated runner -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listBoxesPaginated

PaginatedBoxes listBoxesPaginated()

Example

import {
    BoxApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)
let page: number; //Page number of the results (optional) (default to 1)
let limit: number; //Number of results per page (optional) (default to 100)
let id: string; //Filter by partial Box ID or name match (optional) (default to undefined)
let name: string; //Filter by partial name match (optional) (default to undefined)
let labels: string; //JSON encoded labels to filter by (optional) (default to undefined)
let includeErroredDeleted: boolean; //Include results with errored state and deleted desired state (optional) (default to false)
let states: Array<'creating' | 'restoring' | 'destroying' | 'started' | 'stopped' | 'starting' | 'stopping' | 'error' | 'unknown' | 'archived' | 'archiving' | 'resizing'>; //List of states to filter by (optional) (default to undefined)
let regions: Array<string>; //List of regions to filter by (optional) (default to undefined)
let minCpu: number; //Minimum CPU (optional) (default to undefined)
let maxCpu: number; //Maximum CPU (optional) (default to undefined)
let minMemoryGiB: number; //Minimum memory in GiB (optional) (default to undefined)
let maxMemoryGiB: number; //Maximum memory in GiB (optional) (default to undefined)
let minDiskGiB: number; //Minimum disk space in GiB (optional) (default to undefined)
let maxDiskGiB: number; //Maximum disk space in GiB (optional) (default to undefined)
let lastEventAfter: Date; //Include items with last event after this timestamp (optional) (default to undefined)
let lastEventBefore: Date; //Include items with last event before this timestamp (optional) (default to undefined)
let sort: 'id' | 'name' | 'state' | 'region' | 'updatedAt' | 'createdAt'; //Field to sort by (optional) (default to 'createdAt')
let order: 'asc' | 'desc'; //Direction to sort by (optional) (default to 'desc')

const { status, data } = await apiInstance.listBoxesPaginated(
    xBoxLiteOrganizationID,
    page,
    limit,
    id,
    name,
    labels,
    includeErroredDeleted,
    states,
    regions,
    minCpu,
    maxCpu,
    minMemoryGiB,
    maxMemoryGiB,
    minDiskGiB,
    maxDiskGiB,
    lastEventAfter,
    lastEventBefore,
    sort,
    order
);

Parameters

Name Type Description Notes
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined
page [number] Page number of the results (optional) defaults to 1
limit [number] Number of results per page (optional) defaults to 100
id [string] Filter by partial Box ID or name match (optional) defaults to undefined
name [string] Filter by partial name match (optional) defaults to undefined
labels [string] JSON encoded labels to filter by (optional) defaults to undefined
includeErroredDeleted [boolean] Include results with errored state and deleted desired state (optional) defaults to false
states Array<'creating' | 'restoring' | 'destroying' | 'started' | 'stopped' | 'starting' | 'stopping' | 'error' | 'unknown' | 'archived' | 'archiving' | 'resizing'> List of states to filter by (optional) defaults to undefined
regions Array<string> List of regions to filter by (optional) defaults to undefined
minCpu [number] Minimum CPU (optional) defaults to undefined
maxCpu [number] Maximum CPU (optional) defaults to undefined
minMemoryGiB [number] Minimum memory in GiB (optional) defaults to undefined
maxMemoryGiB [number] Maximum memory in GiB (optional) defaults to undefined
minDiskGiB [number] Minimum disk space in GiB (optional) defaults to undefined
maxDiskGiB [number] Maximum disk space in GiB (optional) defaults to undefined
lastEventAfter [Date] Include items with last event after this timestamp (optional) defaults to undefined
lastEventBefore [Date] Include items with last event before this timestamp (optional) defaults to undefined
sort ['id' | 'name' | 'state' | 'region' | 'updatedAt' | 'createdAt'] Field to sort by (optional) defaults to 'createdAt'
order ['asc' | 'desc'] Direction to sort by (optional) defaults to 'desc'

Return type

PaginatedBoxes

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Paginated list of all boxes -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

recoverBox

Box recoverBox()

Example

import {
    BoxApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let boxIdOrName: string; //ID or name of the box
let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)

const { status, data } = await apiInstance.recoverBox(
    boxIdOrName,
    xBoxLiteOrganizationID
);

Parameters

Name Type Description Notes
boxIdOrName [string] ID or name of the box
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined

Return type

Box

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Recovery initiated -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateBoxState

updateBoxState(updateBoxStateDto)

Example

import {
    BoxApi,
    Configuration,
    UpdateBoxStateDto
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let boxId: string; //ID of the box
let updateBoxStateDto: UpdateBoxStateDto; //
let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)

const { status, data } = await apiInstance.updateBoxState(
    boxId,
    updateBoxStateDto,
    xBoxLiteOrganizationID
);

Parameters

Name Type Description Notes
updateBoxStateDto UpdateBoxStateDto
boxId [string] ID of the box
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined

Return type

void (empty response body)

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Box state has been successfully updated -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateLastActivity

updateLastActivity()

Example

import {
    BoxApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);

let boxId: string; //ID of the box
let xBoxLiteOrganizationID: string; //Use with JWT to specify the organization ID (optional) (default to undefined)

const { status, data } = await apiInstance.updateLastActivity(
    boxId,
    xBoxLiteOrganizationID
);

Parameters

Name Type Description Notes
boxId [string] ID of the box
xBoxLiteOrganizationID [string] Use with JWT to specify the organization ID (optional) defaults to undefined

Return type

void (empty response body)

Authorization

bearer, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 Last activity has been updated -

[Back to top] [Back to API list] [Back to Model list] [Back to README]