forked from upstream/filebrowser
Co-authored-by: Swedish Wiking <121635232+Swedish-Wiking@users.noreply.github.com> Co-authored-by: Pyro <pyrodd@gmail.com> Co-authored-by: Kevin B. <kurami32_kbm@proton.me> Co-authored-by: lps-rocks <10893911+lps-rocks@users.noreply.github.com> Co-authored-by: contributor <foss.contributor@gmail.com> Co-authored-by: Ironic <202444094+YoureIronic@users.noreply.github.com> Co-authored-by: Sarabanga <96509626+Sarabanga@users.noreply.github.com> Co-authored-by: ✿ corey <corey@x64.co>
4647 lines
170 KiB
Go
4647 lines
170 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/api/access": {
|
|
"get": {
|
|
"description": "Lists access rules. Can be filtered by source, path, user, or group. Can also be grouped by user or group.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Access"
|
|
],
|
|
"summary": "List access rules",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Source name (e.g. 'default')",
|
|
"name": "source",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Index path (e.g. /secret)",
|
|
"name": "path",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Username to filter rules for",
|
|
"name": "user",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Group name to filter rules for",
|
|
"name": "group",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Varies based on query. Can be access.FrontendAccessRule (when source and path specified), []access.PrincipalRule, map[string][]access.PrincipalRule, or map[string]access.FrontendAccessRule",
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Add or update an access rule for a sourcePath and indexPath.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Access"
|
|
],
|
|
"summary": "Add or update access rule",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Source path prefix (e.g. mnt/storage)",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Index path (e.g. /secret)",
|
|
"name": "path",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Rule details: allow (true/false), ruleCategory (user/group), value (username or groupname)",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allow": {
|
|
"type": "boolean"
|
|
},
|
|
"ruleCategory": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rule added or updated",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete a user or group from an allow or deny list for a sourcePath and indexPath. 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.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "User login",
|
|
"responses": {
|
|
"200": {
|
|
"description": "JWT token for authentication",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - authentication failed",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/logout": {
|
|
"post": {
|
|
"description": "Returns a logout URL for the frontend to redirect to.",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "User Logout",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "JWT token",
|
|
"name": "auth",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"logoutUrl\": \"http://...\"}",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/oidc/callback": {
|
|
"get": {
|
|
"description": "Handles OIDC login callback.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"OIDC"
|
|
],
|
|
"summary": "OIDC callback",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "OIDC code",
|
|
"name": "code",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "OIDC state",
|
|
"name": "state",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OIDC callback result",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/oidc/login": {
|
|
"get": {
|
|
"description": "Initiates OIDC login flow.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"OIDC"
|
|
],
|
|
"summary": "OIDC login",
|
|
"responses": {
|
|
"302": {
|
|
"description": "Redirect to OIDC provider",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/otp/generate": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Generates a new TOTP secret and QR code for the authenticated user.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"OTP"
|
|
],
|
|
"summary": "Generate OTP",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OTP secret generated successfully.",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/otp/verify": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Verifies the provided TOTP code for the authenticated user.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"OTP"
|
|
],
|
|
"summary": "Verify OTP",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "TOTP code to verify",
|
|
"name": "code",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OTP token is valid.",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.HttpResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid TOTP token",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/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": {
|
|
"put": {
|
|
"description": "Create an API key with specified name, duration, and permissions.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Create API key",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Name of the API key",
|
|
"name": "name",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Duration of the API key in days",
|
|
"name": "days",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Permissions for the API key (comma-separated)",
|
|
"name": "permissions",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Token created successfully, response contains json object with token key",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.HttpResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Conflict",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete an API key with specified name.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Delete API key",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Name of the API key to delete",
|
|
"name": "name",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "API key deleted successfully",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.HttpResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/tokens": {
|
|
"get": {
|
|
"description": "List all API keys or retrieve details for a specific key.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "List API keys",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Name of the API to retrieve details",
|
|
"name": "name",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of API keys or specific key details",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.AuthTokenMin"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/jobs/{action}/{target}": {
|
|
"get": {
|
|
"description": "Returns job info for the user.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Jobs"
|
|
],
|
|
"summary": "Get jobs info",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Job action",
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Job target",
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Job info",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/indexing.ReducedIndex"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/media/subtitles": {
|
|
"get": {
|
|
"description": "Extracts embedded subtitle content from video files by stream index and returns raw WebVTT content",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/vtt"
|
|
],
|
|
"tags": [
|
|
"Subtitles"
|
|
],
|
|
"summary": "Extract embedded subtitles",
|
|
"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": "integer",
|
|
"description": "Stream index for embedded subtitle extraction, defaults to 0",
|
|
"name": "index",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Raw WebVTT subtitle content",
|
|
"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/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/raw": {
|
|
"get": {
|
|
"description": "Returns the raw content of a file, multiple files, or a directory. Supports downloading files as archives in various formats.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Resources"
|
|
],
|
|
"summary": "Get raw content of a file, multiple files, or directory",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "a list of files in the following format 'source::filename' and separated by '||' with additional items in the list. (required)",
|
|
"name": "files",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "If true, sets 'Content-Disposition' to 'inline'. Otherwise, defaults to 'attachment'.",
|
|
"name": "inline",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Compression algorithm for archiving multiple files or directories. Options: 'zip' and 'tar.gz'. Default is 'zip'.",
|
|
"name": "algo",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Raw file or directory content, or archive for multiple files",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"202": {
|
|
"description": "Modify permissions required",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request path",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "File or directory not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/renew": {
|
|
"post": {
|
|
"description": "Refresh the authentication token for a logged-in user.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Renew authentication token",
|
|
"responses": {
|
|
"200": {
|
|
"description": "New JWT token generated",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid token",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources": {
|
|
"get": {
|
|
"description": "Returns metadata and optionally file contents for a specified resource path.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Resources"
|
|
],
|
|
"summary": "Get resource information",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Path to the resource",
|
|
"name": "path",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Source name for the desired source, default is used if not provided",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Include file content if true",
|
|
"name": "content",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Optional checksum validation",
|
|
"name": "checksum",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Resource metadata",
|
|
"schema": {
|
|
"$ref": "#/definitions/iteminfo.FileInfo"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Updates an existing file at the specified path.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Resources"
|
|
],
|
|
"summary": "Update a file resource",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination path where to place the files inside the destination source",
|
|
"name": "path",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Source name for the desired source, default is used if not provided",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Resource updated successfully"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"405": {
|
|
"description": "Method not allowed",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a new resource or uploads a file at the specified path. Supports file uploads and directory creation.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Resources"
|
|
],
|
|
"summary": "Create or upload a resource",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "url encoded destination path where to place the files inside the destination source, a directory must end in / to create a directory",
|
|
"name": "path",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Name for the desired filebrowser destination source name, default is used if not provided",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Override existing file if true",
|
|
"name": "override",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Resource created successfully"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Conflict - Resource already exists",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Deletes a resource located at the specified path.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Resources"
|
|
],
|
|
"summary": "Delete a resource",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Path to the resource",
|
|
"name": "path",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Source name for the desired source, default is used if not provided",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Resource deleted successfully"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Moves or renames a resource to a new destination.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Resources"
|
|
],
|
|
"summary": "Patch resource (move/rename)",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Path from resource in \u003csource_name\u003e::\u003cindex_path\u003e format",
|
|
"name": "from",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Destination path for the resource",
|
|
"name": "destination",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Action to perform (copy, rename)",
|
|
"name": "action",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Overwrite if destination exists",
|
|
"name": "overwrite",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Rename if destination exists",
|
|
"name": "rename",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Resource moved/renamed successfully"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Conflict - Destination exists",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/search": {
|
|
"get": {
|
|
"description": "Searches for files matching the provided query. Returns file paths and metadata based on the user's session and scope.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Search"
|
|
],
|
|
"summary": "Search Files",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Search query",
|
|
"name": "query",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Source name for the desired source",
|
|
"name": "source",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "path within user scope to search, for example '/first/second' to search within the second directory only",
|
|
"name": "scope",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "User session ID, add unique value to prevent collisions",
|
|
"name": "SessionId",
|
|
"in": "header"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of search results",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/indexing.SearchResult"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/settings": {
|
|
"get": {
|
|
"description": "Returns the current configuration settings for signup, user directories, rules, frontend.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Settings"
|
|
],
|
|
"summary": "Get system settings",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Property to retrieve: ` + "`" + `userDefaults` + "`" + `, ` + "`" + `frontend` + "`" + `, ` + "`" + `auth` + "`" + `, ` + "`" + `server` + "`" + `, ` + "`" + `sources` + "`" + `",
|
|
"name": "property",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "System settings data",
|
|
"schema": {
|
|
"$ref": "#/definitions/settings.Settings"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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/shares": {
|
|
"get": {
|
|
"description": "Returns a list of share links for the current user, or all links if the user is an admin.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Shares"
|
|
],
|
|
"summary": "List share links",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of share links",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/share.Link"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Deletes a share link specified by its hash.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Shares"
|
|
],
|
|
"summary": "Delete a share link",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Hash of the share link to delete",
|
|
"name": "hash",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Share link deleted successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - missing or invalid hash",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/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"
|
|
],
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Health Check",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful health check response",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public/api/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": [
|
|
"Public 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/raw": {
|
|
"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.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/octet-stream"
|
|
],
|
|
"tags": [
|
|
"Public Shares"
|
|
],
|
|
"summary": "Download files from a public share",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Share hash for authentication",
|
|
"name": "hash",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Files to download in format: 'source::path||source::path'. Example: '/file1||/folder/file2'",
|
|
"name": "files",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "If true, sets 'Content-Disposition' to 'inline'. Otherwise, defaults to 'attachment'.",
|
|
"name": "inline",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Compression algorithm for archiving multiple files or directories. Options: 'zip' and 'tar.gz'. Default is 'zip'.",
|
|
"name": "algo",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Raw file or directory content, or archive for multiple files",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"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": {
|
|
"put": {
|
|
"description": "Updates the content of a file in a public share.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Public 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": [
|
|
"Public 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": "Target path within the share to upload to. Must be relative to share root.",
|
|
"name": "targetPath",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public/api/share": {
|
|
"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": [
|
|
"Public 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"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"http.AuthTokenMin": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Permissions": {
|
|
"$ref": "#/definitions/users.Permissions"
|
|
},
|
|
"created": {
|
|
"type": "integer"
|
|
},
|
|
"expires": {
|
|
"type": "integer"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.DirectDownloadResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.GroupListResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"http.HttpResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "integer"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.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"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"disableAnonymous": {
|
|
"type": "boolean"
|
|
},
|
|
"disableDownload": {
|
|
"description": "don't allow downloading files",
|
|
"type": "boolean"
|
|
},
|
|
"disableFileViewer": {
|
|
"description": "don't allow viewing files",
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"source": {
|
|
"description": "Override embedded field to show source name",
|
|
"type": "string"
|
|
},
|
|
"themeColor": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"description": "Token is a random value that will only be set when PasswordHash is set. It is\nURL-Safe and is used to download links in password-protected shares via a\nquery arg.",
|
|
"type": "string"
|
|
},
|
|
"userID": {
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"viewMode": {
|
|
"description": "default view mode for anonymous users: \"list\", \"compact\", \"normal\", \"gallery\"",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"indexing.IndexStatus": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ready",
|
|
"indexing",
|
|
"unavailable"
|
|
],
|
|
"x-enum-varnames": [
|
|
"READY",
|
|
"INDEXING",
|
|
"UNAVAILABLE"
|
|
]
|
|
},
|
|
"indexing.ReducedIndex": {
|
|
"type": "object",
|
|
"properties": {
|
|
"assessment": {
|
|
"type": "string"
|
|
},
|
|
"fullScanDurationSeconds": {
|
|
"type": "integer"
|
|
},
|
|
"lastIndexedUnixTime": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"numDeleted": {
|
|
"type": "integer"
|
|
},
|
|
"numDirs": {
|
|
"type": "integer"
|
|
},
|
|
"numFiles": {
|
|
"type": "integer"
|
|
},
|
|
"quickScanDurationSeconds": {
|
|
"type": "integer"
|
|
},
|
|
"scanners": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/indexing.ScannerInfo"
|
|
}
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/indexing.IndexStatus"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"used": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"indexing.ScannerInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"assessment": {
|
|
"type": "string"
|
|
},
|
|
"currentSchedule": {
|
|
"type": "integer"
|
|
},
|
|
"fullScanTime": {
|
|
"type": "integer"
|
|
},
|
|
"isRoot": {
|
|
"type": "boolean"
|
|
},
|
|
"lastScanned": {
|
|
"type": "string"
|
|
},
|
|
"numDirs": {
|
|
"type": "integer"
|
|
},
|
|
"numFiles": {
|
|
"type": "integer"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"quickScanTime": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"indexing.SearchResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
},
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"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": "base64 encoded album art / video thumbnail",
|
|
"type": "string"
|
|
},
|
|
"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 to exclude hidden files and folders.",
|
|
"type": "boolean"
|
|
},
|
|
"ignoreHidden": {
|
|
"description": "exclude hidden files and folders.",
|
|
"type": "boolean"
|
|
},
|
|
"ignoreZeroSizeFolders": {
|
|
"description": "ignore folders with 0 size",
|
|
"type": "boolean"
|
|
},
|
|
"rules": {
|
|
"description": "list of item rules to apply to specific paths",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/settings.ConditionalIndexConfig"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"settings.ConditionalIndexConfig": {
|
|
"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"
|
|
},
|
|
"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 to false for all types unless explicitly enabled.",
|
|
"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"
|
|
},
|
|
"loginIcon": {
|
|
"description": "path to an image file for the login page icon",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "display name",
|
|
"type": "string"
|
|
},
|
|
"styling": {
|
|
"$ref": "#/definitions/settings.StylingConfig"
|
|
}
|
|
}
|
|
},
|
|
"settings.Integrations": {
|
|
"type": "object",
|
|
"properties": {
|
|
"media": {
|
|
"$ref": "#/definitions/settings.Media"
|
|
},
|
|
"office": {
|
|
"$ref": "#/definitions/settings.OnlyOffice"
|
|
}
|
|
}
|
|
},
|
|
"settings.LogConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiLevels": {
|
|
"description": "separated list of log levels to enable for the API. (eg. \"info|warning|error\")",
|
|
"type": "string"
|
|
},
|
|
"json": {
|
|
"description": "output in json format",
|
|
"type": "boolean"
|
|
},
|
|
"levels": {
|
|
"description": "separated list of log levels to enable. (eg. \"info|warning|error|debug\")",
|
|
"type": "string"
|
|
},
|
|
"noColors": {
|
|
"description": "disable colors in the output",
|
|
"type": "boolean"
|
|
},
|
|
"output": {
|
|
"description": "output location. (eg. \"stdout\" or \"path/to/file.log\")",
|
|
"type": "string"
|
|
},
|
|
"utc": {
|
|
"description": "use UTC time in the output instead of local time",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"settings.LoginMethods": {
|
|
"type": "object",
|
|
"properties": {
|
|
"noauth": {
|
|
"description": "if set to true, overrides all other auth methods and disables authentication",
|
|
"type": "boolean"
|
|
},
|
|
"oidc": {
|
|
"$ref": "#/definitions/settings.OidcConfig"
|
|
},
|
|
"password": {
|
|
"$ref": "#/definitions/settings.PasswordAuthConfig"
|
|
},
|
|
"proxy": {
|
|
"$ref": "#/definitions/settings.ProxyAuthConfig"
|
|
}
|
|
}
|
|
},
|
|
"settings.Media": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"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": "create user if not exists",
|
|
"type": "boolean"
|
|
},
|
|
"disableVerifyTLS": {
|
|
"description": "disable TLS verification for the OIDC provider. This is insecure and should only be used for testing.",
|
|
"type": "boolean"
|
|
},
|
|
"enabled": {
|
|
"description": "whether to enable OIDC authentication",
|
|
"type": "boolean"
|
|
},
|
|
"groupsClaim": {
|
|
"description": "the JSON field name to read groups from. Default is \"groups\"",
|
|
"type": "string"
|
|
},
|
|
"issuerUrl": {
|
|
"description": "authorization URL of the OIDC provider",
|
|
"type": "string"
|
|
},
|
|
"logoutRedirectUrl": {
|
|
"description": "if provider logout url is provided, filebrowser will also redirect to logout url. Custom logout query params are respected.",
|
|
"type": "string"
|
|
},
|
|
"scopes": {
|
|
"description": "scopes to request from the OIDC provider",
|
|
"type": "string"
|
|
},
|
|
"userIdentifier": {
|
|
"description": "the field value to use as the username. Default is \"preferred_username\", can also be \"email\" or \"username\", or \"phone\"",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"settings.OnlyOffice": {
|
|
"type": "object",
|
|
"required": [
|
|
"secret",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"internalUrl": {
|
|
"description": "An optional internal address that the filebrowser server can use to communicate with the OnlyOffice Document Server, could be useful to bypass proxy.",
|
|
"type": "string"
|
|
},
|
|
"secret": {
|
|
"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": {
|
|
"createUser": {
|
|
"description": "create user if not exists",
|
|
"type": "boolean"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"header": {
|
|
"description": "required header to use for authentication. Security Warning: FileBrowser blindly accepts the header value as username.",
|
|
"type": "string"
|
|
},
|
|
"logoutRedirectUrl": {
|
|
"description": "if provider logout url is provided, filebrowser will also redirect to logout url. Custom logout query params are respected.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"settings.Recaptcha": {
|
|
"type": "object",
|
|
"required": [
|
|
"host",
|
|
"key",
|
|
"secret"
|
|
],
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"settings.Server": {
|
|
"type": "object",
|
|
"required": [
|
|
"sources"
|
|
],
|
|
"properties": {
|
|
"baseURL": {
|
|
"description": "base URL for the server, the subpath that the server is running on.",
|
|
"type": "string"
|
|
},
|
|
"cacheDir": {
|
|
"description": "path to the cache directory, used for thumbnails and other cached files",
|
|
"type": "string"
|
|
},
|
|
"database": {
|
|
"description": "path to the database file",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
},
|
|
"externalUrl": {
|
|
"description": "used by share links if set (eg. http://mydomain.com)",
|
|
"type": "string"
|
|
},
|
|
"filesystem": {
|
|
"description": "filesystem settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/settings.Filesystem"
|
|
}
|
|
]
|
|
},
|
|
"internalUrl": {
|
|
"description": "used by integrations if set, this is the base domain that an integration service will use to communicate with filebrowser (eg. http://localhost:8080)",
|
|
"type": "string"
|
|
},
|
|
"logging": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/settings.LogConfig"
|
|
}
|
|
},
|
|
"maxArchiveSize": {
|
|
"description": "max pre-archive combined size of files/folder that are allowed to be archived (in GB)",
|
|
"type": "integer"
|
|
},
|
|
"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": "conditional rules to apply when indexing to include/exclude certain items",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/settings.ConditionalFilter"
|
|
}
|
|
]
|
|
},
|
|
"createUserDir": {
|
|
"description": "create a user directory for each user",
|
|
"type": "boolean"
|
|
},
|
|
"defaultEnabled": {
|
|
"description": "should be added as a default source for new users?",
|
|
"type": "boolean"
|
|
},
|
|
"defaultUserScope": {
|
|
"description": "default \"/\" should match folders under path",
|
|
"type": "string"
|
|
},
|
|
"denyByDefault": {
|
|
"description": "deny access unless an \"allow\" access rule was specifically created.",
|
|
"type": "boolean"
|
|
},
|
|
"disableIndexing": {
|
|
"description": "disable the indexing of this source",
|
|
"type": "boolean"
|
|
},
|
|
"disabled": {
|
|
"description": "disable the source, this is useful so you don't need to remove it from the config file",
|
|
"type": "boolean"
|
|
},
|
|
"indexingIntervalMinutes": {
|
|
"description": "optional manual overide interval in minutes to re-index the source",
|
|
"type": "integer"
|
|
},
|
|
"private": {
|
|
"description": "designate as source as private -- currently just means no sharing permitted.",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"settings.StylingConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"customCSS": {
|
|
"description": "if a valid path to a css file is provided, it will be applied for all users. (eg. \"reduce-rounded-corners.css\")",
|
|
"type": "string"
|
|
},
|
|
"customThemes": {
|
|
"description": "A list of custom css files that each user can select to override the default styling. if \"default\" is key name then it will be the default option.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/settings.CustomTheme"
|
|
}
|
|
},
|
|
"darkBackground": {
|
|
"description": "Specify a valid CSS color property value to use as the background color in dark mode",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
},
|
|
"defaultLandingPage": {
|
|
"description": "default landing page to use if no redirect is specified: eg. /files/mysource/mysubpath, /settings, etc.",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
},
|
|
"hideSidebarFileActions": {
|
|
"description": "hide the file actions in the sidebar",
|
|
"type": "boolean"
|
|
},
|
|
"locale": {
|
|
"description": "language to use: eg. de, en, or fr",
|
|
"type": "string"
|
|
},
|
|
"lockPassword": {
|
|
"description": "disable the user from changing their password",
|
|
"type": "boolean"
|
|
},
|
|
"loginMethod": {
|
|
"description": "login method to use: eg. password, proxy, oidc",
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/users.Permissions"
|
|
},
|
|
"preview": {
|
|
"$ref": "#/definitions/users.Preview"
|
|
},
|
|
"quickDownload": {
|
|
"description": "show icon to download in one click",
|
|
"type": "boolean"
|
|
},
|
|
"showHidden": {
|
|
"description": "show hidden files in the UI. On windows this includes files starting with a dot and windows hidden files",
|
|
"type": "boolean"
|
|
},
|
|
"showSelectMultiple": {
|
|
"description": "show select multiple files on desktop",
|
|
"type": "boolean"
|
|
},
|
|
"singleClick": {
|
|
"description": "open directory on single click, also enables middle click to open in new tab",
|
|
"type": "boolean"
|
|
},
|
|
"stickySidebar": {
|
|
"description": "keep sidebar open when navigating",
|
|
"type": "boolean"
|
|
},
|
|
"themeColor": {
|
|
"description": "theme color to use: eg. #ff0000, or var(--red), var(--purple), etc",
|
|
"type": "string"
|
|
},
|
|
"viewMode": {
|
|
"description": "view mode to use: eg. normal, list, grid, or compact",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"share.CreateBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"disableAnonymous": {
|
|
"type": "boolean"
|
|
},
|
|
"disableDownload": {
|
|
"description": "don't allow downloading files",
|
|
"type": "boolean"
|
|
},
|
|
"disableFileViewer": {
|
|
"description": "don't allow viewing files",
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"source": {
|
|
"description": "backend source is path to maintain between name changes",
|
|
"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"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"disableAnonymous": {
|
|
"type": "boolean"
|
|
},
|
|
"disableDownload": {
|
|
"description": "don't allow downloading files",
|
|
"type": "boolean"
|
|
},
|
|
"disableFileViewer": {
|
|
"description": "don't allow viewing files",
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"source": {
|
|
"description": "backend source is path to maintain between name changes",
|
|
"type": "string"
|
|
},
|
|
"themeColor": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"description": "Token is a random value that will only be set when PasswordHash is set. It is\nURL-Safe and is used to download links in password-protected shares via a\nquery arg.",
|
|
"type": "string"
|
|
},
|
|
"userID": {
|
|
"type": "integer"
|
|
},
|
|
"viewMode": {
|
|
"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"
|
|
},
|
|
"createdAt": {
|
|
"type": "integer"
|
|
},
|
|
"expiresAt": {
|
|
"type": "integer"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"users.FileLoading": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clearAll": {
|
|
"type": "boolean"
|
|
},
|
|
"maxConcurrentUpload": {
|
|
"type": "integer"
|
|
},
|
|
"uploadChunkSizeMb": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"users.LoginMethod": {
|
|
"type": "string",
|
|
"enum": [
|
|
"password",
|
|
"proxy",
|
|
"oidc"
|
|
],
|
|
"x-enum-varnames": [
|
|
"LoginMethodPassword",
|
|
"LoginMethodProxy",
|
|
"LoginMethodOidc"
|
|
]
|
|
},
|
|
"users.Permissions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"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": {
|
|
"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"
|
|
},
|
|
"highQuality": {
|
|
"description": "generate high quality thumbnail preview images",
|
|
"type": "boolean"
|
|
},
|
|
"image": {
|
|
"description": "show thumbnail preview image for image 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\", \"tool\", or \"custom\"",
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"description": "Material icon name",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Display name of the link",
|
|
"type": "string"
|
|
},
|
|
"target": {
|
|
"description": "Target path/URL for the link",
|
|
"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": {
|
|
"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"
|
|
},
|
|
"defaultLandingPage": {
|
|
"description": "default landing page to use: eg. /files/mysource/mysubpath, /settings, etc.",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"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: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|