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

# Get filesystem attachment

> Returns whether a server is attached to the storage network the filesystem is served on. Poll it after attaching: once the status is "attached", configure the returned storage network on the server and mount the filesystem.



## OpenAPI

````yaml https://spec.speakeasy.com/latitude/latitude/latitude-sh-api-with-code-samples get /storage/filesystems/{filesystem_id}/attach
openapi: 3.0.1
info:
  title: Latitude.sh API
  version: '2023-06-01'
  description: >-
    The Latitude.sh API is a RESTful API to manage your Latitude.sh account. It
    allows you to perform the same actions as the Latitude.sh dashboard.
servers:
  - url: https://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
  - url: http://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
security: []
tags:
  - name: API keys
  - name: Baselines (Preview)
    description: >-
      Preview. Available to teams with the `baselines_api` feature flag. The
      shape of these endpoints may change before general availability.
  - name: Billing
  - name: Elastic Ips
  - name: Events
  - name: Firewalls
  - name: IP Addresses
  - name: Managed Databases
    description: Managed database instances (PostgreSQL, ClickHouse)
  - name: Kubernetes Clusters
  - name: LKS
  - name: Marketplace apps
  - name: Operating Systems
  - name: Plans
  - name: Public Networks
  - name: Private Networks
  - name: Projects
  - name: Regions
  - name: Roles
  - name: SSH Keys
  - name: Servers
  - name: Block Storage
  - name: Filesystem Storage
  - name: Object Storage
  - name: Tags
  - name: Teams
  - name: Team members
  - name: Traffic
  - name: User data
  - name: User profile
  - name: VPN Sessions
  - name: Virtual machines
  - name: Virtual machine backups
  - name: Virtual machine restores
paths:
  /storage/filesystems/{filesystem_id}/attach:
    get:
      tags:
        - Filesystem Storage
      summary: Get filesystem attachment
      description: >-
        Returns whether a server is attached to the storage network the
        filesystem is served on. Poll it after attaching: once the status is
        "attached", configure the returned storage network on the server and
        mount the filesystem.
      operationId: get-filesystem-attachment
      parameters:
        - name: filesystem_id
          in: path
          required: true
          description: Filesystem ID
          schema:
            type: string
        - name: server_id
          in: query
          required: true
          description: Server ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/vnd.api+json:
              examples:
                Success:
                  value:
                    data:
                      id: fs_7vYAZqGBdMQ94_sv_RLYV8DZ2D5QoE
                      type: filesystem_attachments
                      attributes:
                        filesystem_id: fs_7vYAZqGBdMQ94
                        server_id: sv_RLYV8DZ2D5QoE
                        status: attached
                        failure_reason: null
                        storage_network:
                          vid: 3001
                          host_cidr: 10.248.215.28/24
                          gateway: 10.248.215.1
                          routes:
                            - 10.248.213.0/24
                    meta: {}
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/filesystem_attachment_data'
                  meta:
                    type: object
      security:
        - Bearer: []
      x-codeSamples:
        - lang: go
          label: Go (SDK)
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tlatitudeshgosdk \"github.com/latitudesh/latitudesh-go-sdk\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := latitudeshgosdk.New(\n        latitudeshgosdk.WithSecurity(os.Getenv(\"LATITUDESH_BEARER\")),\n    )\n\n    res, err := s.FilesystemStorage.GetFilesystemAttachment(ctx, \"<id>\", \"<id>\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Object != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Latitudesh } from "latitudesh-typescript-sdk";

            const latitudesh = new Latitudesh({
              bearer: process.env["LATITUDESH_BEARER"] ?? "",
            });

            async function run() {
              const result = await latitudesh.filesystemStorage.getFilesystemAttachment({
                filesystemId: "<id>",
                serverId: "<id>",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    filesystem_attachment_data:
      type: object
      properties:
        id:
          type: string
          description: >-
            ID of the attachment: the filesystem ID and the server ID joined by
            "_".
          example: fs_abcd1234_sv_efgh5678
        type:
          type: string
          enum:
            - filesystem_attachments
        attributes:
          type: object
          properties:
            filesystem_id:
              type: string
            server_id:
              type: string
            status:
              type: string
              enum:
                - attaching
                - attached
                - detaching
                - detached
                - failed
              description: >-
                Whether the server is attached to the filesystem storage
                network. "attaching"/"detaching" while an attach or detach runs,
                "failed" when it gave up.
            failure_reason:
              type: string
              nullable: true
              description: Why the attach or detach failed.
            storage_network:
              type: object
              nullable: true
              description: >-
                Storage network to configure on the server before mounting the
                filesystem. Null until the status is "attached".
              properties:
                vid:
                  type: integer
                  nullable: true
                  description: VLAN ID of the storage VLAN.
                host_cidr:
                  type: string
                  description: Storage IP of the server, in CIDR notation.
                gateway:
                  type: string
                  nullable: true
                  description: Gateway of the storage network, used for the routes below.
                routes:
                  type: array
                  items:
                    type: string
                  nullable: true
                  description: Storage infrastructure prefixes to route via the gateway.
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.