{"slug": "filebrowser-http-api-ai-skill-complete-reference-for-jwt-auth-file-crud-and", "title": "Filebrowser HTTP API & AI Skill: Complete reference for JWT auth, file CRUD, and folder management.", "summary": "This article provides a technical reference for using Filebrowser's HTTP API with JWT authentication to enable AI models to perform file and folder management operations. It details endpoints for login, listing, renaming, creating, deleting, reading, and writing files and folders, with specific encoding rules for paths and query parameters. The guide also includes instructions for handling authentication tokens, parsing JSON responses, and formatting directory listings as Markdown tables.", "body_md": "This skill provides a standardized way for any AI model to manage files and folders on a Filebrowser server by making direct HTTP calls. Filebrowser uses a \"hidden\" API with JWT authentication.\n- Official Repository: filebrowser/filebrowser\n- Host: The Filebrowser URL (e.g.,\nhttps://filebrowser.example.com\n) - Username: Default is\n\"\"\n(empty string) - Password: Default is\n\"\"\n(empty string)\nAll operations (except login) require the X-Auth: [JWT_TOKEN]\nheader. Tokens expire in 2 hours.\ncurl -X POST \"https://[HOST]/api/login\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\"username\":\"[USERNAME]\",\"password\":\"[PASSWORD]\",\"recaptcha\":\"\"}'\nOutput: Returns the raw JWT token string directly in the response body.\nEndpoint: GET /api/resources/[PATH]\nExample: curl -X GET \"https://[HOST]/api/resources/disk1\" -H \"X-Auth: [JWT_TOKEN]\"\nPresentation: Parse the JSON items\narray and display as a clean table (Name, Size, Type, Modified).\nEndpoint: PATCH /api/resources/[SOURCE_ENCODED]?action=rename&destination=[DEST_ENCODED]&override=false&rename=false\n- Source ([SOURCE_ENCODED]): Path relative to root. Special characters MUST be percent-encoded, but slashes (\n/\n) MUST NOT be encoded. - Destination ([DEST_ENCODED]): MUST be fully percent-encoded (including slashes).\nExample: Move disk2/downloads/test 1/\nto disk2/test 1/\ncurl -X PATCH \"https://[HOST]/api/resources/disk2/downloads/test%201/?action=rename&destination=%2Fdisk2%2Ftest%25201&override=false&rename=false\" -H \"X-Auth: [JWT_TOKEN]\"\nEndpoint: POST /api/resources/[PATH]/[NAME]/?override=false\nRule: The path MUST end with a trailing slash (/\n).\nExample: curl -X POST \"https://[HOST]/api/resources/disk2/newfolder/?override=false\" -H \"X-Auth: [JWT_TOKEN]\"\nEndpoint: POST /api/resources/[PATH]/[NAME]?override=false\nRule: The path MUST NOT end with a trailing slash.\nExample: curl -X POST \"https://[HOST]/api/resources/disk2/newfile.txt?override=false\" -H \"X-Auth: [JWT_TOKEN]\"\nEndpoint: DELETE /api/resources/[PATH]\nExample: curl -X DELETE \"https://[HOST]/api/resources/disk2/oldfile.txt\" -H \"X-Auth: [JWT_TOKEN]\"\nEndpoint: GET /api/resources/[PATH]\nOutput: Returns JSON. The file content is in the content\nfield.\nExample: curl -X GET \"https://[HOST]/api/resources/disk2/notes.txt\" -H \"X-Auth: [JWT_TOKEN]\"\nEndpoint: PUT /api/resources/[PATH]\nExample:\ncurl -X PUT \"https://[HOST]/api/resources/disk2/notes.txt\" \\\n-H \"X-Auth: [JWT_TOKEN]\" \\\n-H \"Content-Type: text/plain\" \\\n--data \"New file content goes here\"\nMandatory for destination\nparameters and paths with special characters.\n- JSON Handling: Always parse API responses. If an error occurs, report the HTTP status code and any error message in the JSON body.\n- Path Safety: Before\n?\nin URLs, do not encode slashes. Inside query parameters likedestination\n, always encode slashes as%2F\n. - Implicit Auth: If a token is available from a previous turn, reuse it. If a request fails with 401 or 403, attempt to re-login.\n- Interactive Formatting: Present directory listings as Markdown tables for readability.", "url": "https://wpnews.pro/news/filebrowser-http-api-ai-skill-complete-reference-for-jwt-auth-file-crud-and", "canonical_source": "https://gist.github.com/veerendra2/cfb066c982e7ce6530511bb5c4943e0d", "published_at": "2026-05-23 17:59:58+00:00", "updated_at": "2026-05-23 18:06:54.738437+00:00", "lang": "en", "topics": ["developer-tools", "open-source", "data"], "entities": ["Filebrowser"], "alternates": {"html": "https://wpnews.pro/news/filebrowser-http-api-ai-skill-complete-reference-for-jwt-auth-file-crud-and", "markdown": "https://wpnews.pro/news/filebrowser-http-api-ai-skill-complete-reference-for-jwt-auth-file-crud-and.md", "text": "https://wpnews.pro/news/filebrowser-http-api-ai-skill-complete-reference-for-jwt-auth-file-crud-and.txt", "jsonld": "https://wpnews.pro/news/filebrowser-http-api-ai-skill-complete-reference-for-jwt-auth-file-crud-and.jsonld"}}