> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get snapshot

> Returns a snapshot of the workspace by ID.



## OpenAPI

````yaml /api-reference/controlplane.yml get /snapshots/{snapshotName}
openapi: 3.0.3
info:
  title: Blaxel Control Plane
  version: 0.0.1
servers:
  - description: Blaxel Control Plane
    url: https://api.blaxel.ai/v0
  - description: Blaxel Inference
    url: https://run.blaxel.ai
security:
  - OAuth2:
      - admin
  - ApiKeyAuth: []
paths:
  /snapshots/{snapshotName}:
    get:
      tags:
        - compute
      summary: Get snapshot
      description: Returns a snapshot of the workspace by ID.
      operationId: GetSnapshot
      parameters:
        - description: ID of the snapshot
          in: path
          name: snapshotName
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxSnapshot'
          description: successful operation
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found - Snapshot does not exist
      security:
        - OAuth2:
            - sandboxes:get
        - ApiKeyAuth: []
components:
  schemas:
    SandboxSnapshot:
      type: object
      description: >-
        A point-in-time snapshot of a sandbox. It is a workspace-level object:
        it outlives the sandbox it was captured from, and can be restored onto a
        sandbox or forked into a new sandbox or application on its own.
      properties:
        createdAt:
          type: string
          description: When the snapshot was created
        createdBy:
          type: string
          description: Who created the snapshot
        id:
          type: string
          description: >-
            Identifier of the snapshot, unique in the workspace. Workspace-level
            routes address the snapshot by it.
          readOnly: true
          example: snap_abc123
        name:
          type: string
          description: >-
            Display name of the snapshot, unique among the snapshots of the
            sandbox it was captured from. Defaults to the identifier.
          example: my-snapshot
        sandboxName:
          type: string
          description: >-
            Name of the source sandbox. Kept for compatibility, read source.name
            instead.
        source:
          $ref: '#/components/schemas/SandboxSnapshotSource'
        spec:
          $ref: '#/components/schemas/SandboxSnapshotSpec'
        status:
          type: string
          description: Status of the snapshot (pending, ready, failed)
          example: ready
        workspace:
          type: string
          description: Workspace owning the snapshot
      required:
        - workspace
        - name
        - id
        - createdAt
        - status
    Error:
      type: object
      description: Standard error response returned by the API when a request fails
      properties:
        code:
          type: integer
          description: HTTP status code of the error
          example: 409
        error:
          type: string
          description: Error type or code identifying the kind of error
          example: Resource already exists
        message:
          type: string
          description: Human-readable error message describing what went wrong
          example: Invalid request body
      required:
        - error
    SandboxSnapshotSource:
      type: object
      description: The object a snapshot was captured from.
      properties:
        deleted:
          type: boolean
          description: >-
            Whether the source object has since been deleted. The snapshot stays
            usable, the link is only kept for context.
          readOnly: true
        kind:
          type: string
          description: >-
            Kind of the object the snapshot was captured from. Defaults to
            sandbox, the only kind that can be captured today.
          enum:
            - sandbox
          example: sandbox
          default: sandbox
        name:
          type: string
          description: Name of the object the snapshot was captured from
      required:
        - name
    SandboxSnapshotSpec:
      type: object
      description: >-
        The configuration a snapshot carries, so a sandbox or an application can
        be created from it once its source object is gone.
      properties:
        generation:
          type: string
          description: >-
            Infrastructure generation the snapshot was captured on. A snapshot
            only restores on the generation it came from.
          enum:
            - mk2
            - mk3
        image:
          type: string
          description: Image the source object ran
        memory:
          type: integer
          description: Memory in MB the source object ran with
        ports:
          $ref: '#/components/schemas/Ports'
        region:
          type: string
          description: Region holding the snapshot. Restores and forks land in it.
        volumes:
          $ref: '#/components/schemas/VolumeAttachments'
    Ports:
      type: array
      description: Set of ports for a resource
      items:
        $ref: '#/components/schemas/Port'
    VolumeAttachments:
      type: array
      items:
        $ref: '#/components/schemas/VolumeAttachment'
    Port:
      type: object
      description: A port for a resource
      properties:
        name:
          type: string
          description: The name of the port
          example: http
        protocol:
          type: string
          description: The protocol of the port
          enum:
            - HTTP
            - TCP
            - UDP
            - TLS
          example: HTTP
        target:
          type: integer
          description: The target port of the port
          example: 8080
      required:
        - target
    VolumeAttachment:
      type: object
      description: >-
        Configuration for attaching a volume to a sandbox at a specific
        filesystem path. Defaults to a persistent volume; set type to
        "ephemeral" for disk-backed scratch space created with the sandbox and
        destroyed when it stops.
      properties:
        mountPath:
          type: string
          description: >-
            Absolute filesystem path where the volume will be mounted inside the
            sandbox
          example: /mnt/data
        name:
          type: string
          description: >-
            For persistent volumes, the name of the volume resource to attach
            (must exist in the same workspace and region). For ephemeral
            volumes, an identifier used to reference the volume internally.
          example: my-volume
        readOnly:
          type: boolean
          description: >-
            If true, the volume is mounted read-only and cannot be modified by
            the sandbox
          example: false
        sizeMb:
          type: integer
          description: >-
            Storage capacity in megabytes. Required for ephemeral volumes,
            ignored for persistent volumes.
          example: 102400
        type:
          type: string
          description: >-
            Type of volume. Defaults to "persistent" (an existing volume
            resource). Use "ephemeral" for temporary disk-backed storage created
            with the sandbox.
          enum:
            - persistent
            - ephemeral
          example: persistent
  securitySchemes:
    OAuth2:
      description: OAuth2 authentication with JWT tokens
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize
          scopes:
            admin: Administrative access
            agents:create: Create agents
            agents:delete: Delete agents
            agents:get: Get agent details
            agents:list: List agents
            agents:update: Update agents
            apiKey:list: List API keys
            apiKey:write: Create and delete API keys
            applications:create: Create applications
            applications:delete: Delete applications
            applications:get: Get application details
            applications:list: List applications
            applications:update: Update applications
            configurations:list: List configurations
            customdomains:create: Create custom domains
            customdomains:delete: Delete custom domains
            customdomains:get: Get custom domain details
            customdomains:list: List custom domains
            customdomains:update: Update custom domains
            functions:create: Create functions
            functions:delete: Delete functions
            functions:get: Get function details
            functions:list: List functions
            functions:update: Update functions
            integrations:create: Create integrations
            integrations:list: List integrations
            invitations:list: List invitations
            jobs:create: Create jobs
            jobs:delete: Delete jobs
            jobs:get: Get job details
            jobs:list: List jobs
            jobs:update: Update jobs
            locations:list: List locations
            mcphub:list: List MCP hub resources
            models:create: Create models
            models:delete: Delete models
            models:get: Get model details
            models:list: List models
            models:update: Update models
            policies:create: Create policies
            policies:delete: Delete policies
            policies:get: Get policy details
            policies:list: List policies
            policies:update: Update policies
            sandboxes:control: Control sandbox operations
            sandboxes:create: Create sandboxes
            sandboxes:delete: Delete sandboxes
            sandboxes:get: Get sandbox details
            sandboxes:list: List sandboxes
            sandboxes:update: Update sandboxes
            sandboxhub:list: List sandbox hub resources
            templates:get: Get template details
            templates:list: List templates
            volumeTemplates:create: Create volume templates
            volumeTemplates:delete: Delete volume templates
            volumeTemplates:get: Get volume template details
            volumeTemplates:list: List volume templates
            volumeTemplates:upsert: Create or update volume templates
            volumes:create: Create volumes
            volumes:delete: Delete volumes
            volumes:get: Get volume details
            volumes:list: List volumes
            workspaces:accept: Accept workspace invitation
            workspaces:create: Create workspaces
            workspaces:decline: Decline workspace invitation
            workspaces:delete: Delete workspaces
            workspaces:get: Get workspace details
            workspaces:invite: Invite users to workspace
            workspaces:leave: Leave workspace
            workspaces:list: List workspaces
            workspaces:remove: Remove users from workspace
            workspaces:update: Update workspaces
          tokenUrl: /oauth/token
        clientCredentials:
          scopes:
            admin: Administrative access
            agents:create: Create agents
            agents:delete: Delete agents
            agents:get: Get agent details
            agents:list: List agents
            agents:update: Update agents
            apiKey:list: List API keys
            apiKey:write: Create and delete API keys
            applications:create: Create applications
            applications:delete: Delete applications
            applications:get: Get application details
            applications:list: List applications
            applications:update: Update applications
            configurations:list: List configurations
            customdomains:create: Create custom domains
            customdomains:delete: Delete custom domains
            customdomains:get: Get custom domain details
            customdomains:list: List custom domains
            customdomains:update: Update custom domains
            functions:create: Create functions
            functions:delete: Delete functions
            functions:get: Get function details
            functions:list: List functions
            functions:update: Update functions
            integrations:create: Create integrations
            integrations:list: List integrations
            invitations:list: List invitations
            jobs:create: Create jobs
            jobs:delete: Delete jobs
            jobs:get: Get job details
            jobs:list: List jobs
            jobs:update: Update jobs
            locations:list: List locations
            mcphub:list: List MCP hub resources
            models:create: Create models
            models:delete: Delete models
            models:get: Get model details
            models:list: List models
            models:update: Update models
            policies:create: Create policies
            policies:delete: Delete policies
            policies:get: Get policy details
            policies:list: List policies
            policies:update: Update policies
            sandboxes:control: Control sandbox operations
            sandboxes:create: Create sandboxes
            sandboxes:delete: Delete sandboxes
            sandboxes:get: Get sandbox details
            sandboxes:list: List sandboxes
            sandboxes:update: Update sandboxes
            sandboxhub:list: List sandbox hub resources
            templates:get: Get template details
            templates:list: List templates
            volumeTemplates:create: Create volume templates
            volumeTemplates:delete: Delete volume templates
            volumeTemplates:get: Get volume template details
            volumeTemplates:list: List volume templates
            volumeTemplates:upsert: Create or update volume templates
            volumes:create: Create volumes
            volumes:delete: Delete volumes
            volumes:get: Get volume details
            volumes:list: List volumes
            workspaces:accept: Accept workspace invitation
            workspaces:create: Create workspaces
            workspaces:decline: Decline workspace invitation
            workspaces:delete: Delete workspaces
            workspaces:get: Get workspace details
            workspaces:invite: Invite users to workspace
            workspaces:leave: Leave workspace
            workspaces:list: List workspaces
            workspaces:remove: Remove users from workspace
            workspaces:update: Update workspaces
          tokenUrl: /oauth/token
      type: oauth2
    ApiKeyAuth:
      bearerFormat: API Key
      description: Long-lived API key for programmatic access
      scheme: bearer
      type: http

````