definitions:
  http.AuthTokenMin:
    properties:
      Permissions:
        $ref: '#/definitions/users.Permissions'
      created:
        type: integer
      expires:
        type: integer
      key:
        type: string
      name:
        type: string
    type: object
  http.HttpResponse:
    properties:
      message:
        type: string
      status:
        type: integer
      token:
        type: string
    type: object
  http.signupBody:
    properties:
      password:
        type: string
      username:
        type: string
    type: object
  indexing.SearchResult:
    properties:
      path:
        type: string
      size:
        type: integer
      type:
        type: string
    type: object
  iteminfo.FileInfo:
    properties:
      files:
        description: files in the directory
        items:
          $ref: '#/definitions/iteminfo.ItemInfo'
        type: array
      folders:
        description: folders in the directory
        items:
          $ref: '#/definitions/iteminfo.ItemInfo'
        type: array
      hidden:
        description: whether the file is hidden
        type: boolean
      modified:
        description: modification time
        type: string
      name:
        description: name of the file
        type: string
      path:
        description: path scoped to the associated index
        type: string
      size:
        description: length in bytes for regular files
        type: integer
      type:
        description: type of the file, either "directory" or a file mimetype
        type: string
    type: object
  iteminfo.ItemInfo:
    properties:
      hidden:
        description: whether the file is hidden
        type: boolean
      modified:
        description: modification time
        type: string
      name:
        description: name of the file
        type: string
      size:
        description: length in bytes for regular files
        type: integer
      type:
        description: type of the file, either "directory" or a file mimetype
        type: string
    type: object
  settings.Auth:
    properties:
      adminPassword:
        description: the password of the admin user. If not set, the default is "admin".
        type: string
      adminUsername:
        description: the username of the admin user. If not set, the default is "admin".
        type: string
      key:
        description: the key used to sign the JWT tokens. If not set, a random key
          will be generated.
        type: string
      methods:
        $ref: '#/definitions/settings.LoginMethods'
      resetAdminOnStart:
        description: if set to true, the admin user will be reset to the default username
          and password on startup.
        type: boolean
      tokenExpirationHours:
        description: the number of hours until the token expires. Default is 2 hours.
        type: integer
      totpSecret:
        description: secret used to encrypt TOTP secrets
        type: string
    type: object
  settings.ExternalLink:
    properties:
      text:
        description: the text to display on the link
        type: string
      title:
        description: the title to display on hover
        type: string
      url:
        description: the url to link to
        type: string
    required:
    - text
    - url
    type: object
  settings.Frontend:
    properties:
      disableDefaultLinks:
        description: disable default links in the sidebar
        type: boolean
      disableUsedPercentage:
        description: disable used percentage for the sources in the sidebar
        type: boolean
      externalLinks:
        items:
          $ref: '#/definitions/settings.ExternalLink'
        type: array
      name:
        description: display name
        type: string
    type: object
  settings.IndexFilter:
    properties:
      fileEndsWith:
        description: list of file names to include/exclude. Eg. "a.jpg"
        items:
          type: string
        type: array
      files:
        description: list of file names to include/exclude  Eg. "folder1" or "file1.txt"
          or "folder1/file1.txt" (do not include source path, just the subpaths from
          the source path)
        items:
          type: string
        type: array
      folders:
        description: list of folder names to include/exclude. Eg. "folder1" or "folder1/subfolder"
          (do not include source path, just the subpaths from the source path)
        items:
          type: string
        type: array
    type: object
  settings.Integrations:
    properties:
      media:
        $ref: '#/definitions/settings.Media'
      office:
        $ref: '#/definitions/settings.OnlyOffice'
    type: object
  settings.LogConfig:
    properties:
      apiLevels:
        description: separated list of log levels to enable for the API. (eg. "info|warning|error")
        type: string
      json:
        description: output in json format, currently not supported
        type: boolean
      levels:
        description: separated list of log levels to enable. (eg. "info|warning|error|debug")
        type: string
      noColors:
        description: disable colors in the output
        type: boolean
      output:
        description: output location. (eg. "stdout" or "path/to/file.log")
        type: string
      utc:
        description: use UTC time in the output instead of local time
        type: boolean
    type: object
  settings.LoginMethods:
    properties:
      noauth:
        description: if set to true, overrides all other auth methods and disables
          authentication
        type: boolean
      oidc:
        $ref: '#/definitions/settings.OidcConfig'
      password:
        $ref: '#/definitions/settings.PasswordAuthConfig'
      proxy:
        $ref: '#/definitions/settings.ProxyAuthConfig'
    type: object
  settings.Media:
    properties:
      ffmpegPath:
        description: path to ffmpeg directory with ffmpeg and ffprobe (eg. /usr/local/bin)
        type: string
    type: object
  settings.OidcConfig:
    properties:
      adminGroup:
        description: if set, users in this group will be granted admin privileges.
        type: string
      clientId:
        description: client id of the OIDC application
        type: string
      clientSecret:
        description: client secret of the OIDC application
        type: string
      createUser:
        description: create user if not exists
        type: boolean
      disableVerifyTLS:
        description: disable TLS verification for the OIDC provider. This is insecure
          and should only be used for testing.
        type: boolean
      enabled:
        description: whether to enable OIDC authentication
        type: boolean
      issuerUrl:
        description: authorization URL of the OIDC provider
        type: string
      logoutRedirectUrl:
        description: if provider logout url is provided, filebrowser will also redirect
          to logout url. Custom logout query params are respected.
        type: string
      scopes:
        description: scopes to request from the OIDC provider
        type: string
      userIdentifier:
        description: the field value to use as the username. Default is "preferred_username",
          can also be "email" or "username", or "phone"
        type: string
    type: object
  settings.OnlyOffice:
    properties:
      internalUrl:
        description: An optional internal address that the filebrowser server can
          use to communicate with the OnlyOffice Document Server, could be useful
          to bypass proxy.
        type: string
      secret:
        type: string
      url:
        description: The URL to the OnlyOffice Document Server, needs to be accessible
          to the user.
        type: string
    required:
    - secret
    - url
    type: object
  settings.PasswordAuthConfig:
    properties:
      enabled:
        type: boolean
      enforcedOtp:
        description: if set to true, TOTP is enforced for all password users users.
          Otherwise, users can choose to enable TOTP.
        type: boolean
      minLength:
        description: minimum pasword length required.
        minimum: 5
        type: integer
      recaptcha:
        allOf:
        - $ref: '#/definitions/settings.Recaptcha'
        description: recaptcha config, only used if signup is enabled
      signup:
        description: allow signups on login page if enabled -- not secure.
        type: boolean
    type: object
  settings.ProxyAuthConfig:
    properties:
      createUser:
        description: create user if not exists
        type: boolean
      enabled:
        type: boolean
      header:
        description: 'required header to use for authentication. Security Warning:
          FileBrowser blindly accepts the header value as username.'
        type: string
      logoutRedirectUrl:
        description: if provider logout url is provided, filebrowser will also redirect
          to logout url. Custom logout query params are respected.
        type: string
    type: object
  settings.Recaptcha:
    properties:
      host:
        type: string
      key:
        type: string
      secret:
        type: string
    required:
    - host
    - key
    - secret
    type: object
  settings.Server:
    properties:
      baseURL:
        description: base URL for the server, the subpath that the server is running
          on.
        type: string
      cacheDir:
        description: path to the cache directory, used for thumbnails and other cached
          files
        type: string
      database:
        description: path to the database file
        type: string
      debugMedia:
        description: output ffmpeg stdout for media integration -- careful can produces
          lots of output!
        type: boolean
      disablePreviewResize:
        description: disable resizing of previews for faster loading over slow connections
        type: boolean
      disablePreviews:
        description: disable all previews thumbnails, simple icons will be used
        type: boolean
      disableTypeDetectionByHeader:
        description: disable type detection by header, useful if filesystem is slow.
        type: boolean
      externalUrl:
        description: used by share links if set
        type: string
      internalUrl:
        description: used by integrations if set, this is the url that an integration
          service will use to communicate with filebrowser
        type: string
      logging:
        items:
          $ref: '#/definitions/settings.LogConfig'
        type: array
      maxArchiveSize:
        description: max pre-archive combined size of files/folder that are allowed
          to be archived (in GB)
        type: integer
      numImageProcessors:
        description: number of concurrent image processing jobs used to create previews,
          default is number of cpu cores available.
        type: integer
      port:
        description: port to listen on
        type: integer
      socket:
        description: socket to listen on
        type: string
      sources:
        items:
          $ref: '#/definitions/settings.Source'
        type: array
      tlsCert:
        description: path to TLS cert
        type: string
      tlsKey:
        description: path to TLS key
        type: string
    required:
    - sources
    type: object
  settings.Settings:
    properties:
      auth:
        $ref: '#/definitions/settings.Auth'
      frontend:
        $ref: '#/definitions/settings.Frontend'
      integrations:
        $ref: '#/definitions/settings.Integrations'
      server:
        $ref: '#/definitions/settings.Server'
      userDefaults:
        $ref: '#/definitions/settings.UserDefaults'
    type: object
  settings.Source:
    properties:
      config:
        $ref: '#/definitions/settings.SourceConfig'
      name:
        description: display name
        type: string
      path:
        description: file system path. (Can be relative)
        type: string
    required:
    - path
    type: object
  settings.SourceConfig:
    properties:
      createUserDir:
        description: create a user directory for each user
        type: boolean
      defaultEnabled:
        description: should be added as a default source for new users?
        type: boolean
      defaultUserScope:
        description: default "/" should match folders under path
        type: string
      disableIndexing:
        description: disable the indexing of this source
        type: boolean
      exclude:
        allOf:
        - $ref: '#/definitions/settings.IndexFilter'
        description: exclude files and folders from indexing, if include is not set
      ignoreHidden:
        description: ignore hidden files and folders.
        type: boolean
      ignoreZeroSizeFolders:
        description: ignore folders with 0 size
        type: boolean
      include:
        allOf:
        - $ref: '#/definitions/settings.IndexFilter'
        description: include files and folders from indexing, if exclude is not set
      indexingIntervalMinutes:
        description: optional manual overide interval in seconds to re-index the source
        type: integer
      maxWatchers:
        description: number of concurrent watchers to use for this source, currently
          not supported
        type: integer
      neverWatchPaths:
        description: paths to never watch, relative to the source path (eg. "/folder/file.txt")
        items:
          type: string
        type: array
    type: object
  settings.UserDefaults:
    properties:
      darkMode:
        description: should dark mode be enabled
        type: boolean
      dateFormat:
        description: when false, the date is relative, when true, the date is an exact
          timestamp
        type: boolean
      disableOfficePreviewExt:
        description: comma separated list of file extensions to disable office preview
          for
        type: string
      disableOnlyOfficeExt:
        description: comma separated list of file extensions to disable onlyoffice
          preview for
        type: string
      disableSettings:
        description: disable the user from viewing the settings page
        type: boolean
      disableUpdateNotifications:
        description: disable update notifications banner for admin users
        type: boolean
      gallerySize:
        description: 0-9 - the size of the gallery thumbnails
        type: integer
      locale:
        description: 'language to use: eg. de, en, or fr'
        type: string
      lockPassword:
        description: disable the user from changing their password
        type: boolean
      loginMethod:
        description: 'login method to use: eg. password, proxy, oidc'
        type: string
      permissions:
        $ref: '#/definitions/users.Permissions'
      preview:
        $ref: '#/definitions/users.Preview'
      quickDownload:
        description: show icon to download in one click
        type: boolean
      showHidden:
        description: show hidden files in the UI. On windows this includes files starting
          with a dot and windows hidden files
        type: boolean
      singleClick:
        description: open directory on single click, also enables middle click to
          open in new tab
        type: boolean
      stickySidebar:
        description: keep sidebar open when navigating
        type: boolean
      themeColor:
        description: 'theme color to use: eg. #ff0000, or var(--red), var(--purple),
          etc'
        type: string
      viewMode:
        description: 'view mode to use: eg. normal, list, grid, or compact'
        type: string
    type: object
  share.CreateBody:
    properties:
      expires:
        type: string
      password:
        type: string
      unit:
        type: string
    type: object
  share.Link:
    properties:
      expire:
        type: integer
      hash:
        type: string
      password_hash:
        type: string
      path:
        type: string
      source:
        type: string
      token:
        description: |-
          Token is a random value that will only be set when PasswordHash is set. It is
          URL-Safe and is used to download links in password-protected shares via a
          query arg.
        type: string
      userID:
        type: integer
    type: object
  users.AuthToken:
    properties:
      Permissions:
        $ref: '#/definitions/users.Permissions'
      belongsTo:
        type: integer
      createdAt:
        type: integer
      expiresAt:
        type: integer
      key:
        type: string
      name:
        type: string
    type: object
  users.LoginMethod:
    enum:
    - password
    - proxy
    - oidc
    type: string
    x-enum-varnames:
    - LoginMethodPassword
    - LoginMethodProxy
    - LoginMethodOidc
  users.Permissions:
    properties:
      admin:
        type: boolean
      api:
        type: boolean
      modify:
        type: boolean
      realtime:
        type: boolean
      share:
        type: boolean
    type: object
  users.Preview:
    properties:
      autoplayMedia:
        description: autoplay media files in preview
        type: boolean
      disableHideSidebar:
        description: disable the hide sidebar preview for previews and editors
        type: boolean
      highQuality:
        description: generate high quality preview images
        type: boolean
      image:
        description: show real image as icon instead of generic photo icon
        type: boolean
      motionVideoPreview:
        description: show multiple frames for videos in preview when hovering
        type: boolean
      office:
        description: show preview image for office files
        type: boolean
      popup:
        description: show larger popup preview when hovering
        type: boolean
      video:
        description: show preview image for video files
        type: boolean
    type: object
  users.Sorting:
    properties:
      asc:
        type: boolean
      by:
        type: string
    type: object
  users.SourceScope:
    properties:
      name:
        type: string
      scope:
        type: string
    type: object
  users.User:
    properties:
      apiKeys:
        additionalProperties:
          $ref: '#/definitions/users.AuthToken'
        type: object
      darkMode:
        description: should dark mode be enabled
        type: boolean
      dateFormat:
        description: when false, the date is relative, when true, the date is an exact
          timestamp
        type: boolean
      disableOfficePreviewExt:
        description: comma separated list of file extensions to disable office preview
          for
        type: string
      disableOnlyOfficeExt:
        description: comma separated list of file extensions to disable onlyoffice
          preview for
        type: string
      disableSettings:
        type: boolean
      disableUpdateNotifications:
        description: disable update notifications
        type: boolean
      gallerySize:
        description: 0-9 - the size of the gallery thumbnails
        type: integer
      id:
        type: integer
      locale:
        description: 'language to use: eg. de, en, or fr'
        type: string
      lockPassword:
        type: boolean
      loginMethod:
        $ref: '#/definitions/users.LoginMethod'
      otpEnabled:
        description: true if TOTP is enabled, false otherwise
        type: boolean
      password:
        type: string
      perm:
        allOf:
        - $ref: '#/definitions/users.Permissions'
        description: legacy for migration purposes... og filebrowser has perm attribute
      permissions:
        $ref: '#/definitions/users.Permissions'
      preview:
        $ref: '#/definitions/users.Preview'
      quickDownload:
        description: show icon to download in one click
        type: boolean
      scope:
        type: string
      scopes:
        items:
          $ref: '#/definitions/users.SourceScope'
        type: array
      showHidden:
        description: show hidden files in the UI. On windows this includes files starting
          with a dot and windows hidden files
        type: boolean
      singleClick:
        description: open directory on single click, also enables middle click to
          open in new tab
        type: boolean
      sorting:
        $ref: '#/definitions/users.Sorting'
      stickySidebar:
        description: keep sidebar open when navigating
        type: boolean
      themeColor:
        description: 'theme color to use: eg. #ff0000, or var(--red), var(--purple),
          etc'
        type: string
      totpNonce:
        type: string
      totpSecret:
        type: string
      username:
        type: string
      viewMode:
        description: 'view mode to use: eg. normal, list, grid, or compact'
        type: string
    type: object
info:
  contact: {}
paths:
  /api/auth/logout:
    post:
      description: logs a user out of the application.
      responses:
        "302":
          description: Redirect to redirect URL if configured in oidc config.
          schema:
            type: string
      summary: User Logout
      tags:
      - Auth
  /api/auth/otp/generate:
    post:
      consumes:
      - application/json
      description: Generates a new TOTP secret and QR code for the authenticated user.
      produces:
      - application/json
      responses:
        "200":
          description: OTP secret generated successfully.
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - ApiKeyAuth: []
      summary: Generate OTP
      tags:
      - OTP
  /api/auth/otp/verify:
    post:
      consumes:
      - application/json
      description: Verifies the provided TOTP code for the authenticated user.
      parameters:
      - description: TOTP code to verify
        in: query
        name: code
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OTP token is valid.
          schema:
            $ref: '#/definitions/http.HttpResponse'
        "401":
          description: Unauthorized - invalid TOTP token
          schema:
            additionalProperties:
              type: string
            type: object
      security:
      - ApiKeyAuth: []
      summary: Verify OTP
      tags:
      - OTP
  /api/createApiKey:
    post:
      consumes:
      - application/json
      description: Create an API key with specified name, duration, and permissions.
      parameters:
      - description: Name of the API key
        in: query
        name: name
        required: true
        type: string
      - description: Duration of the API key in days
        in: query
        name: days
        required: true
        type: string
      - description: Permissions for the API key (comma-separated)
        in: query
        name: permissions
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Token created successfully, resoponse contains json object
            with token key
          schema:
            $ref: '#/definitions/http.HttpResponse'
        "400":
          description: Bad request
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not found
          schema:
            additionalProperties:
              type: string
            type: object
        "409":
          description: Conflict
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Create API key
      tags:
      - API Keys
  /api/deleteApiKey:
    delete:
      consumes:
      - application/json
      description: Delete an API key with specified name.
      parameters:
      - description: Name of the API key to delete
        in: query
        name: name
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: API key deleted successfully
          schema:
            $ref: '#/definitions/http.HttpResponse'
        "404":
          description: Not found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Delete API key
      tags:
      - API Keys
  /api/listApiKeys:
    get:
      consumes:
      - application/json
      description: List all API keys or retrieve details for a specific key.
      parameters:
      - description: Name of the API to retrieve details
        in: query
        name: name
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: List of API keys or specific key details
          schema:
            $ref: '#/definitions/http.AuthTokenMin'
        "404":
          description: Not found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: List API keys
      tags:
      - API Keys
  /api/login:
    post:
      consumes:
      - application/json
      description: Authenticate a user with a username and password.
      produces:
      - application/json
      responses:
        "200":
          description: JWT token for authentication
          schema:
            type: string
        "403":
          description: Forbidden - authentication failed
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: User login
      tags:
      - Auth
  /api/preview:
    get:
      consumes:
      - application/json
      description: Returns a preview image based on the requested path and size.
      parameters:
      - description: source hash
        in: query
        name: hash
        required: true
        type: string
      - description: File path of the image to preview
        in: query
        name: path
        required: true
        type: string
      - description: Preview size ('small' or 'large'). Default is based on server
          config.
        in: query
        name: size
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Preview image content
          schema:
            type: file
        "202":
          description: Download permissions required
          schema:
            additionalProperties:
              type: string
            type: object
        "400":
          description: Invalid request path
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: File not found
          schema:
            additionalProperties:
              type: string
            type: object
        "415":
          description: Unsupported file type for preview
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Get image preview
      tags:
      - Resources
  /api/raw:
    get:
      consumes:
      - application/json
      description: Returns the raw content of a file, multiple files, or a directory.
        Supports downloading files as archives in various formats.
      parameters:
      - description: a list of files in the following format 'source::filename' and
          separated by '||' with additional items in the list. (required)
        in: query
        name: files
        required: true
        type: string
      - description: If true, sets 'Content-Disposition' to 'inline'. Otherwise, defaults
          to 'attachment'.
        in: query
        name: inline
        type: boolean
      - description: 'Compression algorithm for archiving multiple files or directories.
          Options: ''zip'' and ''tar.gz''. Default is ''zip''.'
        in: query
        name: algo
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Raw file or directory content, or archive for multiple files
          schema:
            type: file
        "202":
          description: Modify permissions required
          schema:
            additionalProperties:
              type: string
            type: object
        "400":
          description: Invalid request path
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: File or directory not found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Get raw content of a file, multiple files, or directory
      tags:
      - Resources
  /api/renew:
    post:
      consumes:
      - application/json
      description: Refresh the authentication token for a logged-in user.
      produces:
      - application/json
      responses:
        "200":
          description: New JWT token generated
          schema:
            type: string
        "401":
          description: Unauthorized - invalid token
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Renew authentication token
      tags:
      - Auth
  /api/resources:
    delete:
      consumes:
      - application/json
      description: Deletes a resource located at the specified path.
      parameters:
      - description: Path to the resource
        in: query
        name: path
        required: true
        type: string
      - description: Source name for the desired source, default is used if not provided
        in: query
        name: source
        type: string
      - description: Name for the desired source, default is used if not provided
        in: query
        name: source
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Resource deleted successfully
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Resource not found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Delete a resource
      tags:
      - Resources
    get:
      consumes:
      - application/json
      description: Returns metadata and optionally file contents for a specified resource
        path.
      parameters:
      - description: Path to the resource
        in: query
        name: path
        required: true
        type: string
      - description: Source name for the desired source, default is used if not provided
        in: query
        name: source
        type: string
      - description: Name for the desired source, default is used if not provided
        in: query
        name: source
        type: string
      - description: Include file content if true
        in: query
        name: content
        type: string
      - description: Optional checksum validation
        in: query
        name: checksum
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Resource metadata
          schema:
            $ref: '#/definitions/iteminfo.FileInfo'
        "404":
          description: Resource not found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Get resource information
      tags:
      - Resources
    patch:
      consumes:
      - application/json
      description: Moves or renames a resource to a new destination.
      parameters:
      - description: Path from resource in <source_name>::<index_path> format
        in: query
        name: from
        required: true
        type: string
      - description: Destination path for the resource
        in: query
        name: destination
        required: true
        type: string
      - description: Action to perform (copy, rename)
        in: query
        name: action
        required: true
        type: string
      - description: Overwrite if destination exists
        in: query
        name: overwrite
        type: boolean
      - description: Rename if destination exists
        in: query
        name: rename
        type: boolean
      produces:
      - application/json
      responses:
        "200":
          description: Resource moved/renamed successfully
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Resource not found
          schema:
            additionalProperties:
              type: string
            type: object
        "409":
          description: Conflict - Destination exists
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Patch resource (move/rename)
      tags:
      - Resources
    post:
      consumes:
      - application/json
      description: Creates a new resource or uploads a file at the specified path.
        Supports file uploads and directory creation.
      parameters:
      - description: Destination path where to place the files inside the destination
          source, a directory must end in / to create a directory
        in: query
        name: path
        required: true
        type: string
      - description: Name for the desired filebrowser destination source name, default
          is used if not provided
        in: query
        name: source
        type: string
      - description: Override existing file if true
        in: query
        name: override
        type: boolean
      produces:
      - application/json
      responses:
        "200":
          description: Resource created successfully
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Resource not found
          schema:
            additionalProperties:
              type: string
            type: object
        "409":
          description: Conflict - Resource already exists
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Create or upload a resource
      tags:
      - Resources
    put:
      consumes:
      - application/json
      description: Updates an existing file at the specified path.
      parameters:
      - description: Destination path where to place the files inside the destination
          source
        in: query
        name: path
        required: true
        type: string
      - description: Source name for the desired source, default is used if not provided
        in: query
        name: source
        type: string
      - description: Name for the desired source, default is used if not provided
        in: query
        name: source
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Resource updated successfully
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Resource not found
          schema:
            additionalProperties:
              type: string
            type: object
        "405":
          description: Method not allowed
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Update a file resource
      tags:
      - Resources
  /api/search:
    get:
      consumes:
      - application/json
      description: Searches for files matching the provided query. Returns file paths
        and metadata based on the user's session and scope.
      parameters:
      - description: Search query
        in: query
        name: query
        required: true
        type: string
      - description: path within user scope to search, for example '/first/second'
          to search within the second directory only
        in: query
        name: scope
        type: string
      - description: User session ID, add unique value to prevent collisions
        in: header
        name: SessionId
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: List of search results
          schema:
            items:
              $ref: '#/definitions/indexing.SearchResult'
            type: array
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Search Files
      tags:
      - Search
  /api/settings:
    get:
      consumes:
      - application/json
      description: Returns the current configuration settings for signup, user directories,
        rules, frontend.
      parameters:
      - description: 'Property to retrieve: `userDefaults`, `frontend`, `auth`, `server`,
          `sources`'
        in: query
        name: property
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: System settings data
          schema:
            $ref: '#/definitions/settings.Settings'
      summary: Get system settings
      tags:
      - Settings
  /api/share:
    get:
      consumes:
      - application/json
      description: Retrieves all share links associated with a specific resource path
        for the current user.
      parameters:
      - description: Resource path for which to retrieve share links
        in: query
        name: path
        required: true
        type: string
      - description: Source name for share links
        in: query
        name: source
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: List of share links for the specified path
          schema:
            items:
              $ref: '#/definitions/share.Link'
            type: array
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Get share links by path
      tags:
      - Shares
  /api/shares:
    get:
      consumes:
      - application/json
      description: Returns a list of share links for the current user, or all links
        if the user is an admin.
      produces:
      - application/json
      responses:
        "200":
          description: List of share links
          schema:
            items:
              $ref: '#/definitions/share.Link'
            type: array
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: List share links
      tags:
      - Shares
    post:
      consumes:
      - application/json
      description: Creates a new share link with an optional expiration time and password
        protection.
      parameters:
      - description: Share link creation parameters
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/share.CreateBody'
      - description: Source Path of the files to share
        in: path
        name: path
        required: true
        type: string
      - description: Source name of the files to share
        in: path
        name: source
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Created share link
          schema:
            $ref: '#/definitions/share.Link'
        "400":
          description: Bad request - failed to decode body
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Create a share link
      tags:
      - Shares
  /api/shares/{hash}:
    delete:
      consumes:
      - application/json
      description: Deletes a share link specified by its hash.
      parameters:
      - description: Hash of the share link to delete
        in: path
        name: hash
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Share link deleted successfully
        "400":
          description: Bad request - missing or invalid hash
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Delete a share link
      tags:
      - Shares
  /api/signup:
    post:
      consumes:
      - application/json
      description: Register a new user account with a username and password.
      parameters:
      - description: User signup details
        in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/http.signupBody'
      produces:
      - application/json
      responses:
        "201":
          description: User created successfully
          schema:
            type: string
        "400":
          description: Bad request - invalid input
          schema:
            additionalProperties:
              type: string
            type: object
        "405":
          description: Method not allowed - signup is disabled
          schema:
            additionalProperties:
              type: string
            type: object
        "409":
          description: Conflict - user already exists
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: User signup
      tags:
      - Auth
  /api/users:
    post:
      consumes:
      - application/json
      description: Adds a new user to the system.
      parameters:
      - description: User data to create a new user
        in: body
        name: data
        required: true
        schema:
          $ref: '#/definitions/users.User'
      produces:
      - application/json
      responses:
        "201":
          description: Created user
          schema:
            $ref: '#/definitions/users.User'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal Server Error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Create a new user
      tags:
      - Users
  /api/users/{id}:
    delete:
      consumes:
      - application/json
      description: Deletes a user identified by their ID.
      parameters:
      - description: User ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: User deleted successfully
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal Server Error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Delete a user by ID
      tags:
      - Users
    get:
      consumes:
      - application/json
      description: Returns a user's details based on their ID.
      parameters:
      - description: User ID
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: User details
          schema:
            $ref: '#/definitions/users.User'
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: Not Found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal Server Error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Retrieve a user by ID
      tags:
      - Users
    put:
      consumes:
      - application/json
      description: Updates the details of a user identified by ID.
      parameters:
      - description: User ID
        in: path
        name: id
        required: true
        type: integer
      - description: User data to update
        in: body
        name: data
        required: true
        schema:
          $ref: '#/definitions/users.User'
      produces:
      - application/json
      responses:
        "200":
          description: Updated user details
          schema:
            $ref: '#/definitions/users.User'
        "400":
          description: Bad Request
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal Server Error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Update a user's details
      tags:
      - Users
  /health:
    get:
      consumes:
      - application/json
      description: Returns the health status of the API.
      produces:
      - application/json
      responses:
        "200":
          description: successful health check response
          schema:
            $ref: '#/definitions/http.HttpResponse'
      summary: Health Check
      tags:
      - Health
  /public/dl:
    get:
      consumes:
      - application/json
      description: Returns the raw content of a file, multiple files, or a directory.
        Supports downloading files as archives in various formats.
      parameters:
      - description: a list of files in the following format 'filename' and separated
          by '||' with additional items in the list. (required)
        in: query
        name: files
        required: true
        type: string
      - description: If true, sets 'Content-Disposition' to 'inline'. Otherwise, defaults
          to 'attachment'.
        in: query
        name: inline
        type: boolean
      - description: 'Compression algorithm for archiving multiple files or directories.
          Options: ''zip'' and ''tar.gz''. Default is ''zip''.'
        in: query
        name: algo
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Raw file or directory content, or archive for multiple files
          schema:
            type: file
        "202":
          description: Modify permissions required
          schema:
            additionalProperties:
              type: string
            type: object
        "400":
          description: Invalid request path
          schema:
            additionalProperties:
              type: string
            type: object
        "404":
          description: File or directory not found
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Get raw content of a file, multiple files, or directory
      tags:
      - Resources
swagger: "2.0"
