---
title: Seafile API Integration on Truto
slug: seafile
category: Cloud Storage
canonical: "https://truto.one/integrations/detail/seafile/"
---

# Seafile API Integration on Truto



**Category:** Cloud Storage  
**Status:** Generally available

## MCP-ready AI tools

Truto exposes 30 tools for Seafile that AI agents can call directly.

- **create_a_seafile_auth_token** — Create a Seafile account token by authenticating with your username and password. Returns: token, openapi, info, tags, servers, components, paths, x-readme, _id. Required: username, password. Two-factor authentication requires the X-SEAFILE-OTP header.
- **list_all_seafile_repo_api_tokens** — List all repo API tokens for a Seafile library. Returns: repo_id, app_name, generated_by, permission, api_token. Required: repo_id.
- **create_a_seafile_repo_api_token** — Generate a new repo API token for a Seafile library. Returns: repo_id, app_name, generated_by, permission, api_token, openapi, info, servers, x-readme, components, paths, _id. Required: repo_id, app_name.
- **seafile_repo_api_tokens_bulk_update** — Update a repo API token's permission in a Seafile library. Returns: repo_id, app_name, generated_by, permission, api_token, openapi, info, servers, x-readme, components, paths, _id. Required: repo_id, app_name, permission.
- **seafile_repo_api_tokens_bulk_delete** — Delete a repo API token from a Seafile library. Returns: success, openapi, info, servers, x-readme, components, paths, _id. Required: repo_id, app_name.
- **list_all_seafile_repo_info** — Get information about the current Seafile repository accessible via Repo-Token. Returns: repo_id, repo_name, openapi, info, servers, x-readme, components, paths, _id.
- **list_all_seafile_files** — Get detailed information about a Seafile file by path. Returns: type, repo_id, parent_dir, obj_name, obj_id, size, mtime, can_preview, can_edit, openapi, info, servers, x-readme, components, paths, _id. Required: path.
- **create_a_seafile_file** — Create, rename, move, copy, or revert a Seafile file by path. Returns the file object (type, repo_id, obj_name, obj_id, size, mtime) or a revert success flag. Required: path, operation. Additional fields depend on operation: dst_dir, commit_id, or newname.
- **seafile_files_bulk_update** — Lock or unlock a Seafile file by path. Returns: type, repo_id, parent_dir, obj_name, obj_id, size, mtime, can_preview, can_edit, openapi, info, servers, x-readme, components, paths, _id. Required: path, operation.
- **seafile_files_bulk_delete** — Delete a Seafile file by path. Returns: success, commit_id, openapi, info, servers, x-readme, components, paths, _id. Required: path.
- **list_all_seafile_download_links** — Get a temporary download link for a Seafile file. Returns a string containing the download link. Required: path.
- **list_all_seafile_upload_links** — Get the upload link of a Seafile directory. Returns the upload link URL. Required: path.
- **create_a_seafile_share_link** — Create a share link for a library or folder in Seafile. Returns the share link object including token, link, repo_id, and path. Required: path.
- **list_all_seafile_metadata_records** — List metadata records in a Seafile library for a given metadata view. Returns: _creator, _ctime, _file_creator, _file_ctime, _file_details, _file_modifier, _file_mtime, _file_type, _id, _is_dir, _last_modifier, _location, _mtime, _name, _obj_id, _parent_dir, _size, _suffix. Required: view_id.
- **seafile_metadata_records_bulk_update** — Update existing metadata records in a Seafile library. Returns: success, openapi, info, servers, x-readme, components, paths, _id. Required: records_data.
- **list_all_seafile_metadata_views** — List all Seafile metadata views for the current database. Returns: _id, table_id, name, filters, sorts, groupbys, filter_conjunction, hidden_columns, type, basic_filters. No additional parameters required.
- **create_a_seafile_metadata_view** — Create a new Seafile metadata view in the current database when metadata is enabled. Returns the created view object containing _id, name, table_id, type, filters, sorts, groupbys, filter_conjunction, and hidden_columns. Required: name.
- **seafile_metadata_views_bulk_update** — Rename or update filters of an existing Seafile metadata view. Returns a success flag. Required: view_id, view_data.
- **list_all_seafile_directories** — List files and folders in a Seafile directory. Returns: type, id, name, mtime, permission, parent_dir, starred. Required: path.
- **create_a_seafile_directory** — Create, rename, or revert a Seafile directory. Returns the folder object including type, repo_id, parent_dir, obj_name, obj_id, and mtime. Required: path.
- **seafile_directories_bulk_delete** — Delete a Seafile directory. Returns: success, commit_id, openapi, info, servers, x-readme, components, paths, _id. Required: path.
- **list_all_seafile_search_files** — Search files in Seafile by keyword. Returns search result records from the results array, each containing an id and result-specific attributes. Required: q.
- **list_all_seafile_search_repo_files** — Search files in a Seafile library by keyword. Returns matching file results including file id, name, and path. Required: repo_id, q.
- **list_all_seafile_libraries** — List Seafile libraries. Returns each library with id and library-specific attributes.
- **list_all_seafile_account_share_links** — List Seafile account share links for the authenticated account. Returns each share link's repo_id, repo_name, path, token, link, ctime, expire_date, is_expired, permissions, and view_cnt.
- **list_all_seafile_account_upload_links** — Get a Seafile upload link for a directory. Returns the upload link URL as a string. Required: path.
- **list_all_seafile_starred_items** — List starred items in Seafile. Returns the list of starred files and directories with their type, id, name, modification time, and parent directory. No caller-supplied parameters are documented.
- **list_all_seafile_activities** — List Seafile activity events. Returns each event with its id and an attributes object containing event-specific details. Optional: avatar_size.
- **list_all_seafile_library_trash** — List trashed items in a Seafile library. Returns trashed files and folders with details such as path, name, deleted time, and commit id. Required: repo_id.
- **list_all_seafile_file_history** — List the version history of a file in a Seafile repository. Returns a list of commits with commit_id, ctime, creator_name, and email. Required: repo_id, path.

## How it works

1. **Link your customer's Seafile account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Seafile.** The Proxy API is a 1-to-1 mapping of the Seafile API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Offer self-hosted storage as a native destination** — Let your customers in regulated industries (legal, healthcare, research) connect their on-prem or private-cloud Seafile deployments to your SaaS, without you having to host or proxy their sensitive files.
- **Automate document archiving into customer-controlled libraries** — Push generated invoices, contracts, payroll files, or reports directly into a customer's Seafile library using scoped repo tokens, keeping data inside their compliance boundary while your product handles generation.
- **Power contract and document workflows with file locking** — For e-signature, review, or external editing products, lock files in Seafile while they're checked out in your app and write back the finalized version, preventing desktop clients from creating conflicting edits.
- **Enable client portals and deal rooms backed by Seafile** — Use Seafile as the storage layer behind your white-labeled portal, generating upload and share links on demand so files move directly between end users and their library instead of through your servers.
- **Feed compliance and e-discovery pipelines** — Pull activity logs, file history, and search results from Seafile to build audit trails, then write ML-derived classifications back as structured metadata records for downstream retrieval.

## What you can build

- **Native library and folder picker** — Let users browse their Seafile libraries and directories from inside your app using list_all_seafile_libraries and list_all_seafile_directories to select a working location.
- **Scoped repo-token provisioning** — Programmatically issue per-library API tokens with create_a_seafile_repo_api_token so your integration only touches the specific project folder a user authorizes.
- **Direct-to-Seafile upload and download** — Generate temporary upload and download links (list_all_seafile_upload_links, list_all_seafile_download_links) so large files transfer directly between the user and their Seafile server, bypassing your backend.
- **File lock and unlock for external editing** — Use seafile_files_bulk_update to lock files while they're being signed, reviewed, or edited in your product, and release the lock when the workflow completes.
- **Share link generation for collaboration** — Create expiring share links via create_a_seafile_share_link to attach Seafile documents to records in CRMs, deal rooms, or matter management tools without duplicating content.
- **Metadata-driven document status tracking** — Write and update structured metadata records (seafile_metadata_records_bulk_update) and views to tag files with statuses like 'Pending Approval' or 'Signed' that both your app and Seafile users can query.

## FAQs

### How does authentication work for Seafile through Truto?

Seafile uses token-based auth. Truto handles obtaining an account-level auth token (create_a_seafile_auth_token) from the user's Seafile instance and can additionally issue per-library repo tokens (create_a_seafile_repo_api_token) so your integration operates with the narrowest possible scope.

### Can we integrate with self-hosted Seafile deployments, not just Seafile Cloud?

Yes. Seafile is predominantly self-hosted, and integrations built through Truto can target any Seafile server URL the end user provides, which is essential for universities, government tenants, and MSP-hosted clusters.

### How should we handle very large file transfers?

Don't proxy them through your backend. Use list_all_seafile_upload_links and list_all_seafile_download_links to obtain direct transfer URLs, letting clients move data straight to and from the Seafile server. This is critical for genomics, engineering, and media workloads.

### Can we prevent conflicting edits while a file is checked out in our app?

Yes. seafile_files_bulk_update supports lock and unlock operations, so your product can hold an exclusive lock during signature routing, external editing, or review, and Seafile desktop clients will respect it.

### What audit data is available for compliance use cases?

You can pull per-file history via list_all_seafile_file_history and library-wide events via list_all_seafile_activities to reconstruct who changed, viewed, or reverted content, and pair that with list_all_seafile_library_trash for deletion tracking.

### Does Seafile support structured metadata we can read and write?

Yes. Seafile exposes metadata records and views tied to files. Through Truto you can list and update records (list_all_seafile_metadata_records, seafile_metadata_records_bulk_update) and manage views (list_all_seafile_metadata_views, create_a_seafile_metadata_view, seafile_metadata_views_bulk_update) to drive status-based workflows.
