Files
filebrowser/backend/swagger/docs/docs.go
T

6551 lines
248 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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. When cascade=true, removes the user/group from the specified path and all subpaths.",
"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
},
{
"type": "boolean",
"description": "Cascade delete to all subpaths (default: false)",
"name": "cascade",
"in": "query"
}
],
"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"
}
}
}
}
},
"patch": {
"description": "Updates the path for a specific access rule",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Access"
],
"summary": "Update access rule path",
"parameters": [
{
"description": "Source, old path, and new path",
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"newPath": {
"type": "string"
},
"oldPath": {
"type": "string"
},
"source": {
"type": "string"
}
}
}
}
],
"responses": {
"200": {
"description": "Rule path updated successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad request - missing or invalid parameters",
"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/login": {
"post": {
"description": "Authenticate a user with a username and password. The password must be URL-encoded and sent in the X-Password header to support special characters (e.g., ^, %, £, €, etc.).",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "User login",
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "query",
"required": true
},
{
"type": "string",
"description": "ReCaptcha response token (if enabled)",
"name": "recaptcha",
"in": "query"
},
{
"type": "string",
"description": "URL-encoded password",
"name": "X-Password",
"in": "header",
"required": true
},
{
"type": "string",
"description": "TOTP code (if 2FA is enabled)",
"name": "X-Secret",
"in": "header"
}
],
"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/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": [
"Auth"
],
"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": [
"Auth"
],
"summary": "OIDC login",
"responses": {
"302": {
"description": "Redirect to OIDC provider",
"schema": {
"type": "string"
}
}
}
}
},
"/api/auth/otp/generate": {
"post": {
"description": "Generates a new TOTP secret and QR code for the authenticated user. The password must be URL-encoded and sent in the X-Password header to support special characters.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Generate OTP",
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "query",
"required": true
},
{
"type": "string",
"description": "URL-encoded password",
"name": "X-Password",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "OTP secret generated successfully.",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/api/auth/otp/verify": {
"post": {
"description": "Verifies the provided TOTP code for the authenticated user. The password must be URL-encoded and sent in the X-Password header to support special characters.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Verify OTP",
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "query",
"required": true
},
{
"type": "string",
"description": "URL-encoded password",
"name": "X-Password",
"in": "header",
"required": true
},
{
"type": "string",
"description": "TOTP code to verify",
"name": "X-Secret",
"in": "header",
"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"
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/api/auth/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/auth/signup": {
"post": {
"description": "Register a new user account with a username and password.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "User signup",
"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/auth/token": {
"get": {
"description": "Get a specific API token.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Get API token",
"parameters": [
{
"type": "string",
"description": "Name of the API token to retrieve",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "API token details",
"schema": {
"$ref": "#/definitions/http.AuthTokenFrontend"
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Create an API token with specified name, duration, and permissions.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Create API Token",
"parameters": [
{
"type": "string",
"description": "Name of the API token",
"name": "name",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Duration of the API token in days",
"name": "days",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Permissions for the API token (comma-separated)",
"name": "permissions",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Token created successfully, response contains json object with token",
"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 token with specified name.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "Delete API token",
"parameters": [
{
"type": "string",
"description": "Name of the API token to delete",
"name": "name",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "API token 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/token/list": {
"get": {
"description": "List all API tokens or retrieve details for a specific token.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Auth"
],
"summary": "List API tokens",
"responses": {
"200": {
"description": "List of API tokens",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/http.AuthTokenFrontend"
}
}
},
"404": {
"description": "Not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/media/subtitles": {
"get": {
"description": "Returns raw subtitle content from external files or embedded streams",
"consumes": [
"application/json"
],
"produces": [
"text/plain"
],
"tags": [
"Resources"
],
"summary": "Get subtitle content",
"parameters": [
{
"type": "string",
"description": "Index path to the video file",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the desired source",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Subtitle track name (filename for external, descriptive name for embedded)",
"name": "name",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "Whether this is an embedded stream (true) or external file (false), defaults to false",
"name": "embedded",
"in": "query"
}
],
"responses": {
"200": {
"description": "Raw subtitle content in original format",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
}
},
"/api/office/callback": {
"get": {
"description": "Receives callbacks from OnlyOffice document server for document status changes and saves",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Office"
],
"summary": "Handle OnlyOffice document server callback",
"parameters": [
{
"type": "string",
"description": "Source name",
"name": "source",
"in": "query"
},
{
"type": "string",
"description": "File path",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "Share hash (for public shares)",
"name": "hash",
"in": "query"
}
],
"responses": {
"200": {
"description": "Callback processed successfully",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Invalid callback data",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
},
"post": {
"description": "Receives callbacks from OnlyOffice document server for document status changes and saves",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Office"
],
"summary": "Handle OnlyOffice document server callback",
"parameters": [
{
"type": "string",
"description": "Source name",
"name": "source",
"in": "query"
},
{
"type": "string",
"description": "File path",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "Share hash (for public shares)",
"name": "hash",
"in": "query"
}
],
"responses": {
"200": {
"description": "Callback processed successfully",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Invalid callback data",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/api/office/config": {
"get": {
"description": "Returns the configuration needed for OnlyOffice document editor client",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Office"
],
"summary": "Get OnlyOffice client configuration",
"parameters": [
{
"type": "string",
"description": "Source name",
"name": "source",
"in": "query"
},
{
"type": "string",
"description": "File path",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "Share hash (for public shares)",
"name": "hash",
"in": "query"
}
],
"responses": {
"200": {
"description": "OnlyOffice configuration",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Missing or invalid parameters",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/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": "Skip extended attributes for faster retrieval, no hasPreview",
"name": "skipExtendedAttrs",
"in": "query"
},
{
"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": "Extract audio/video metadata if true",
"name": "metadata",
"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",
"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"
},
{
"type": "boolean",
"description": "Explicitly specify if the resource is a directory",
"name": "isDir",
"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": "Performs move, copy, or rename operations on multiple resources. All operations are performed atomically.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Move, copy, or rename resources",
"parameters": [
{
"description": "Move/copy request with items and action",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.MoveCopyRequest"
}
}
],
"responses": {
"200": {
"description": "All operations completed successfully",
"schema": {
"$ref": "#/definitions/http.MoveCopyResponse"
}
},
"207": {
"description": "Partial success - some operations succeeded, some failed",
"schema": {
"$ref": "#/definitions/http.MoveCopyResponse"
}
},
"400": {
"description": "Bad request - invalid JSON or parameters",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "All operations failed",
"schema": {
"$ref": "#/definitions/http.MoveCopyResponse"
}
}
}
}
},
"/api/resources/archive": {
"post": {
"description": "Creates a zip or tar.gz archive on the server from the given paths (files and/or directories). Server-side only; no archive bytes are returned. All items must be from the same source. Folders are walked recursively; access-denied paths are silently skipped. Requires create permission.\n\n**Request body parameters:**\n- **fromSource** (string, required): Source name where the paths to archive live. Example: ` + "`" + `\"default\"` + "`" + `\n- **toSource** (string, optional): Source name where the archive file will be written. Defaults to fromSource if omitted. Example: ` + "`" + `\"backups\"` + "`" + `\n- **paths** (array of strings, required): Paths of files or directories to add to the archive (relative to fromSource). Directories are walked; access-denied entries are skipped. Example: ` + "`" + `[\"/docs/file.txt\", \"/photos\"]` + "`" + `\n- **destination** (string, required): Full path where the archive file will be created (on toSource). Must end with .zip or .tar.gz (or format is inferred). Example: ` + "`" + `\"/backups/my-archive.zip\"` + "`" + `\n- **format** (string, optional): Archive format. One of: ` + "`" + `\"zip\"` + "`" + `, ` + "`" + `\"tar.gz\"` + "`" + `. Default inferred from destination extension. Example: ` + "`" + `\"zip\"` + "`" + `\n- **compression** (integer, optional): Gzip compression level for tar.gz only (0–9). 0 = default. Ignored for zip. Example: ` + "`" + `6` + "`" + `\n- **deleteAfter** (boolean, optional): If true, delete source files/directories after successful creation. Requires delete permission. Example: ` + "`" + `true` + "`" + `",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Create an archive on the server",
"parameters": [
{
"description": "Request body: fromSource, toSource (optional), paths, destination, format (optional), compression (optional)",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.archiveCreateRequest"
}
}
],
"responses": {
"200": {
"description": "Created; returns {\\\"path\\\": \\\"\u003cdestination path\u003e\\\"}",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request (e.g. missing required field, invalid path)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden (create permission or access denied)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Source not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/resources/bulk": {
"delete": {
"description": "Deletes multiple resources specified in the request body. Returns a list of succeeded and failed deletions.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Bulk delete resources",
"parameters": [
{
"description": "Array of items to delete, each with source and path",
"name": "items",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/http.BulkDeleteItem"
}
}
}
],
"responses": {
"200": {
"description": "All resources deleted successfully",
"schema": {
"$ref": "#/definitions/http.BulkDeleteResponse"
}
},
"207": {
"description": "Partial success - some resources deleted, some failed",
"schema": {
"$ref": "#/definitions/http.BulkDeleteResponse"
}
},
"400": {
"description": "Bad request - invalid JSON or empty items array",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error - all deletions failed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/resources/download": {
"get": {
"description": "Returns the raw content of a file, multiple files, or a directory. Supports downloading files as archives in various formats.\n\n**Filename Encoding:**\n- The Content-Disposition header will always include both:\n1. ` + "`" + `filename=\"...\"` + "`" + `: An ASCII-safe version of the filename for compatibility.\n2. ` + "`" + `filename*=utf-8\"...` + "`" + `: The full UTF-8 encoded filename (RFC 6266/5987) for modern clients.\n\n**Multiple Files:**\n- Use repeated query parameters: ` + "`" + `?file=file1.txt\u0026file=file2.txt\u0026file=file3.txt` + "`" + `\n- This supports filenames containing commas and special characters",
"consumes": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Download content of a file, multiple files, or directory",
"parameters": [
{
"type": "string",
"description": "Source name for the files (required)",
"name": "source",
"in": "query",
"required": true
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"description": "File path (can be repeated for multiple files)",
"name": "file",
"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/resources/items": {
"get": {
"description": "Efficiently returns a basic list of items for the specified path and source. Use 'only' parameter to filter by only files or folders",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Get directory items",
"parameters": [
{
"type": "string",
"description": "A directory path to list child items",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "The source name which contains the path",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Filter: 'files', 'folders', or omit for both",
"name": "only",
"in": "query"
}
],
"responses": {
"200": {
"description": "lists files and folders",
"schema": {
"$ref": "#/definitions/files.Items"
}
},
"403": {
"description": "Forbidden (access denied)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/resources/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/resources/unarchive": {
"post": {
"description": "Extracts a zip or tar.gz archive on the server into the given destination directory. Server-side only; no extracted bytes are returned. Supports extracting to a different source via toSource. Requires create permission.\n\n**Request body parameters:**\n- **fromSource** (string, required): Source name where the archive file lives. Example: ` + "`" + `\"default\"` + "`" + `\n- **toSource** (string, optional): Source name where contents will be extracted. Defaults to fromSource if omitted. Example: ` + "`" + `\"restored\"` + "`" + `\n- **path** (string, required): Path to the archive file (on fromSource). Must be .zip, .tar.gz, or .tgz. Example: ` + "`" + `\"/downloads/data.zip\"` + "`" + `\n- **destination** (string, required): Directory path (on toSource) to extract into. Example: ` + "`" + `\"/projects/imported\"` + "`" + `\n- **deleteAfter** (boolean, optional): If true, delete the archive file after successful extraction. Default: false. Example: ` + "`" + `true` + "`" + `",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Resources"
],
"summary": "Extract an archive on the server",
"parameters": [
{
"description": "Request body: fromSource, toSource (optional), path, destination, deleteAfter (optional)",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.unarchiveRequest"
}
}
],
"responses": {
"200": {
"description": "Extracted; returns {\\\"path\\\": \\\"\u003cdestination path\u003e\\\", \\\"source\\\": \\\"\u003ctoSource\u003e\\\"}",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request (e.g. missing required field, unsupported format)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden (create permission or access denied)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Source or archive file not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"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/settings/config": {
"get": {
"description": "Returns the current running configuration settings as YAML format with optional comments and filtering.",
"consumes": [
"application/json"
],
"produces": [
"text/plain"
],
"tags": [
"Settings"
],
"summary": "Get system settings as YAML",
"parameters": [
{
"type": "boolean",
"description": "Show all values (true) or only non-default values (false, default)",
"name": "full",
"in": "query"
},
{
"type": "boolean",
"description": "Include comments in YAML (true) or plain YAML (false, default)",
"name": "comments",
"in": "query"
}
],
"responses": {
"200": {
"description": "System settings in YAML format",
"schema": {
"type": "string"
}
}
}
}
},
"/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"
}
}
}
}
},
"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"
}
}
}
}
},
"patch": {
"description": "Updates the path for a specific share link identified by hash",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Update share link path",
"parameters": [
{
"description": "Hash and new path",
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"path": {
"type": "string"
}
}
}
}
],
"responses": {
"200": {
"description": "Updated share link",
"schema": {
"$ref": "#/definitions/http.ShareResponse"
}
},
"400": {
"description": "Bad request - missing or invalid parameters",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/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"
}
}
}
}
}
},
"/api/share/list": {
"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"
}
}
}
}
}
},
"/api/tools/duplicateFinder": {
"get": {
"description": "Finds duplicate files using multi-stage filtering: size → type → fuzzy filename → progressive checksums. Files must match on size, MIME type, and have 50%+ filename similarity before checksum verification. Large fuzzy groups (\u003e10 files) are skipped to avoid false positives. Checksums use 2-pass progressive verification (header → middle) for accuracy while minimizing disk I/O (~16KB read per file).",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tools"
],
"summary": "Find Duplicate Files",
"parameters": [
{
"type": "string",
"description": "Source name for the desired source",
"name": "source",
"in": "query",
"required": true
},
{
"type": "string",
"description": "path within user scope to search",
"name": "scope",
"in": "query"
},
{
"type": "integer",
"description": "Minimum file size in megabytes (default: 1)",
"name": "minSizeMb",
"in": "query"
}
],
"responses": {
"200": {
"description": "List of duplicate file groups with metadata. Response includes 'incomplete' flag if processing stopped early due to resource limits.",
"schema": {
"$ref": "#/definitions/http.duplicateResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"503": {
"description": "Service Unavailable (indexing in progress or another search running)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/tools/fileWatcher": {
"get": {
"description": "Returns the last N lines of a file",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tools"
],
"summary": "Watch a file",
"parameters": [
{
"type": "string",
"description": "Path to the file",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name",
"name": "source",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "Number of lines to read (default: 10, max: 50)",
"name": "lines",
"in": "query"
},
{
"type": "boolean",
"description": "Return minimal response for latency checking",
"name": "latencyCheck",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/http.fileWatchResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Permission denied",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/tools/fileWatcher/sse": {
"get": {
"description": "Establishes an SSE connection to receive periodic file updates",
"tags": [
"Tools"
],
"summary": "Watch a file via SSE",
"parameters": [
{
"type": "string",
"description": "Path to the file",
"name": "path",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name",
"name": "source",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "Number of lines to read (default: 10, max: 50)",
"name": "lines",
"in": "query"
},
{
"type": "integer",
"description": "Update interval in seconds (1, 2, 5, 10, 15, or 30, requires realtime permission for SSE)",
"name": "interval",
"in": "query"
}
],
"responses": {
"200": {
"description": "SSE stream"
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Permission denied",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/tools/search": {
"get": {
"description": "Searches for files matching the provided query. Returns file paths and metadata based on the user's session and scope. Supports searching across multiple sources when using the 'sources' parameter.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tools"
],
"summary": "Search Files",
"parameters": [
{
"type": "string",
"description": "Search query",
"name": "query",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source name for the desired source (deprecated, use 'sources' instead)",
"name": "source",
"in": "query"
},
{
"type": "string",
"description": "Comma-separated list of source names to search across multiple sources. When multiple sources are specified, scope is always the user's scope for each source.",
"name": "sources",
"in": "query"
},
{
"type": "string",
"description": "path within user scope to search, for example '/first/second' to search within the second directory only. Ignored when multiple sources are specified.",
"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 with source field populated",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/indexing.SearchResult"
}
}
},
"400": {
"description": "Bad Request",
"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"
],
"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": {
"204": {
"description": "No Content - User updated successfully"
},
"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"
],
"summary": "Health Check",
"responses": {
"200": {
"description": "successful health check response",
"schema": {
"$ref": "#/definitions/http.HttpResponse"
}
}
}
}
},
"/public/api/resources": {
"get": {
"description": "Returns metadata for files or directories accessible via a public share link. Browsing is disabled for upload-only shares.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Get file/directory information from a public share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Path within the share to retrieve information for. Defaults to share root.",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "Include file content if true",
"name": "content",
"in": "query"
},
{
"type": "string",
"description": "Extract audio/video metadata if true",
"name": "metadata",
"in": "query"
}
],
"responses": {
"200": {
"description": "File or directory metadata",
"schema": {
"$ref": "#/definitions/iteminfo.FileInfo"
}
},
"403": {
"description": "Share unavailable or access denied",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Share not found or file not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"501": {
"description": "Browsing disabled for upload shares",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Updates the content of a file in a public share.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Update a file in a public share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Path to the file to update",
"name": "path",
"in": "query",
"required": true
},
{
"description": "New content for the file",
"name": "content",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "File updated successfully",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request or parameters",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Share unavailable or update not allowed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Share not found or file not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"description": "Handles file and directory uploads to an upload-only public share. Supports chunked uploads, conflict resolution (override), and directory creation.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Upload files to a public upload share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "string",
"description": "path within the share to upload to. Must be relative to share root.",
"name": "path",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "If true, overwrite existing files/folders. Defaults to false.",
"name": "override",
"in": "query"
},
{
"type": "string",
"description": "Upload action: 'override' to replace files, 'rename' to auto-rename",
"name": "action",
"in": "query"
},
{
"type": "file",
"description": "File to upload",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "Upload successful",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request or parameters",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Share unavailable or upload not allowed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Share not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "File or directory already exists (conflict)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error during upload",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"501": {
"description": "Uploading disabled for non-upload shares",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"patch": {
"description": "Performs move, copy, or rename operations on multiple resources within a public share. All operations are performed atomically.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Move, copy, or rename resources in a public share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"description": "Move/copy request with items and action",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/http.MoveCopyRequest"
}
}
],
"responses": {
"200": {
"description": "All operations completed successfully",
"schema": {
"$ref": "#/definitions/http.MoveCopyResponse"
}
},
"207": {
"description": "Partial success - some operations succeeded, some failed",
"schema": {
"$ref": "#/definitions/http.MoveCopyResponse"
}
},
"400": {
"description": "Bad request - invalid JSON or parameters",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden - modify not allowed for this share",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Share or resource not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/http.MoveCopyResponse"
}
}
}
}
},
"/public/api/resources/bulk": {
"delete": {
"description": "Deletes multiple resources specified in the request body. Returns a list of succeeded and failed deletions.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Bulk delete resources from public share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"description": "Array of items to delete, each with source and path",
"name": "items",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/http.BulkDeleteItem"
}
}
}
],
"responses": {
"200": {
"description": "All resources deleted successfully",
"schema": {
"$ref": "#/definitions/http.BulkDeleteResponse"
}
},
"207": {
"description": "Partial success - some resources deleted, some failed",
"schema": {
"$ref": "#/definitions/http.BulkDeleteResponse"
}
},
"400": {
"description": "Bad request - invalid JSON or empty items array",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Forbidden - delete not allowed for this share",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error - all deletions failed",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/public/api/resources/download": {
"get": {
"description": "Downloads raw content from a public share. Supports single files, multiple files, or directories as archives. Enforces download limits (global or per-user) and blocks anonymous users when per-user limits are enabled.\n\n**Multiple Files:**\n- Use repeated query parameters: ` + "`" + `?file=file1.txt\u0026file=file2.txt\u0026file=file3.txt` + "`" + `\n- This supports filenames containing commas and special characters",
"consumes": [
"application/json"
],
"produces": [
"application/octet-stream"
],
"tags": [
"Shares"
],
"summary": "Download files from a public share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"description": "File path (can be repeated for multiple files)",
"name": "file",
"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"
}
},
"400": {
"description": "Invalid request path or encoding",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Download limit reached, anonymous access blocked, or share unavailable",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Share not found or file not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"501": {
"description": "Downloads disabled for upload shares",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/public/api/resources/items": {
"get": {
"description": "Efficiently returns a basic list of items for the specified path in a public share. Use hash for authentication instead of source. Use 'only' parameter to filter by only files or folders.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Get directory items (public share)",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Path within the share to list child items. Defaults to share root.",
"name": "path",
"in": "query"
},
{
"type": "string",
"description": "Filter: 'files', 'folders', or omit for both",
"name": "only",
"in": "query"
}
],
"responses": {
"200": {
"description": "lists files and folders",
"schema": {
"$ref": "#/definitions/files.Items"
}
},
"403": {
"description": "Forbidden (access denied)",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Share not found or source not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/public/api/resources/preview": {
"get": {
"description": "Returns a preview (thumbnail) for images or videos accessible via a public share. Preview generation can be disabled globally or per-share. Not available for upload-only shares.",
"consumes": [
"application/json"
],
"produces": [
"image/jpeg"
],
"tags": [
"Shares"
],
"summary": "Get image/video preview from a public share",
"parameters": [
{
"type": "string",
"description": "Share hash for authentication",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "string",
"description": "File path within the share 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 (JPEG)",
"schema": {
"type": "file"
}
},
"403": {
"description": "Share unavailable or access denied",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "File not found or preview not available",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"501": {
"description": "Previews disabled globally, for this share, or for upload shares",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/public/api/share/image": {
"get": {
"description": "Returns a resizable preview (large size) for the banner or favicon file of a share",
"produces": [
"image/jpeg"
],
"tags": [
"Shares"
],
"summary": "Get share image (banner or favicon) as preview",
"parameters": [
{
"type": "string",
"description": "Share hash",
"name": "hash",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "Request banner file",
"name": "banner",
"in": "query"
},
{
"type": "boolean",
"description": "Request favicon file",
"name": "favicon",
"in": "query"
}
],
"responses": {
"200": {
"description": "Preview image content (JPEG)",
"schema": {
"type": "file"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Permission denied",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Asset not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/public/api/share/info": {
"get": {
"description": "Returns information about a share link based on its hash. This endpoint is publicly accessible and can be used with or without authentication.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Shares"
],
"summary": "Get share information by hash",
"parameters": [
{
"type": "string",
"description": "Hash of the share link",
"name": "hash",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Share information",
"schema": {
"$ref": "#/definitions/share.CommonShare"
}
},
"404": {
"description": "Share hash not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"definitions": {
"files.Items": {
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "string"
}
},
"folders": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"http.AuthTokenFrontend": {
"type": "object",
"properties": {
"Permissions": {
"$ref": "#/definitions/users.Permissions"
},
"expiresAt": {
"type": "integer"
},
"issuedAt": {
"type": "integer"
},
"name": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"http.BulkDeleteItem": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"path": {
"type": "string"
},
"source": {
"type": "string"
}
}
},
"http.BulkDeleteResponse": {
"type": "object",
"properties": {
"failed": {
"type": "array",
"items": {
"$ref": "#/definitions/http.BulkDeleteItem"
}
},
"succeeded": {
"type": "array",
"items": {
"$ref": "#/definitions/http.BulkDeleteItem"
}
}
}
},
"http.DirectDownloadResponse": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"shareUrl": {
"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.MoveCopyItem": {
"type": "object",
"properties": {
"fromPath": {
"type": "string"
},
"fromSource": {
"type": "string"
},
"message": {
"type": "string"
},
"toPath": {
"type": "string"
},
"toSource": {
"type": "string"
}
}
},
"http.MoveCopyRequest": {
"type": "object",
"properties": {
"action": {
"description": "\"copy\", \"move\", or \"rename\"",
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/http.MoveCopyItem"
}
},
"overwrite": {
"description": "Overwrite if destination exists",
"type": "boolean"
},
"rename": {
"description": "Auto-rename if destination exists",
"type": "boolean"
}
}
},
"http.MoveCopyResponse": {
"type": "object",
"properties": {
"failed": {
"type": "array",
"items": {
"$ref": "#/definitions/http.MoveCopyItem"
}
},
"succeeded": {
"type": "array",
"items": {
"$ref": "#/definitions/http.MoveCopyItem"
}
}
}
},
"http.ShareResponse": {
"type": "object",
"properties": {
"allowCreate": {
"description": "allow creating files",
"type": "boolean"
},
"allowDelete": {
"type": "boolean"
},
"allowModify": {
"description": "allow modifying files",
"type": "boolean"
},
"allowReplacements": {
"description": "allow replacements of files",
"type": "boolean"
},
"allowedUsernames": {
"type": "array",
"items": {
"type": "string"
}
},
"banner": {
"type": "string"
},
"bannerUrl": {
"type": "string"
},
"canEditShare": {
"type": "boolean"
},
"description": {
"type": "string"
},
"disableAnonymous": {
"type": "boolean"
},
"disableDownload": {
"description": "don't allow downloading files",
"type": "boolean"
},
"disableFileViewer": {
"description": "don't allow viewing files",
"type": "boolean"
},
"disableLoginOption": {
"description": "disable login option in share (true = hide, false = show)",
"type": "boolean"
},
"disableShareCard": {
"type": "boolean"
},
"disableSidebar": {
"type": "boolean"
},
"disableThumbnails": {
"type": "boolean"
},
"downloadURL": {
"type": "string"
},
"downloads": {
"type": "integer"
},
"downloadsLimit": {
"type": "integer"
},
"enableOnlyOffice": {
"type": "boolean"
},
"enforceDarkLightMode": {
"description": "\"dark\" or \"light\"",
"type": "string"
},
"expire": {
"type": "integer"
},
"extractEmbeddedSubtitles": {
"description": "can be io intensive for large files and take 10-30 seconds.",
"type": "boolean"
},
"favicon": {
"type": "string"
},
"faviconUrl": {
"type": "string"
},
"hasPassword": {
"type": "boolean"
},
"hash": {
"type": "string"
},
"hideNavButtons": {
"type": "boolean"
},
"keepAfterExpiration": {
"type": "boolean"
},
"maxBandwidth": {
"type": "integer"
},
"password_hash": {
"type": "string"
},
"path": {
"type": "string"
},
"pathExists": {
"type": "boolean"
},
"perUserDownloadLimit": {
"type": "boolean"
},
"quickDownload": {
"type": "boolean"
},
"shareTheme": {
"type": "string"
},
"shareType": {
"description": "type of share: normal, upload, max",
"type": "string"
},
"shareURL": {
"type": "string"
},
"showHidden": {
"description": "show hidden files in share (true = show, false = hide)",
"type": "boolean"
},
"sidebarLinks": {
"description": "customizable sidebar links",
"type": "array",
"items": {
"$ref": "#/definitions/users.SidebarLink"
}
},
"source": {
"description": "Override embedded field to show source name",
"type": "string"
},
"sourceURL": {
"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"
},
"userDownloads": {
"description": "Track downloads per username",
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"userID": {
"type": "integer"
},
"username": {
"type": "string"
},
"version": {
"type": "integer"
},
"viewMode": {
"description": "default view mode for anonymous users: \"list\", \"compact\", \"normal\", \"gallery\"",
"type": "string"
}
}
},
"http.archiveCreateRequest": {
"type": "object",
"properties": {
"compression": {
"description": "Gzip compression level for tar.gz only, 0-9; 0 = default; ignored for zip (optional). Example: 6",
"type": "integer"
},
"deleteAfter": {
"description": "If true, delete the source files/directories after successful archive creation (optional; requires delete permission). Example: true",
"type": "boolean"
},
"destination": {
"description": "Full path where the archive will be created; use .zip or .tar.gz extension (required). Example: \"/backups/my-archive.zip\"",
"type": "string"
},
"format": {
"description": "Archive format: \"zip\" or \"tar.gz\" (optional; inferred from destination if omitted). Example: \"zip\"",
"type": "string"
},
"fromSource": {
"description": "Source name where the paths to archive live (required). Example: \"default\"",
"type": "string"
},
"paths": {
"description": "Paths of files or directories to add; directories are walked; access-denied entries skipped (required). Example: [\"/docs/file.txt\", \"/photos\"]",
"type": "array",
"items": {
"type": "string"
}
},
"toSource": {
"description": "Source name where the archive file will be written (optional; default: fromSource). Example: \"backups\"",
"type": "string"
}
}
},
"http.duplicateGroup": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/indexing.SearchResult"
}
},
"size": {
"type": "integer"
}
}
},
"http.duplicateResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/http.duplicateGroup"
}
},
"incomplete": {
"type": "boolean"
},
"reason": {
"type": "string"
}
}
},
"http.fileWatchMetadata": {
"type": "object",
"properties": {
"modified": {
"description": "Modification time",
"type": "string"
},
"name": {
"description": "File name",
"type": "string"
},
"size": {
"description": "File size in bytes (for directories, total size of all files)",
"type": "integer"
},
"type": {
"description": "MIME type",
"type": "string"
}
}
},
"http.fileWatchResponse": {
"type": "object",
"properties": {
"contents": {
"description": "Text content for text files",
"type": "string"
},
"isText": {
"description": "Whether the file is a text file",
"type": "boolean"
},
"metadata": {
"description": "File metadata for non-text files",
"allOf": [
{
"$ref": "#/definitions/http.fileWatchMetadata"
}
]
}
}
},
"http.unarchiveRequest": {
"type": "object",
"properties": {
"deleteAfter": {
"description": "If true, delete the archive file after successful extraction (optional; default: false). Example: true",
"type": "boolean"
},
"destination": {
"description": "Directory path on toSource to extract into (required). Example: \"/projects/imported\"",
"type": "string"
},
"fromSource": {
"description": "Source name where the archive file lives (required). Example: \"default\"",
"type": "string"
},
"path": {
"description": "Path to the archive file on fromSource; .zip, .tar.gz, or .tgz (required). Example: \"/downloads/data.zip\"",
"type": "string"
},
"toSource": {
"description": "Source name where contents will be extracted (optional; default: fromSource). Example: \"restored\"",
"type": "string"
}
}
},
"indexing.SearchResult": {
"type": "object",
"properties": {
"hasPreview": {
"type": "boolean"
},
"modified": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
},
"source": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"iteminfo.ExtendedItemInfo": {
"type": "object",
"properties": {
"hasPreview": {
"description": "whether the file has a thumbnail preview",
"type": "boolean"
},
"hidden": {
"description": "whether the file is hidden",
"type": "boolean"
},
"isShared": {
"description": "whether the file or folder is shared",
"type": "boolean"
},
"metadata": {
"description": "optional media metadata (audio/video only)",
"allOf": [
{
"$ref": "#/definitions/iteminfo.MediaMetadata"
}
]
},
"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"
}
}
},
"iteminfo.FileInfo": {
"type": "object",
"properties": {
"files": {
"description": "files in the directory with optional metadata",
"type": "array",
"items": {
"$ref": "#/definitions/iteminfo.ExtendedItemInfo"
}
},
"folders": {
"description": "folders in the directory",
"type": "array",
"items": {
"$ref": "#/definitions/iteminfo.ItemInfo"
}
},
"hasPreview": {
"description": "whether the file has a thumbnail preview",
"type": "boolean"
},
"hidden": {
"description": "whether the file is hidden",
"type": "boolean"
},
"isShared": {
"description": "whether the file or folder is shared",
"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": {
"hasPreview": {
"description": "whether the file has a thumbnail preview",
"type": "boolean"
},
"hidden": {
"description": "whether the file is hidden",
"type": "boolean"
},
"isShared": {
"description": "whether the file or folder is shared",
"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"
}
}
},
"iteminfo.MediaMetadata": {
"type": "object",
"properties": {
"album": {
"description": "album name",
"type": "string"
},
"albumArt": {
"description": "album art image data (automatically base64-encoded in JSON)",
"type": "array",
"items": {
"type": "integer"
}
},
"artist": {
"description": "track artist",
"type": "string"
},
"duration": {
"description": "duration in seconds",
"type": "integer"
},
"genre": {
"description": "music/video genre",
"type": "string"
},
"title": {
"description": "track/video title",
"type": "string"
},
"track": {
"description": "track number",
"type": "integer"
},
"year": {
"description": "release year",
"type": "integer"
}
}
},
"settings.Auth": {
"type": "object",
"properties": {
"adminPassword": {
"description": "secret: the password of the admin user. If not set, the default is \"admin\".",
"type": "string"
},
"adminUsername": {
"description": "secret: the username of the admin user. If not set, the default is \"admin\".",
"type": "string"
},
"key": {
"description": "secret: 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": "time in hours each web UI session token is valid for. Default is 2 hours.",
"type": "integer"
},
"totpSecret": {
"description": "secret: secret used to encrypt TOTP secrets",
"type": "string"
}
}
},
"settings.ConditionalFilter": {
"type": "object",
"properties": {
"hidden": {
"description": "deprecated: use ignoreHidden instead. eg, FolderPath: \"/\" and ignoreHidden: true will exclude hidden files and folders under the root folder.",
"type": "boolean"
},
"ignoreHidden": {
"description": "deprecated: use ignoreHidden instead. eg, FolderPath: \"/\" and ignoreHidden: true will exclude hidden files and folders under the root folder.",
"type": "boolean"
},
"ignoreZeroSizeFolders": {
"description": "deprecated: use ignoreZeroSizeFolders instead. eg, FolderPath: \"/\" and ignoreZeroSizeFolders: true will ignore folders with 0 size under the root folder.",
"type": "boolean"
},
"rules": {
"description": "list of item rules to apply to specific paths",
"type": "array",
"items": {
"$ref": "#/definitions/settings.ConditionalRule"
}
}
}
},
"settings.ConditionalRule": {
"type": "object",
"properties": {
"fileEndsWith": {
"description": "(global) exclude files that end with these suffixes. Eg. \".jpg\" or \".txt\"",
"type": "string"
},
"fileName": {
"description": "(global) exclude files that match these names. Eg. \"file.txt\" or \"test.csv\"",
"type": "string"
},
"fileNames": {
"description": "deprecated: exclude files that match these names. Eg. \"file.txt\" or \"test.csv\"",
"type": "string"
},
"filePath": {
"description": "(global) exclude files that match this path. Eg. \"/path/to/file.txt\" or \"/path/to/file.txt/subfile.txt\"",
"type": "string"
},
"fileStartsWith": {
"description": "(global) exclude files that start with these prefixes. Eg. \"archive-\" or \"backup-\"",
"type": "string"
},
"folderEndsWith": {
"description": "(global) exclude folders that end with these suffixes. Eg. \".thumbnails\" or \".git\"",
"type": "string"
},
"folderName": {
"description": "(global) exclude folders that match these names. Eg. \"folder\" or \"subfolder\"",
"type": "string"
},
"folderNames": {
"description": "deprecated: exclude folders that match these names. Eg. \"folder\" or \"subfolder\"",
"type": "string"
},
"folderPath": {
"description": "(global) exclude folders that match this path. Eg. \"/path/to/folder\" or \"/path/to/folder/subfolder\"",
"type": "string"
},
"folderStartsWith": {
"description": "(global) exclude folders that start with these prefixes. Eg. \"archive-\" or \"backup-\"",
"type": "string"
},
"ignoreHidden": {
"description": "Excludes only hidden files and folders",
"type": "boolean"
},
"ignoreSymlinks": {
"description": "Excludes symbolic links",
"type": "boolean"
},
"ignoreZeroSizeFolders": {
"description": "Excludes only folders with 0 size",
"type": "boolean"
},
"includeRootItem": {
"description": "include only these items at root folder level",
"type": "string"
},
"neverWatchPath": {
"description": "index the folder in the first pass to get included in search, but never re-indexed.",
"type": "string"
},
"viewable": {
"description": "Enable viewing in UI but exclude from indexing",
"type": "boolean"
}
}
},
"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.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.FfmpegConvert": {
"type": "object",
"properties": {
"imagePreview": {
"description": "supported image preview formats. defaults vary by type (see individual type docs)",
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"videoPreview": {
"description": "supported video preview formats. defaults to true for all types unless explicitly disabled.",
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
},
"settings.Filesystem": {
"type": "object",
"required": [
"createDirectoryPermission",
"createFilePermission"
],
"properties": {
"createDirectoryPermission": {
"description": "Unix permissions like 755, 2755, 1777 (default: 755)",
"type": "string"
},
"createFilePermission": {
"description": "Unix permissions like 644, 755, 2755 (default: 644)",
"type": "string"
}
}
},
"settings.Frontend": {
"type": "object",
"properties": {
"description": {
"description": "description that shows up in html head meta description",
"type": "string"
},
"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"
}
},
"favicon": {
"description": "path to a favicon to use for the frontend",
"type": "string"
},
"loginButtonText": {
"description": "text to display on the login button",
"type": "string"
},
"loginIcon": {
"description": "path to an image file for the login page icon",
"type": "string"
},
"name": {
"description": "display name",
"type": "string"
},
"oidcLoginButtonText": {
"description": "text to display on the OIDC login button",
"type": "string"
},
"styling": {
"$ref": "#/definitions/settings.StylingConfig"
}
}
},
"settings.IndexSqlConfig": {
"type": "object",
"properties": {
"batchSize": {
"description": "number of items to batch in a single transaction, typically 500-5000. higher = faster but could use more memory.",
"type": "integer"
},
"cacheSizeMB": {
"description": "size of the SQLite cache in MB",
"type": "integer"
},
"disableReuse": {
"description": "enable to always create a new indexing database on startup.",
"type": "boolean"
},
"walMode": {
"description": "enable the more complex WAL journaling mode. Slower, more memory usage, but better for deployments with constant user activity.",
"type": "boolean"
}
}
},
"settings.Integrations": {
"type": "object",
"properties": {
"media": {
"$ref": "#/definitions/settings.Media"
},
"office": {
"$ref": "#/definitions/settings.OnlyOffice"
}
}
},
"settings.JwtAuthConfig": {
"type": "object",
"properties": {
"adminGroup": {
"description": "if set, users in this group will be granted admin privileges",
"type": "string"
},
"algorithm": {
"description": "JWT signing algorithm (HS256, HS384, HS512, RS256, ES256). Default is \"HS256\"",
"type": "string"
},
"createUser": {
"description": "deprecated: always true for supported authentication methods",
"type": "boolean"
},
"disableVerifyTLS": {
"description": "disable TLS verification (insecure, for testing only)",
"type": "boolean"
},
"enabled": {
"description": "whether to enable this authentication method.",
"type": "boolean"
},
"groupsClaim": {
"description": "the JSON field name to read groups from. Default is \"groups\"",
"type": "string"
},
"header": {
"description": "HTTP header to look for JWT token (e.g. X-JWT-Assertion). Default is \"X-JWT-Assertion\"",
"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"
},
"secret": {
"description": "secret: shared secret key for verifying JWT token signatures (required)",
"type": "string"
},
"userGroups": {
"description": "if set, only users in these groups are allowed to log in. Blocks all other users even with valid credentials.",
"type": "array",
"items": {
"type": "string"
}
},
"userIdentifier": {
"description": "the field value to use as the username. Default is \"preferred_username\" in oidc, \"sub\" in jwt. Other common values are \"email\" or \"username\", or \"phone\"",
"type": "string"
}
}
},
"settings.LdapConfig": {
"type": "object",
"properties": {
"adminGroup": {
"description": "if set, users in this group will be granted admin privileges",
"type": "string"
},
"baseDN": {
"description": "LDAP search base DN (e.g. dc=ldap,dc=goauthentik,dc=io)",
"type": "string"
},
"createUser": {
"description": "deprecated: always true for supported authentication methods",
"type": "boolean"
},
"disableVerifyTLS": {
"description": "disable TLS verification (insecure, for testing only)",
"type": "boolean"
},
"enabled": {
"description": "whether to enable this authentication method.",
"type": "boolean"
},
"groupsClaim": {
"description": "the JSON field name to read groups from. Default is \"groups\"",
"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"
},
"server": {
"description": "scheme://host:port of the LDAP server (e.g. ldap://localhost:389)",
"type": "string"
},
"userDN": {
"description": "Bind DN for service account (e.g. cn=admin,ou=users,dc=ldap,dc=goauthentik,dc=io)",
"type": "string"
},
"userFilter": {
"description": "Search filter for finding user by username. Default (\u0026(cn=%s)(objectClass=user)); override e.g. (email=%s) or (sAMAccountName=%s) for other directories.",
"type": "string"
},
"userGroups": {
"description": "if set, only users in these groups are allowed to log in. Blocks all other users even with valid credentials.",
"type": "array",
"items": {
"type": "string"
}
},
"userIdentifier": {
"description": "the field value to use as the username. Default is \"preferred_username\" in oidc, \"sub\" in jwt. Other common values are \"email\" or \"username\", or \"phone\"",
"type": "string"
},
"userPassword": {
"description": "Bind password for service account",
"type": "string"
}
}
},
"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",
"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": {
"jwt": {
"$ref": "#/definitions/settings.JwtAuthConfig"
},
"ldap": {
"$ref": "#/definitions/settings.LdapConfig"
},
"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": {
"convert": {
"description": "config for ffmpeg conversion settings",
"allOf": [
{
"$ref": "#/definitions/settings.FfmpegConvert"
}
]
},
"debug": {
"description": "output ffmpeg stdout for media integration -- careful can produces lots of output!",
"type": "boolean"
},
"exiftoolPath": {
"description": "path to exiftool executable",
"type": "string"
},
"extractEmbeddedSubtitles": {
"description": "extract embedded subtitles from media files",
"type": "boolean"
},
"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": "secret: client id of the OIDC application",
"type": "string"
},
"clientSecret": {
"description": "secret: client secret of the OIDC application",
"type": "string"
},
"createUser": {
"description": "deprecated: always true for supported authentication methods",
"type": "boolean"
},
"disableVerifyTLS": {
"description": "disable TLS verification (insecure, for testing only)",
"type": "boolean"
},
"enabled": {
"description": "whether to enable this authentication method.",
"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"
},
"userGroups": {
"description": "if set, only users in these groups are allowed to log in. Blocks all other users even with valid credentials.",
"type": "array",
"items": {
"type": "string"
}
},
"userIdentifier": {
"description": "the field value to use as the username. Default is \"preferred_username\" in oidc, \"sub\" in jwt. Other common values are \"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": {
"description": "secret: authentication key for OnlyOffice integration",
"type": "string"
},
"url": {
"description": "The URL to the OnlyOffice Document Server, needs to be accessible to the user.",
"type": "string"
},
"viewOnly": {
"description": "view only mode for OnlyOffice",
"type": "boolean"
}
}
},
"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": {
"adminGroup": {
"description": "if set, users in this group will be granted admin privileges",
"type": "string"
},
"createUser": {
"description": "deprecated: always true for supported authentication methods",
"type": "boolean"
},
"disableVerifyTLS": {
"description": "disable TLS verification (insecure, for testing only)",
"type": "boolean"
},
"enabled": {
"description": "whether to enable this authentication method.",
"type": "boolean"
},
"groupsClaim": {
"description": "the JSON field name to read groups from. Default is \"groups\"",
"type": "string"
},
"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"
},
"userGroups": {
"description": "if set, only users in these groups are allowed to log in. Blocks all other users even with valid credentials.",
"type": "array",
"items": {
"type": "string"
}
},
"userIdentifier": {
"description": "the field value to use as the username. Default is \"preferred_username\" in oidc, \"sub\" in jwt. Other common values are \"email\" or \"username\", or \"phone\"",
"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"
},
"cacheDirCleanup": {
"description": "whether to automatically cleanup the cache directory. Note: docker must also mount a persistent volume to persist the cache (default: false)",
"type": "boolean"
},
"database": {
"description": "path to the database file",
"type": "string"
},
"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"
},
"disableUpdateCheck": {
"description": "disables backend update check service",
"type": "boolean"
},
"disableWebDAV": {
"description": "disable webdav support (default: false)",
"type": "boolean"
},
"externalUrl": {
"description": "used by share links if set (eg. http://mydomain.com)",
"type": "string"
},
"filesystem": {
"description": "filesystem settings",
"allOf": [
{
"$ref": "#/definitions/settings.Filesystem"
}
]
},
"indexSqlConfig": {
"description": "Index database SQL configuration",
"allOf": [
{
"$ref": "#/definitions/settings.IndexSqlConfig"
}
]
},
"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"
},
"listen": {
"description": "address to listen on (default: 0.0.0.0)",
"type": "string"
},
"logging": {
"type": "array",
"items": {
"$ref": "#/definitions/settings.LogConfig"
}
},
"maxArchiveSize": {
"description": "deprecated: no longer a limitation after v1.3.2-beta",
"type": "integer"
},
"minSearchLength": {
"description": "minimum length of search query to begin searching (default: 3)",
"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": {
"conditionals": {
"description": "deprecated: use source.rules instead",
"allOf": [
{
"$ref": "#/definitions/settings.ConditionalFilter"
}
]
},
"createUserDir": {
"description": "create a user directory for each user under defaultUserScope + username",
"type": "boolean"
},
"defaultEnabled": {
"description": "should be added as a default source for new users?",
"type": "boolean"
},
"defaultUserScope": {
"description": "defaults to root of index \"/\" should match folders under path",
"type": "string"
},
"denyByDefault": {
"description": "deny access unless an \"allow\" access rule was specifically created.",
"type": "boolean"
},
"disableIndexing": {
"description": "deprecated: use indexingDisabled instead to 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"
},
"indexingIntervalMinutes": {
"description": "deprecated: create a rule with indexingIntervalMinutes to set the indexing interval for this source",
"type": "integer"
},
"private": {
"description": "designate as source as private -- currently just means no sharing permitted.",
"type": "boolean"
},
"rules": {
"description": "list of item rules to apply to specific paths",
"type": "array",
"items": {
"$ref": "#/definitions/settings.ConditionalRule"
}
},
"useLogicalSize": {
"description": "calculate sizes based on logical size instead of disk utilization (du -sh), folders will be 0 bytes when empty.",
"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"
},
"disableEventThemes": {
"description": "disable the event based themes,",
"type": "boolean"
},
"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"
},
"debugOffice": {
"description": "debug onlyoffice editor",
"type": "boolean"
},
"deleteAfterArchive": {
"description": "delete source files after successful creation/extraction of archives",
"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": "space 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": "space 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"
},
"hideFilesInTree": {
"description": "hide files in the sidebar tree navigation, when true, will show only directories.",
"type": "boolean"
},
"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/settings.UserDefaultsPermissions"
},
"preview": {
"$ref": "#/definitions/settings.UserDefaultsPreview"
},
"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"
}
}
},
"settings.UserDefaultsPermissions": {
"type": "object",
"properties": {
"admin": {
"description": "allow admin access",
"type": "boolean"
},
"api": {
"description": "allow api access",
"type": "boolean"
},
"create": {
"description": "allow creating or uploading files",
"type": "boolean"
},
"delete": {
"description": "allow deleting files",
"type": "boolean"
},
"download": {
"description": "allow downloading files",
"type": "boolean"
},
"modify": {
"description": "allow modifying files",
"type": "boolean"
},
"realtime": {
"description": "allow realtime updates",
"type": "boolean"
},
"share": {
"description": "allow sharing files",
"type": "boolean"
}
}
},
"settings.UserDefaultsPreview": {
"type": "object",
"properties": {
"audio": {
"description": "show thumbnails for audio files",
"type": "boolean"
},
"autoplayMedia": {
"description": "autoplay media files in preview",
"type": "boolean"
},
"defaultMediaPlayer": {
"description": "disable the styled feature-rich media player for browser default",
"type": "boolean"
},
"disableHideSidebar": {
"description": "keep sidebar open when previewing files",
"type": "boolean"
},
"folder": {
"description": "show thumbnails for folders that have previewable contents",
"type": "boolean"
},
"highQuality": {
"description": "deprecated: always true in v1.3.0+",
"type": "boolean"
},
"image": {
"description": "show thumbnails for image files",
"type": "boolean"
},
"models": {
"description": "show live thumbnails for 3D models files",
"type": "boolean"
},
"motionVideoPreview": {
"description": "show multiple frames for videos in thumbnail preview when hovering",
"type": "boolean"
},
"office": {
"description": "show thumbnails for office files",
"type": "boolean"
},
"popup": {
"description": "show larger popup preview when hovering over thumbnail",
"type": "boolean"
},
"video": {
"description": "show thumbnails for video files",
"type": "boolean"
}
}
},
"share.CommonShare": {
"type": "object",
"properties": {
"allowCreate": {
"description": "allow creating files",
"type": "boolean"
},
"allowDelete": {
"type": "boolean"
},
"allowModify": {
"description": "allow modifying files",
"type": "boolean"
},
"allowReplacements": {
"description": "allow replacements of files",
"type": "boolean"
},
"allowedUsernames": {
"type": "array",
"items": {
"type": "string"
}
},
"banner": {
"type": "string"
},
"bannerUrl": {
"type": "string"
},
"canEditShare": {
"type": "boolean"
},
"description": {
"type": "string"
},
"disableAnonymous": {
"type": "boolean"
},
"disableDownload": {
"description": "don't allow downloading files",
"type": "boolean"
},
"disableFileViewer": {
"description": "don't allow viewing files",
"type": "boolean"
},
"disableLoginOption": {
"description": "disable login option in share (true = hide, false = show)",
"type": "boolean"
},
"disableShareCard": {
"type": "boolean"
},
"disableSidebar": {
"type": "boolean"
},
"disableThumbnails": {
"type": "boolean"
},
"downloadURL": {
"type": "string"
},
"downloadsLimit": {
"type": "integer"
},
"enableOnlyOffice": {
"type": "boolean"
},
"enforceDarkLightMode": {
"description": "\"dark\" or \"light\"",
"type": "string"
},
"extractEmbeddedSubtitles": {
"description": "can be io intensive for large files and take 10-30 seconds.",
"type": "boolean"
},
"favicon": {
"type": "string"
},
"faviconUrl": {
"type": "string"
},
"hasPassword": {
"type": "boolean"
},
"hideNavButtons": {
"type": "boolean"
},
"keepAfterExpiration": {
"type": "boolean"
},
"maxBandwidth": {
"type": "integer"
},
"path": {
"type": "string"
},
"perUserDownloadLimit": {
"type": "boolean"
},
"quickDownload": {
"type": "boolean"
},
"shareTheme": {
"type": "string"
},
"shareType": {
"description": "type of share: normal, upload, max",
"type": "string"
},
"shareURL": {
"type": "string"
},
"showHidden": {
"description": "show hidden files in share (true = show, false = hide)",
"type": "boolean"
},
"sidebarLinks": {
"description": "customizable sidebar links",
"type": "array",
"items": {
"$ref": "#/definitions/users.SidebarLink"
}
},
"source": {
"description": "backend source is path to maintain between name changes",
"type": "string"
},
"sourceURL": {
"type": "string"
},
"themeColor": {
"type": "string"
},
"title": {
"type": "string"
},
"viewMode": {
"description": "default view mode for anonymous users: \"list\", \"compact\", \"normal\", \"gallery\"",
"type": "string"
}
}
},
"share.CreateBody": {
"type": "object",
"properties": {
"allowCreate": {
"description": "allow creating files",
"type": "boolean"
},
"allowDelete": {
"type": "boolean"
},
"allowModify": {
"description": "allow modifying files",
"type": "boolean"
},
"allowReplacements": {
"description": "allow replacements of files",
"type": "boolean"
},
"allowedUsernames": {
"type": "array",
"items": {
"type": "string"
}
},
"banner": {
"type": "string"
},
"bannerUrl": {
"type": "string"
},
"canEditShare": {
"type": "boolean"
},
"description": {
"type": "string"
},
"disableAnonymous": {
"type": "boolean"
},
"disableDownload": {
"description": "don't allow downloading files",
"type": "boolean"
},
"disableFileViewer": {
"description": "don't allow viewing files",
"type": "boolean"
},
"disableLoginOption": {
"description": "disable login option in share (true = hide, false = show)",
"type": "boolean"
},
"disableShareCard": {
"type": "boolean"
},
"disableSidebar": {
"type": "boolean"
},
"disableThumbnails": {
"type": "boolean"
},
"downloadURL": {
"type": "string"
},
"downloadsLimit": {
"type": "integer"
},
"enableOnlyOffice": {
"type": "boolean"
},
"enforceDarkLightMode": {
"description": "\"dark\" or \"light\"",
"type": "string"
},
"expires": {
"type": "string"
},
"extractEmbeddedSubtitles": {
"description": "can be io intensive for large files and take 10-30 seconds.",
"type": "boolean"
},
"favicon": {
"type": "string"
},
"faviconUrl": {
"type": "string"
},
"hasPassword": {
"type": "boolean"
},
"hash": {
"type": "string"
},
"hideNavButtons": {
"type": "boolean"
},
"keepAfterExpiration": {
"type": "boolean"
},
"maxBandwidth": {
"type": "integer"
},
"password": {
"type": "string"
},
"path": {
"type": "string"
},
"perUserDownloadLimit": {
"type": "boolean"
},
"quickDownload": {
"type": "boolean"
},
"shareTheme": {
"type": "string"
},
"shareType": {
"description": "type of share: normal, upload, max",
"type": "string"
},
"shareURL": {
"type": "string"
},
"showHidden": {
"description": "show hidden files in share (true = show, false = hide)",
"type": "boolean"
},
"sidebarLinks": {
"description": "customizable sidebar links",
"type": "array",
"items": {
"$ref": "#/definitions/users.SidebarLink"
}
},
"source": {
"description": "backend source is path to maintain between name changes",
"type": "string"
},
"sourceURL": {
"type": "string"
},
"themeColor": {
"type": "string"
},
"title": {
"type": "string"
},
"unit": {
"type": "string"
},
"viewMode": {
"description": "default view mode for anonymous users: \"list\", \"compact\", \"normal\", \"gallery\"",
"type": "string"
}
}
},
"share.Link": {
"type": "object",
"properties": {
"allowCreate": {
"description": "allow creating files",
"type": "boolean"
},
"allowDelete": {
"type": "boolean"
},
"allowModify": {
"description": "allow modifying files",
"type": "boolean"
},
"allowReplacements": {
"description": "allow replacements of files",
"type": "boolean"
},
"allowedUsernames": {
"type": "array",
"items": {
"type": "string"
}
},
"banner": {
"type": "string"
},
"bannerUrl": {
"type": "string"
},
"canEditShare": {
"type": "boolean"
},
"description": {
"type": "string"
},
"disableAnonymous": {
"type": "boolean"
},
"disableDownload": {
"description": "don't allow downloading files",
"type": "boolean"
},
"disableFileViewer": {
"description": "don't allow viewing files",
"type": "boolean"
},
"disableLoginOption": {
"description": "disable login option in share (true = hide, false = show)",
"type": "boolean"
},
"disableShareCard": {
"type": "boolean"
},
"disableSidebar": {
"type": "boolean"
},
"disableThumbnails": {
"type": "boolean"
},
"downloadURL": {
"type": "string"
},
"downloads": {
"type": "integer"
},
"downloadsLimit": {
"type": "integer"
},
"enableOnlyOffice": {
"type": "boolean"
},
"enforceDarkLightMode": {
"description": "\"dark\" or \"light\"",
"type": "string"
},
"expire": {
"type": "integer"
},
"extractEmbeddedSubtitles": {
"description": "can be io intensive for large files and take 10-30 seconds.",
"type": "boolean"
},
"favicon": {
"type": "string"
},
"faviconUrl": {
"type": "string"
},
"hasPassword": {
"type": "boolean"
},
"hash": {
"type": "string"
},
"hideNavButtons": {
"type": "boolean"
},
"keepAfterExpiration": {
"type": "boolean"
},
"maxBandwidth": {
"type": "integer"
},
"password_hash": {
"type": "string"
},
"path": {
"type": "string"
},
"perUserDownloadLimit": {
"type": "boolean"
},
"quickDownload": {
"type": "boolean"
},
"shareTheme": {
"type": "string"
},
"shareType": {
"description": "type of share: normal, upload, max",
"type": "string"
},
"shareURL": {
"type": "string"
},
"showHidden": {
"description": "show hidden files in share (true = show, false = hide)",
"type": "boolean"
},
"sidebarLinks": {
"description": "customizable sidebar links",
"type": "array",
"items": {
"$ref": "#/definitions/users.SidebarLink"
}
},
"source": {
"description": "backend source is path to maintain between name changes",
"type": "string"
},
"sourceURL": {
"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"
},
"userDownloads": {
"description": "Track downloads per username",
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"userID": {
"type": "integer"
},
"version": {
"type": "integer"
},
"viewMode": {
"description": "default view mode for anonymous users: \"list\", \"compact\", \"normal\", \"gallery\"",
"type": "string"
}
}
},
"users.AuthToken": {
"type": "object",
"properties": {
"Permissions": {
"$ref": "#/definitions/users.Permissions"
},
"belongsTo": {
"type": "integer"
},
"expiresAt": {
"type": "integer"
},
"issuedAt": {
"type": "integer"
},
"key": {
"description": "for backward compatibility",
"type": "string"
},
"name": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"users.FileLoading": {
"type": "object",
"properties": {
"clearAll": {
"type": "boolean"
},
"downloadChunkSizeMb": {
"type": "integer"
},
"maxConcurrentUpload": {
"type": "integer"
},
"uploadChunkSizeMb": {
"type": "integer"
}
}
},
"users.LoginMethod": {
"type": "string",
"enum": [
"password",
"proxy",
"oidc",
"ldap",
"jwt"
],
"x-enum-varnames": [
"LoginMethodPassword",
"LoginMethodProxy",
"LoginMethodOidc",
"LoginMethodLdap",
"LoginMethodJwt"
]
},
"users.Permissions": {
"type": "object",
"properties": {
"admin": {
"description": "allow admin access",
"type": "boolean"
},
"api": {
"description": "allow api access",
"type": "boolean"
},
"create": {
"description": "allow creating or uploading files",
"type": "boolean"
},
"delete": {
"description": "allow deleting files",
"type": "boolean"
},
"download": {
"description": "allow downloading files",
"type": "boolean"
},
"modify": {
"description": "allow modifying files",
"type": "boolean"
},
"realtime": {
"description": "allow realtime updates",
"type": "boolean"
},
"share": {
"description": "allow sharing files",
"type": "boolean"
}
}
},
"users.Preview": {
"type": "object",
"properties": {
"audio": {
"description": "show thumbnail preview image for audio files",
"type": "boolean"
},
"autoplayMedia": {
"description": "autoplay media files in preview",
"type": "boolean"
},
"defaultMediaPlayer": {
"description": "disable html5 media player and use the default media player",
"type": "boolean"
},
"disableHideSidebar": {
"description": "disable the hide sidebar preview for previews and editors",
"type": "boolean"
},
"folder": {
"description": "show thumbnail preview image for folder files",
"type": "boolean"
},
"image": {
"description": "show thumbnail preview image for image files",
"type": "boolean"
},
"models": {
"description": "show live thumbnails for 3D models files",
"type": "boolean"
},
"motionVideoPreview": {
"description": "show multiple frames for videos in thumbnail preview when hovering",
"type": "boolean"
},
"office": {
"description": "show thumbnail preview image for office files",
"type": "boolean"
},
"popup": {
"description": "show larger popup preview when hovering over thumbnail",
"type": "boolean"
},
"video": {
"description": "show thumbnail preview image for video files",
"type": "boolean"
}
}
},
"users.SidebarLink": {
"type": "object",
"properties": {
"category": {
"description": "Category type: \"source\", \"source-link\", \"share\", \"tool\", \"custom\", etc.",
"type": "string"
},
"icon": {
"description": "Material icon name",
"type": "string"
},
"name": {
"description": "Display name of the link",
"type": "string"
},
"sourceName": {
"description": "Source identifier for source-type links",
"type": "string"
},
"target": {
"description": "Target path/URL for the link (relative for source/share)",
"type": "string"
}
}
},
"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": {
"description": "deprecated: use Tokens instead",
"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"
},
"debugOffice": {
"description": "debug onlyoffice editor",
"type": "boolean"
},
"deleteAfterArchive": {
"description": "delete source files after successful creation/extraction of archives",
"type": "boolean"
},
"deleteWithoutConfirming": {
"description": "delete files without confirmation",
"type": "boolean"
},
"disableOfficePreviewExt": {
"description": "deprecated",
"type": "string"
},
"disableOnlyOfficeExt": {
"description": "deprecated",
"type": "string"
},
"disablePreviewExt": {
"description": "space 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": "space 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"
},
"hideFilesInTree": {
"description": "hide files in the sidebar tree navigation, when true, will show only directories.",
"type": "boolean"
},
"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"
}
},
"showFirstLogin": {
"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"
},
"sidebarLinks": {
"description": "customizable sidebar links",
"type": "array",
"items": {
"$ref": "#/definitions/users.SidebarLink"
}
},
"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"
},
"tokens": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/users.AuthToken"
}
},
"totpNonce": {
"type": "string"
},
"totpSecret": {
"type": "string"
},
"username": {
"type": "string"
},
"version": {
"type": "integer"
},
"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: "}}",
}