Files
filebrowser/backend/swagger/docs/docs.go
T
2025-08-25 10:58:31 -05:00

3667 lines
133 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/access": {
"get": {
"description": "Lists access rules. Can be filtered by source, path, user, or group. Can also be grouped by user or group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "List access rules",
"parameters": [
{
"type": "string",
"description": "Source name (e.g. 'default')",
"name": "source",
"in": "query"
},
{
"type": "string",
"description": "Index path (e.g. /secret)",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "Username to filter rules for",
"name": "user",
"in": "query"
},
{
"type": "string",
"description": "Group name to filter rules for",
"name": "group",
"in": "query"
}
],
"responses": {
"200": {
"description": "Varies based on query. Can be access.FrontendAccessRule (when source and path specified), []access.PrincipalRule, map[string][]access.PrincipalRule, or map[string]access.FrontendAccessRule",
"schema": {
"type": "object"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Add or update an access rule for a sourcePath and indexPath.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "Add or update access rule",
"parameters": [
{
"type": "string",
"description": "Source path prefix (e.g. mnt/storage)",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Index path (e.g. /secret)",
"name": "path",
"in": "query",
"required": true
},
{
"description": "Rule details: allow (true/false), ruleCategory (user/group), value (username or groupname)",
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"allow": {
"type": "boolean"
},
"ruleCategory": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
],
"responses": {
"200": {
"description": "Rule added or updated",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete a user or group from an allow or deny list for a sourcePath and indexPath.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "Delete access rule entry",
"parameters": [
{
"type": "string",
"description": "Source path prefix (e.g. mnt/storage)",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Index path (e.g. /secret)",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Rule type (allow or deny)",
"name": "ruleType",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Rule category (user or group)",
"name": "ruleCategory",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Username or groupname to remove",
"name": "value",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Rule entry deleted",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/access/group": {
"post": {
"description": "Adds a user to a group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "Add a user to a group",
"parameters": [
{
"type": "string",
"description": "Group name",
"name": "group",
"in": "query",
"required": true
},
{
"type": "string",
"description": "User name",
"name": "user",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "User added to group successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Removes a user from a group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "Remove a user from a group",
"parameters": [
{
"type": "string",
"description": "Group name",
"name": "group",
"in": "query",
"required": true
},
{
"type": "string",
"description": "User name",
"name": "user",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "User removed from group successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/access/groups": {
"get": {
"description": "Returns a list of all groups or the groups for a specific user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "Get all groups or groups for a user",
"parameters": [
{
"type": "string",
"description": "User name",
"name": "user",
"in": "query"
}
],
"responses": {
"200": {
"description": "Object containing a list of groups",
"schema": {
"$ref": "#/definitions/http.GroupListResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/auth/logout": {
"post": {
"description": "Returns a logout URL for the frontend to redirect to.",
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "User Logout",
"parameters": [
{
"type": "string",
"description": "JWT token",
"name": "auth",
"in": "query"
}
],
"responses": {
"200": {
"description": "{\"logoutUrl\": \"http://...\"}",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/auth/oidc/callback": {
"get": {
"description": "Handles OIDC login callback.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"OIDC"
],
"summary": "OIDC callback",
"parameters": [
{
"type": "string",
"description": "OIDC code",
"name": "code",
"in": "query"
},
{
"type": "string",
"description": "OIDC state",
"name": "state",
"in": "query"
}
],
"responses": {
"200": {
"description": "OIDC callback result",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/auth/oidc/login": {
"get": {
"description": "Initiates OIDC login flow.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"OIDC"
],
"summary": "OIDC login",
"responses": {
"302": {
"description": "Redirect to OIDC provider",
"schema": {
"type": "string"
}
}
}
}
},
"/api/auth/otp/generate": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Generates a new TOTP secret and QR code for the authenticated user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"OTP"
],
"summary": "Generate OTP",
"responses": {
"200": {
"description": "OTP secret generated successfully.",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/auth/otp/verify": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Verifies the provided TOTP code for the authenticated user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"OTP"
],
"summary": "Verify OTP",
"parameters": [
{
"type": "string",
"description": "TOTP code to verify",
"name": "code",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OTP token is valid.",
"schema": {
"$ref": "#/definitions/http.HttpResponse"
}
},
"401": {
"description": "Unauthorized - invalid TOTP token",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/auth/token": {
"put": {
"description": "Create an API key with specified name, duration, and permissions.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"API Keys"
],
"summary": "Create API key",
"parameters": [
{
"type": "string",
"description": "Name of the API key",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Duration of the API key in days",
"name": "days",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Permissions for the API key (comma-separated)",
"name": "permissions",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Token created successfully, response contains json object with token key",
"schema": {
"$ref": "#/definitions/http.HttpResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete an API key with specified name.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"API Keys"
],
"summary": "Delete API key",
"parameters": [
{
"type": "string",
"description": "Name of the API key to delete",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "API key deleted successfully",
"schema": {
"$ref": "#/definitions/http.HttpResponse"
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/auth/tokens": {
"get": {
"description": "List all API keys or retrieve details for a specific key.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"API Keys"
],
"summary": "List API keys",
"parameters": [
{
"type": "string",
"description": "Name of the API to retrieve details",
"name": "name",
"in": "query"
}
],
"responses": {
"200": {
"description": "List of API keys or specific key details",
"schema": {
"$ref": "#/definitions/http.AuthTokenMin"
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/jobs/{action}/{target}": {
"get": {
"description": "Returns job info for the user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Jobs"
],
"summary": "Get jobs info",
"parameters": [
{
"type": "string",
"description": "Job action",
"name": "action",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Job target",
"name": "target",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Job info",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/indexing.ReducedIndex"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/login": {
"post": {
"description": "Authenticate a user with a username and password.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "User login",
"responses": {
"200": {
"description": "JWT token for authentication",
"schema": {
"type": "string"
}
},
"403": {
"description": "Forbidden - authentication failed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/preview": {
"get": {
"description": "Returns a preview image based on the requested path and size.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Get image preview",
"parameters": [
{
"type": "string",
"description": "File path of the image to preview",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Preview size ('small' or 'large'). Default is based on server config.",
"name": "size",
"in": "query"
}
],
"responses": {
"200": {
"description": "Preview image content",
"schema": {
"type": "file"
}
},
"202": {
"description": "Download permissions required",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request path",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"415": {
"description": "Unsupported file type for preview",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"501": {
"description": "Preview generation not implemented",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/public/preview": {
"get": {
"description": "Returns a preview image based on the requested path and size.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Get image preview",
"parameters": [
{
"type": "string",
"description": "source hash",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "string",
"description": "File path of the image to preview",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Preview size ('small' or 'large'). Default is based on server config.",
"name": "size",
"in": "query"
}
],
"responses": {
"200": {
"description": "Preview image content",
"schema": {
"type": "file"
}
},
"202": {
"description": "Download permissions required",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request path",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"415": {
"description": "Unsupported file type for preview",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/raw": {
"get": {
"description": "Returns the raw content of a file, multiple files, or a directory. Supports downloading files as archives in various formats.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Get raw content of a file, multiple files, or directory",
"parameters": [
{
"type": "string",
"description": "a list of files in the following format 'source::filename' and separated by '||' with additional items in the list. (required)",
"name": "files",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "If true, sets 'Content-Disposition' to 'inline'. Otherwise, defaults to 'attachment'.",
"name": "inline",
"in": "query"
},
{
"type": "string",
"description": "Compression algorithm for archiving multiple files or directories. Options: 'zip' and 'tar.gz'. Default is 'zip'.",
"name": "algo",
"in": "query"
}
],
"responses": {
"200": {
"description": "Raw file or directory content, or archive for multiple files",
"schema": {
"type": "file"
}
},
"202": {
"description": "Modify permissions required",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request path",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File or directory not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/renew": {
"post": {
"description": "Refresh the authentication token for a logged-in user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Renew authentication token",
"responses": {
"200": {
"description": "New JWT token generated",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized - invalid token",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/resources": {
"get": {
"description": "Returns metadata and optionally file contents for a specified resource path.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Get resource information",
"parameters": [
{
"type": "string",
"description": "Path to the resource",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the desired source, default is used if not provided",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Include file content if true",
"name": "content",
"in": "query"
},
{
"type": "string",
"description": "Optional checksum validation",
"name": "checksum",
"in": "query"
}
],
"responses": {
"200": {
"description": "Resource metadata",
"schema": {
"$ref": "#/definitions/iteminfo.FileInfo"
}
},
"404": {
"description": "Resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Updates an existing file at the specified path.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Update a file resource",
"parameters": [
{
"type": "string",
"description": "Destination path where to place the files inside the destination source",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the desired source, default is used if not provided",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Resource updated successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"405": {
"description": "Method not allowed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Creates a new resource or uploads a file at the specified path. Supports file uploads and directory creation.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Create or upload a resource",
"parameters": [
{
"type": "string",
"description": "url encoded destination path where to place the files inside the destination source, a directory must end in / to create a directory",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Name for the desired filebrowser destination source name, default is used if not provided",
"name": "source",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "Override existing file if true",
"name": "override",
"in": "query"
}
],
"responses": {
"200": {
"description": "Resource created successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict - Resource already exists",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Deletes a resource located at the specified path.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Delete a resource",
"parameters": [
{
"type": "string",
"description": "Path to the resource",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the desired source, default is used if not provided",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Resource deleted successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"patch": {
"description": "Moves or renames a resource to a new destination.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Patch resource (move/rename)",
"parameters": [
{
"type": "string",
"description": "Path from resource in \u003csource_name\u003e::\u003cindex_path\u003e format",
"name": "from",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Destination path for the resource",
"name": "destination",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Action to perform (copy, rename)",
"name": "action",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "Overwrite if destination exists",
"name": "overwrite",
"in": "query"
},
{
"type": "boolean",
"description": "Rename if destination exists",
"name": "rename",
"in": "query"
}
],
"responses": {
"200": {
"description": "Resource moved/renamed successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict - Destination exists",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/search": {
"get": {
"description": "Searches for files matching the provided query. Returns file paths and metadata based on the user's session and scope.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Search"
],
"summary": "Search Files",
"parameters": [
{
"type": "string",
"description": "Search query",
"name": "query",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the desired source",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "path within user scope to search, for example '/first/second' to search within the second directory only",
"name": "scope",
"in": "query"
},
{
"type": "string",
"description": "User session ID, add unique value to prevent collisions",
"name": "SessionId",
"in": "header"
}
],
"responses": {
"200": {
"description": "List of search results",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/indexing.SearchResult"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/settings": {
"get": {
"description": "Returns the current configuration settings for signup, user directories, rules, frontend.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Settings"
],
"summary": "Get system settings",
"parameters": [
{
"type": "string",
"description": "Property to retrieve: ` + "`" + `userDefaults` + "`" + `, ` + "`" + `frontend` + "`" + `, ` + "`" + `auth` + "`" + `, ` + "`" + `server` + "`" + `, ` + "`" + `sources` + "`" + `",
"name": "property",
"in": "query"
}
],
"responses": {
"200": {
"description": "System settings data",
"schema": {
"$ref": "#/definitions/settings.Settings"
}
}
}
}
},
"/api/share": {
"get": {
"description": "Retrieves all share links associated with a specific resource path for the current user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Get share links by path",
"parameters": [
{
"type": "string",
"description": "Resource path for which to retrieve share links",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for share links",
"name": "source",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "List of share links for the specified path",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/share.Link"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Creates a new share link with an optional expiration time and password protection.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Create a share link",
"parameters": [
{
"description": "Share creation parameters",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/share.CreateBody"
}
}
],
"responses": {
"200": {
"description": "Created share link",
"schema": {
"$ref": "#/definitions/share.Link"
}
},
"400": {
"description": "Bad request - failed to decode body",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/shares": {
"get": {
"description": "Returns a list of share links for the current user, or all links if the user is an admin.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "List share links",
"responses": {
"200": {
"description": "List of share links",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/share.Link"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Deletes a share link specified by its hash.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Delete a share link",
"parameters": [
{
"type": "string",
"description": "Hash of the share link to delete",
"name": "hash",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Share link deleted successfully"
},
"400": {
"description": "Bad request - missing or invalid hash",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/signup": {
"post": {
"description": "Register a new user account with a username and password.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "User signup",
"parameters": [
{
"description": "User signup details",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.signupBody"
}
}
],
"responses": {
"201": {
"description": "User created successfully",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad request - invalid input",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"405": {
"description": "Method not allowed - signup is disabled",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict - user already exists",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/users": {
"get": {
"description": "Returns a user's details based on their ID, or all users if no id is provided.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Retrieve a user by ID",
"parameters": [
{
"type": "string",
"description": "User ID or 'self'",
"name": "id",
"in": "query"
}
],
"responses": {
"200": {
"description": "User details or list of users",
"schema": {
"$ref": "#/definitions/users.User"
}
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Updates the details of a user identified by ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Update a user's details",
"parameters": [
{
"type": "string",
"description": "user ID to update",
"name": "id",
"in": "query"
},
{
"type": "string",
"description": "usename to update",
"name": "id",
"in": "query"
},
{
"description": "User data to update",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/users.User"
}
}
],
"responses": {
"200": {
"description": "Updated user details",
"schema": {
"$ref": "#/definitions/users.User"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Adds a new user to the system.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Create a new user",
"parameters": [
{
"description": "User data to create a new user",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/users.User"
}
}
],
"responses": {
"201": {
"description": "Created user",
"schema": {
"$ref": "#/definitions/users.User"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Deletes a user identified by their ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Delete a user by ID",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "User deleted successfully"
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/health": {
"get": {
"description": "Returns the health status of the API.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Health"
],
"summary": "Health Check",
"responses": {
"200": {
"description": "successful health check response",
"schema": {
"$ref": "#/definitions/http.HttpResponse"
}
}
}
}
},
"/public/dl": {
"get": {
"description": "Returns the raw content of a file, multiple files, or a directory. Supports downloading files as archives in various formats.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Get raw content of a file, multiple files, or directory",
"parameters": [
{
"type": "string",
"description": "if specified, only the files in the list will be downloaded. eg. files=/file1||/folder/file2",
"name": "files",
"in": "query"
},
{
"type": "boolean",
"description": "If true, sets 'Content-Disposition' to 'inline'. Otherwise, defaults to 'attachment'.",
"name": "inline",
"in": "query"
},
{
"type": "string",
"description": "Compression algorithm for archiving multiple files or directories. Options: 'zip' and 'tar.gz'. Default is 'zip'.",
"name": "algo",
"in": "query"
}
],
"responses": {
"200": {
"description": "Raw file or directory content, or archive for multiple files",
"schema": {
"type": "file"
}
},
"202": {
"description": "Modify permissions required",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request path",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File or directory not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/public/share/direct": {
"get": {
"description": "Creates a direct download link for a specific file with configurable duration, download count, and speed limits. If a share already exists with matching parameters, the existing share will be reused.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Create direct download link",
"parameters": [
{
"type": "string",
"description": "File path to create download link for",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the file",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Duration in minutes for link validity (default: 60)",
"name": "duration",
"in": "query"
},
{
"type": "string",
"description": "Maximum number of downloads allowed (default: unlimited)",
"name": "count",
"in": "query"
},
{
"type": "string",
"description": "Download speed limit in kbps (default: unlimited)",
"name": "speed",
"in": "query"
}
],
"responses": {
"201": {
"description": "Direct download link created",
"schema": {
"$ref": "#/definitions/http.DirectDownloadResponse"
}
},
"400": {
"description": "Bad request - invalid parameters or path is not a file",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden - access denied",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"definitions": {
"http.AuthTokenMin": {
"type": "object",
"properties": {
"Permissions": {
"$ref": "#/definitions/users.Permissions"
},
"created": {
"type": "integer"
},
"expires": {
"type": "integer"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"http.DirectDownloadResponse": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"status": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"http.GroupListResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"http.HttpResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
},
"token": {
"type": "string"
}
}
},
"http.signupBody": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"indexing.IndexStatus": {
"type": "string",
"enum": [
"ready",
"indexing",
"unavailable"
],
"x-enum-varnames": [
"READY",
"INDEXING",
"UNAVAILABLE"
]
},
"indexing.ReducedIndex": {
"type": "object",
"properties": {
"assessment": {
"type": "string"
},
"fullScanDurationSeconds": {
"type": "integer"
},
"lastIndexedUnixTime": {
"type": "integer"
},
"name": {
"type": "string"
},
"numDeleted": {
"type": "integer"
},
"numDirs": {
"type": "integer"
},
"numFiles": {
"type": "integer"
},
"quickScanDurationSeconds": {
"type": "integer"
},
"status": {
"$ref": "#/definitions/indexing.IndexStatus"
},
"total": {
"type": "integer"
},
"used": {
"type": "integer"
}
}
},
"indexing.SearchResult": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"size": {
"type": "integer"
},
"type": {
"type": "string"
}
}
},
"iteminfo.FileInfo": {
"type": "object",
"properties": {
"files": {
"description": "files in the directory",
"type": "array",
"items": {
"$ref": "#/definitions/iteminfo.ItemInfo"
}
},
"folders": {
"description": "folders in the directory",
"type": "array",
"items": {
"$ref": "#/definitions/iteminfo.ItemInfo"
}
},
"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"
}
}
},
"iteminfo.ItemInfo": {
"type": "object",
"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"
}
}
},
"settings.Auth": {
"type": "object",
"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"
},
"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"
}
}
},
"settings.CustomTheme": {
"type": "object",
"properties": {
"css": {
"description": "The css file path and filename to use for the theme.",
"type": "string"
},
"description": {
"description": "The description of the theme to display in the UI.",
"type": "string"
}
}
},
"settings.ExcludeIndexFilter": {
"type": "object",
"properties": {
"fileEndsWith": {
"description": "(global) exclude files that end with these suffixes. Eg. \".jpg\" or \".txt\"",
"type": "array",
"items": {
"type": "string"
}
},
"fileNames": {
"description": "(global) list of file names to include/exclude. Eg. \"a.jpg\"",
"type": "array",
"items": {
"type": "string"
}
},
"filePaths": {
"description": "list of filepaths Eg. \"folder1\" or \"file1.txt\" or \"folder1/file1.txt\" (without source path prefix)",
"type": "array",
"items": {
"type": "string"
}
},
"folderEndsWith": {
"description": "(global) exclude folders that end with these suffixes. Eg. \".thumbnails\" or \".git\"",
"type": "array",
"items": {
"type": "string"
}
},
"folderNames": {
"description": "(global) list of folder names to include/exclude. Eg. \"@eadir\" or \".thumbnails\"",
"type": "array",
"items": {
"type": "string"
}
},
"folderPaths": {
"description": "(filepath) list of folder names to include/exclude. Eg. \"folder1\" or \"folder1/subfolder\" (do not include source path, just the subpaths from the source path)",
"type": "array",
"items": {
"type": "string"
}
},
"hidden": {
"description": "exclude hidden files and folders.",
"type": "boolean"
},
"ignoreZeroSizeFolders": {
"description": "ignore folders with 0 size",
"type": "boolean"
}
}
},
"settings.ExternalLink": {
"type": "object",
"required": [
"text",
"url"
],
"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"
}
}
},
"settings.Frontend": {
"type": "object",
"properties": {
"disableDefaultLinks": {
"description": "disable default links in the sidebar",
"type": "boolean"
},
"disableNavButtons": {
"description": "disable the nav buttons in the sidebar",
"type": "boolean"
},
"disableUsedPercentage": {
"description": "disable used percentage for the sources in the sidebar",
"type": "boolean"
},
"externalLinks": {
"type": "array",
"items": {
"$ref": "#/definitions/settings.ExternalLink"
}
},
"name": {
"description": "display name",
"type": "string"
},
"styling": {
"$ref": "#/definitions/settings.StylingConfig"
}
}
},
"settings.IncludeIndexFilter": {
"type": "object",
"properties": {
"rootFiles": {
"description": "list of root files to include, relative to the source path (eg. \"file1.txt\")",
"type": "array",
"items": {
"type": "string"
}
},
"rootFolders": {
"description": "list of root folders to include, relative to the source path (eg. \"folder1\")",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"settings.Integrations": {
"type": "object",
"properties": {
"media": {
"$ref": "#/definitions/settings.Media"
},
"office": {
"$ref": "#/definitions/settings.OnlyOffice"
}
}
},
"settings.LogConfig": {
"type": "object",
"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"
}
}
},
"settings.LoginMethods": {
"type": "object",
"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"
}
}
},
"settings.Media": {
"type": "object",
"properties": {
"ffmpegPath": {
"description": "path to ffmpeg directory with ffmpeg and ffprobe (eg. /usr/local/bin)",
"type": "string"
}
}
},
"settings.OidcConfig": {
"type": "object",
"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"
},
"groupsClaim": {
"description": "the JSON field name to read groups from. Default is \"groups\"",
"type": "string"
},
"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"
}
}
},
"settings.OnlyOffice": {
"type": "object",
"required": [
"secret",
"url"
],
"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"
}
}
},
"settings.PasswordAuthConfig": {
"type": "object",
"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, default is 5.",
"type": "integer"
},
"recaptcha": {
"description": "recaptcha config, only used if signup is enabled",
"allOf": [
{
"$ref": "#/definitions/settings.Recaptcha"
}
]
},
"signup": {
"description": "allow signups on login page if enabled -- not secure.",
"type": "boolean"
}
}
},
"settings.ProxyAuthConfig": {
"type": "object",
"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"
}
}
},
"settings.Recaptcha": {
"type": "object",
"required": [
"host",
"key",
"secret"
],
"properties": {
"host": {
"type": "string"
},
"key": {
"type": "string"
},
"secret": {
"type": "string"
}
}
},
"settings.Server": {
"type": "object",
"required": [
"sources"
],
"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 (eg. http://mydomain.com)",
"type": "string"
},
"internalUrl": {
"description": "used by integrations if set, this is the base domain that an integration service will use to communicate with filebrowser (eg. http://localhost:8080)",
"type": "string"
},
"logging": {
"type": "array",
"items": {
"$ref": "#/definitions/settings.LogConfig"
}
},
"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": {
"type": "array",
"items": {
"$ref": "#/definitions/settings.Source"
}
},
"tlsCert": {
"description": "path to TLS cert",
"type": "string"
},
"tlsKey": {
"description": "path to TLS key",
"type": "string"
}
}
},
"settings.Settings": {
"type": "object",
"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"
}
}
},
"settings.Source": {
"type": "object",
"required": [
"path"
],
"properties": {
"config": {
"$ref": "#/definitions/settings.SourceConfig"
},
"name": {
"description": "display name",
"type": "string"
},
"path": {
"description": "file system path. (Can be relative)",
"type": "string"
}
}
},
"settings.SourceConfig": {
"type": "object",
"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"
},
"denyByDefault": {
"description": "deny access unless an \"allow\" access rule was specifically created.",
"type": "boolean"
},
"disableIndexing": {
"description": "disable the indexing of this source",
"type": "boolean"
},
"disabled": {
"description": "disable the source, this is useful so you don't need to remove it from the config file",
"type": "boolean"
},
"exclude": {
"description": "exclude files and folders from indexing, if include is not set",
"allOf": [
{
"$ref": "#/definitions/settings.ExcludeIndexFilter"
}
]
},
"include": {
"description": "include files and folders from indexing, if exclude is not set",
"allOf": [
{
"$ref": "#/definitions/settings.IncludeIndexFilter"
}
]
},
"indexingIntervalMinutes": {
"description": "optional manual overide interval in minutes 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 that get initially once. Useful for folders that rarely change contents (without source path prefix)",
"type": "array",
"items": {
"type": "string"
}
},
"private": {
"description": "designate as source as private -- currently just means no sharing permitted.",
"type": "boolean"
}
}
},
"settings.StylingConfig": {
"type": "object",
"properties": {
"customCSS": {
"description": "if a valid path to a css file is provided, it will be applied for all users. (eg. \"reduce-rounded-corners.css\")",
"type": "string"
},
"customThemes": {
"description": "A list of custom css files that each user can select to override the default styling. if \"default\" is key name then it will be the default option.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/settings.CustomTheme"
}
},
"darkBackground": {
"description": "Specify a valid CSS color property value to use as the background color in dark mode",
"type": "string"
},
"lightBackground": {
"description": "specify a valid CSS color property value to use as the background color in light mode",
"type": "string"
}
}
},
"settings.UserDefaults": {
"type": "object",
"properties": {
"customTheme": {
"description": "Name of theme to use chosen from custom themes config.",
"type": "string"
},
"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"
},
"deleteWithoutConfirming": {
"description": "delete files without confirmation",
"type": "boolean"
},
"disableOfficePreviewExt": {
"description": "deprecated: use disablePreviewExt instead",
"type": "string"
},
"disableOnlyOfficeExt": {
"description": "list of file extensions to disable onlyoffice editor for",
"type": "string"
},
"disablePreviewExt": {
"description": "comma separated list of file extensions to disable preview for",
"type": "string"
},
"disableQuickToggles": {
"description": "disable the quick toggles in the sidebar",
"type": "boolean"
},
"disableSearchOptions": {
"description": "disable the search options in the search bar",
"type": "boolean"
},
"disableSettings": {
"description": "disable the user from viewing the settings page",
"type": "boolean"
},
"disableUpdateNotifications": {
"description": "disable update notifications banner for admin users",
"type": "boolean"
},
"disableViewingExt": {
"description": "comma separated list of file extensions to disable viewing for",
"type": "string"
},
"editorQuickSave": {
"description": "show quick save button in editor",
"type": "boolean"
},
"fileLoading": {
"description": "upload and download settings",
"allOf": [
{
"$ref": "#/definitions/users.FileLoading"
}
]
},
"gallerySize": {
"description": "0-9 - the size of the gallery thumbnails",
"type": "integer"
},
"hideSidebarFileActions": {
"description": "hide the file actions in the sidebar",
"type": "boolean"
},
"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"
},
"showSelectMultiple": {
"description": "show select multiple files on desktop",
"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"
}
}
},
"share.CreateBody": {
"type": "object",
"properties": {
"allowUpload": {
"description": "AllowEdit bool ` + "`" + `json:\"allowEdit,omitempty\"` + "`" + `",
"type": "boolean"
},
"allowedUsernames": {
"type": "array",
"items": {
"type": "string"
}
},
"banner": {
"type": "string"
},
"description": {
"type": "string"
},
"disableAnonymous": {
"type": "boolean"
},
"disableFileViewer": {
"type": "boolean"
},
"disableShareCard": {
"type": "boolean"
},
"disableSidebar": {
"type": "boolean"
},
"disableThumbnails": {
"type": "boolean"
},
"downloadURL": {
"type": "string"
},
"downloadsLimit": {
"type": "integer"
},
"expires": {
"type": "string"
},
"favicon": {
"type": "string"
},
"hash": {
"type": "string"
},
"hideNavButtons": {
"type": "boolean"
},
"keepAfterExpiration": {
"type": "boolean"
},
"maxBandwidth": {
"type": "integer"
},
"password": {
"type": "string"
},
"path": {
"type": "string"
},
"quickDownload": {
"type": "boolean"
},
"shareTheme": {
"type": "string"
},
"source": {
"description": "backend source is path to maintain between name changes",
"type": "string"
},
"themeColor": {
"type": "string"
},
"title": {
"type": "string"
},
"unit": {
"type": "string"
},
"viewMode": {
"type": "string"
}
}
},
"share.Link": {
"type": "object",
"properties": {
"allowUpload": {
"description": "AllowEdit bool ` + "`" + `json:\"allowEdit,omitempty\"` + "`" + `",
"type": "boolean"
},
"allowedUsernames": {
"type": "array",
"items": {
"type": "string"
}
},
"banner": {
"type": "string"
},
"description": {
"type": "string"
},
"disableAnonymous": {
"type": "boolean"
},
"disableFileViewer": {
"type": "boolean"
},
"disableShareCard": {
"type": "boolean"
},
"disableSidebar": {
"type": "boolean"
},
"disableThumbnails": {
"type": "boolean"
},
"downloadURL": {
"type": "string"
},
"downloads": {
"type": "integer"
},
"downloadsLimit": {
"type": "integer"
},
"expire": {
"type": "integer"
},
"favicon": {
"type": "string"
},
"hash": {
"type": "string"
},
"hideNavButtons": {
"type": "boolean"
},
"keepAfterExpiration": {
"type": "boolean"
},
"maxBandwidth": {
"type": "integer"
},
"password_hash": {
"type": "string"
},
"path": {
"type": "string"
},
"quickDownload": {
"type": "boolean"
},
"shareTheme": {
"type": "string"
},
"source": {
"description": "backend source is path to maintain between name changes",
"type": "string"
},
"themeColor": {
"type": "string"
},
"title": {
"type": "string"
},
"token": {
"description": "Token is a random value that will only be set when PasswordHash is set. It is\nURL-Safe and is used to download links in password-protected shares via a\nquery arg.",
"type": "string"
},
"userID": {
"type": "integer"
},
"viewMode": {
"type": "string"
}
}
},
"users.AuthToken": {
"type": "object",
"properties": {
"Permissions": {
"$ref": "#/definitions/users.Permissions"
},
"belongsTo": {
"type": "integer"
},
"createdAt": {
"type": "integer"
},
"expiresAt": {
"type": "integer"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"users.FileLoading": {
"type": "object",
"properties": {
"maxConcurrentUpload": {
"type": "integer"
},
"uploadChunkSizeMb": {
"type": "integer"
}
}
},
"users.LoginMethod": {
"type": "string",
"enum": [
"password",
"proxy",
"oidc"
],
"x-enum-varnames": [
"LoginMethodPassword",
"LoginMethodProxy",
"LoginMethodOidc"
]
},
"users.Permissions": {
"type": "object",
"properties": {
"admin": {
"type": "boolean"
},
"api": {
"type": "boolean"
},
"modify": {
"type": "boolean"
},
"realtime": {
"type": "boolean"
},
"share": {
"type": "boolean"
}
}
},
"users.Preview": {
"type": "object",
"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"
}
}
},
"users.Sorting": {
"type": "object",
"properties": {
"asc": {
"type": "boolean"
},
"by": {
"type": "string"
}
}
},
"users.SourceScope": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"scope": {
"type": "string"
}
}
},
"users.User": {
"type": "object",
"properties": {
"apiKeys": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/users.AuthToken"
}
},
"customTheme": {
"description": "Name of theme to use chosen from custom themes config.",
"type": "string"
},
"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"
},
"deleteWithoutConfirming": {
"description": "delete files without confirmation",
"type": "boolean"
},
"disableOfficePreviewExt": {
"description": "deprecated",
"type": "string"
},
"disableOnlyOfficeExt": {
"description": "deprecated",
"type": "string"
},
"disablePreviewExt": {
"description": "comma separated list of file extensions to disable preview for",
"type": "string"
},
"disableQuickToggles": {
"description": "disable the quick toggles in the sidebar",
"type": "boolean"
},
"disableSearchOptions": {
"description": "disable the search options in the search bar",
"type": "boolean"
},
"disableSettings": {
"type": "boolean"
},
"disableUpdateNotifications": {
"description": "disable update notifications",
"type": "boolean"
},
"disableViewingExt": {
"description": "comma separated list of file extensions to disable viewing for",
"type": "string"
},
"editorQuickSave": {
"description": "show quick save button in editor",
"type": "boolean"
},
"fileLoading": {
"description": "upload and download settings",
"allOf": [
{
"$ref": "#/definitions/users.FileLoading"
}
]
},
"gallerySize": {
"description": "0-9 - the size of the gallery thumbnails",
"type": "integer"
},
"hideSidebarFileActions": {
"description": "hide the file actions in the sidebar",
"type": "boolean"
},
"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": {
"description": "legacy for migration purposes... og filebrowser has perm attribute",
"allOf": [
{
"$ref": "#/definitions/users.Permissions"
}
]
},
"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": {
"type": "array",
"items": {
"$ref": "#/definitions/users.SourceScope"
}
},
"showHidden": {
"description": "show hidden files in the UI. On windows this includes files starting with a dot and windows hidden files",
"type": "boolean"
},
"showSelectMultiple": {
"description": "show select multiple files on desktop",
"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"
}
}
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}