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

# Initialise backup upload

> Creates a file record and a backups metadata row atomically, returning a file UUID and upload URL.



## OpenAPI

````yaml /api-reference/gns3util-filestore-api-docs.json post /api/v1/backups
openapi: 3.0.0
info:
  description: API for gns3util distributed file storage
  title: gns3util cluster filestore API
  contact: {}
  version: '1.0'
servers: []
security: []
paths:
  /api/v1/backups:
    post:
      tags:
        - backups
      summary: Initialise backup upload
      description: >-
        Creates a file record and a backups metadata row atomically, returning a
        file UUID and upload URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.InitBackupUploadRequest'
        description: Backup upload request
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.InitUploadResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/helpers.APIErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/helpers.APIErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/helpers.APIErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/helpers.APIErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    models.InitBackupUploadRequest:
      type: object
      properties:
        backup_type:
          description: '"full" | "incremental"'
          type: string
        bucket_id:
          type: string
        content_type:
          type: string
        filename:
          type: string
        is_compressed:
          type: boolean
        is_encrypted:
          type: boolean
        parent_backup_uuid:
          type: string
        retention_period:
          type: integer
        size_bytes:
          type: integer
        source_node_id:
          type: string
    models.InitUploadResponse:
      type: object
      properties:
        expires_at:
          type: string
        file_uuid:
          type: string
        status:
          $ref: '#/components/schemas/models.FileStatus'
        upload_url:
          type: string
    helpers.APIErrorResponse:
      type: object
      properties:
        code:
          type: string
          example: unauthorized
        details:
          type: string
          example: invalid or missing join token
        error:
          type: string
          example: Unauthorized
    models.FileStatus:
      type: string
      enum:
        - pending
        - uploading
        - available
        - tombstoned
        - deleted
      x-enum-varnames:
        - FileStatusPending
        - FileStatusUploading
        - FileStatusAvailable
        - FileStatusTombstoned
        - FileStatusDeleted
  securitySchemes:
    BearerAuth:
      description: Type "Bearer" followed by a space and JWT token.
      type: apiKey
      name: Authorization
      in: header

````