@runloop/api-client - v1.18.1
    Preparing search index...

    Class Devboxes

    Hierarchy

    • APIResource
      • Devboxes
    Index

    Constructors

    Properties

    _client: Runloop
    diskSnapshots: DiskSnapshots = ...
    logs: Logs = ...
    executions: Executions = ...

    Accessors

    Methods

    • Create a Devbox and begin the boot process. The Devbox will initially launch in the 'provisioning' state while Runloop allocates the necessary infrastructure. It will transition to the 'initializing' state while the booted Devbox runs any Runloop or user defined set up scripts. Finally, the Devbox will transition to the 'running' state when it is ready for use.

      Parameters

      Returns APIPromise<DevboxView>

    • Create a Devbox and begin the boot process. The Devbox will initially launch in the 'provisioning' state while Runloop allocates the necessary infrastructure. It will transition to the 'initializing' state while the booted Devbox runs any Runloop or user defined set up scripts. Finally, the Devbox will transition to the 'running' state when it is ready for use.

      Parameters

      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Delete a previously taken disk snapshot of a Devbox.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<unknown>

    • Enable a V2 tunnel for an existing running Devbox. Tunnels provide encrypted URL-based access to the Devbox without exposing internal IDs. The tunnel URL format is: https://{port}-{tunnel_key}.tunnel.runloop.ai

      Each Devbox can have one tunnel.

      Parameters

      Returns APIPromise<TunnelView>

    • Enable a V2 tunnel for an existing running Devbox. Tunnels provide encrypted URL-based access to the Devbox without exposing internal IDs. The tunnel URL format is: https://{port}-{tunnel_key}.tunnel.runloop.ai

      Each Devbox can have one tunnel.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<TunnelView>

    • Send a 'Keep Alive' signal to a running Devbox that is configured to shutdown on idle so the idle time resets.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<unknown>

    • Read file contents from a file on a Devbox as a UTF-8. Note 'downloadFile' should be used for large files (greater than 100MB). Returns the file contents as a UTF-8 string.

      Parameters

      Returns APIPromise<string>

    • Remove an existing V2 tunnel from the Devbox.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<unknown>

    • Resume a suspended Devbox with the disk state captured as suspend time. Note that any previously running processes or daemons will need to be restarted using the Devbox shell tools.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Get resource usage metrics for a specific Devbox. Returns CPU, memory, and disk consumption calculated from the Devbox's lifecycle, excluding any suspended periods for CPU and memory. Disk usage includes the full elapsed time since storage is consumed even when suspended.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxResourceUsageView>

    • Shutdown a running Devbox. This will permanently stop the Devbox. If you want to save the state of the Devbox, you should take a snapshot before shutting down or should suspend the Devbox instead of shutting down. If the Devbox has any in-progress snapshots, the shutdown will be rejected with a 409 Conflict unless force=true is specified.

      Parameters

      Returns APIPromise<DevboxView>

    • Shutdown a running Devbox. This will permanently stop the Devbox. If you want to save the state of the Devbox, you should take a snapshot before shutting down or should suspend the Devbox instead of shutting down. If the Devbox has any in-progress snapshots, the shutdown will be rejected with a 409 Conflict unless force=true is specified.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Suspend a running Devbox and create a disk snapshot to enable resuming the Devbox later with the same disk. Note this will not snapshot memory state such as running processes.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Upload file contents of any type (binary, text, etc) to a Devbox. Note this API is suitable for large files (larger than 100MB) and efficiently uploads files via multipart form data.

      Parameters

      Returns APIPromise<unknown>