JarvisLabs Filesystems API

Persistent storage volumes.

OpenAPI Specification

jarvislabs-filesystems-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: JarvisLabs Account Filesystems API
  description: REST modeling of the JarvisLabs.ai GPU cloud instance-management surface that is wrapped by the jarvislabs Python SDK, the jl CLI, and the legacy jlclient library. JarvisLabs does not publish raw REST endpoint paths in its public documentation; the operations, parameters, GPU types, templates, and lifecycle behavior modeled here are taken directly from the documented SDK methods (Instance.create, instance.pause, instance.resume, instance.destroy, User.get_instances, User.get_instance, User.get_templates, User.get_balance, FileSystem.create/list/delete) and the equivalent jl CLI commands (jl create, list, get, pause, resume, rename, destroy, gpus, templates, status, filesystem). Paths are modeled conservatively under a versioned base and should be treated as illustrative of the documented behavior rather than as officially published routes.
  termsOfService: https://jarvislabs.ai/terms
  contact:
    name: JarvisLabs Support
    url: https://docs.jarvislabs.ai
  version: '1.0'
servers:
- url: https://api.jarvislabs.ai/v1
  description: JarvisLabs API (base modeled; authoritative access is via the jarvislabs SDK / jl CLI)
security:
- ApiKeyAuth: []
tags:
- name: Filesystems
  description: Persistent storage volumes.
paths:
  /filesystems:
    get:
      operationId: listFilesystems
      tags:
      - Filesystems
      summary: List filesystems
      description: Lists persistent storage volumes. Equivalent to FileSystem.list() and `jl filesystem list`.
      responses:
        '200':
          description: A list of filesystems.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Filesystem'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createFilesystem
      tags:
      - Filesystems
      summary: Create a filesystem
      description: Creates a new persistent storage volume. Equivalent to FileSystem.create() and `jl filesystem create --storage`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - storage
              properties:
                name:
                  type: string
                  description: Name for the filesystem.
                storage:
                  type: integer
                  description: Storage size in GB.
      responses:
        '201':
          description: Filesystem created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Filesystem'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /filesystems/{fs_id}:
    parameters:
    - name: fs_id
      in: path
      required: true
      description: The filesystem identifier.
      schema:
        type: string
    delete:
      operationId: deleteFilesystem
      tags:
      - Filesystems
      summary: Delete a filesystem
      description: Deletes a persistent storage volume. Equivalent to FileSystem.delete() and `jl filesystem remove <fs_id>`.
      responses:
        '200':
          description: Filesystem deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ActionResult:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message.
        code:
          type: string
          description: Machine-readable error code.
    Filesystem:
      type: object
      properties:
        fs_id:
          type: string
        name:
          type: string
        storage:
          type: integer
          description: Storage size in GB.
        region:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API token generated at https://jarvislabs.ai/settings/api-keys. In the SDK this is set via jarvisclient.token; the CLI stores it via `jl setup`.