### GET /api/system/info Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/System.html Retrieves detailed installation information about the LogicalDOC system. ```APIDOC ## GET /api/system/info ### Description Retrieves the installation information of the system. ### Method GET ### Endpoint /api/system/info ### Response #### Success Response (200) - **info** (WSSystemInfo) - Description of the system information object. - **serialVersionUID** (Long) - Required - The serial version UID. - **productName** (String) - Required - The name of the product. - **product** (String) - Required - The product identifier. - **release** (String) - Required - The product release version. - **year** (String) - Required - The release year. - **help** (String) - Required - URL for help documentation. - **bugs** (String) - Required - URL for bug reporting. - **url** (String) - Required - The product's official URL. - **forum** (String) - Required - URL for the product forum. - **vendor** (String) - Required - The vendor name. - **vendorAddress** (String) - Required - The vendor's address. - **vendorCap** (String) - Required - Vendor capabilities. - **vendorCountry** (String) - Required - The vendor's country. - **vendorCity** (String) - Required - The vendor's city. - **support** (String) - Required - Support contact information. - **installationId** (String) - Required - The unique installation ID. - **licensee** (String) - Required - The licensee name. - **runLevel** (String) - Required - The current run level of the system. - **features** (String) - Multiple - A list of features available. - **date** (String) - Required - The installation date. - **hostName** (String) - Required - The hostname of the server. #### Response Example ```json { "info": { "serialVersionUID": 1234567890123456789, "productName": "LogicalDOC", "product": "LD", "release": "7.5.2", "year": "2023", "help": "https://www.logicaldoc.com/documentation", "bugs": "https://www.logicaldoc.com/support/bugs", "url": "https://www.logicaldoc.com", "forum": "https://forum.logicaldoc.com", "vendor": "LogicalDOC", "vendorAddress": "123 Main St, Tech City", "vendorCap": "Enterprise Solutions", "vendorCountry": "USA", "vendorCity": "Tech City", "support": "support@logicaldoc.com", "installationId": "LD-INSTALL-XYZ123", "licensee": "Acme Corp", "runLevel": "Production", "features": [ "Document Management", "Workflow", "Collaboration" ], "date": "2023-01-15", "hostName": "server.logicaldoc.local" } } ``` ``` -------------------------------- ### Get System Information using Java SOAP Client Source: https://context7.com/logicaldoc/community/llms.txt Retrieve product details, release version, installation ID, server date, features, statistics, and enabled languages from the LogicalDOC system. ```java // Java SOAP Client - System Information import com.logicaldoc.webservice.soap.client.SoapSystemClient; import com.logicaldoc.webservice.model.WSSystemInfo; import com.logicaldoc.webservice.model.WSParameter; import java.util.List; SoapSystemClient systemClient = new SoapSystemClient("http://localhost:8080/services/System"); // Get system info WSSystemInfo info = systemClient.getInfo(); System.out.println("Product: " + info.getProductName()); System.out.println("Release: " + info.getRelease()); System.out.println("Installation ID: " + info.getInstallationId()); System.out.println("Server date: " + info.getDate()); for (String feature : info.getFeatures()) { System.out.println("Feature: " + feature); } // Get statistics List stats = systemClient.getStatistics(sid); for (WSParameter stat : stats) { System.out.println(stat.getName() + ": " + stat.getValue()); } // Get enabled languages List languages = systemClient.getLanguages(sid); for (String lang : languages) { System.out.println("Language: " + lang); } ``` -------------------------------- ### Start LogicalDOC Stack with Docker Compose Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Start the LogicalDOC stack services that have been previously stopped using Docker Compose. ```bash $ docker-compose -f docker-compose.yml start ``` -------------------------------- ### Start LogicalDOC Container Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Use this command to start a previously stopped LogicalDOC Docker container. Assumes the container is aliased as 'logicaldoc'. ```bash $ docker start logicaldoc ``` -------------------------------- ### Install Maven Project Dependencies Source: https://github.com/logicaldoc/community/blob/master/Build_this_Sources.md Execute this command within the build/poms directory to install project dependencies. ```bash mvn install ``` -------------------------------- ### Run LogicalDOC container Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Starts the LogicalDOC application container linked to a previously created database container. ```Shell docker run -d -p 8080:8080 -p 8022:22 -e LDOC_USERNO= --link logicaldoc-db logicaldoc/logicaldoc ``` -------------------------------- ### Run LogicalDOC with persistent volumes Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Starts the container with host-mapped volumes to ensure configuration and repository data persist across restarts. ```console $ docker run -d --name logicaldoc --restart=always -p 8080:8080 -v /path/conf:/LogicalDOC/conf -v /path/repository:/LogicalDOC/repository --link logicaldoc-db logicaldoc/logicaldoc ``` -------------------------------- ### getUser Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Security.html Gets an existing user. ```APIDOC ## getUser ### Description Gets an existing user. ### Parameters #### Request Body - **sid** (String) - Required - **userId** (Long) - Required ### Response #### Success Response (200) - **user** (WSUser) - User object ``` -------------------------------- ### Run LogicalDOC with custom memory settings Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Starts the LogicalDOC container with a specific memory allocation defined by the LDOC_MEMORY environment variable. ```Shell docker run -d -p 8080:8080 -p 8022:22 -e LDOC_USERNO= -e LDOC_MEMORY=4000 --link logicaldoc-db logicaldoc/logicaldoc ``` -------------------------------- ### Get Default Workspace API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Gets the default workspace. ```APIDOC ## GET /workspace/getDefaultWorkspace ### Description Gets the default workspace. ### Method GET ### Endpoint /workspace/getDefaultWorkspace ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. ### Request Example ``` GET /workspace/getDefaultWorkspace?sid=your_session_id ``` ### Response #### Success Response (200) - **workspace** (WSWorkspace) - The default workspace object. #### Response Example ```json { "workspace": { "serialVersionUID": 1, "name": "Default Workspace", "description": "", "default": true } } ``` ``` -------------------------------- ### POST /login Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Auth.html Starts a new session and returns a session identifier (SID). ```APIDOC ## POST /login ### Description Starts a new session and returns the session identifier (SID). ### Method POST ### Parameters #### Request Body - **username** (String) - Required - The username for authentication - **password** (String) - Required - The password for authentication ### Response #### Success Response (200) - **sid** (String) - The session identifier ``` -------------------------------- ### listUsers Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Security.html Gets all existing users. ```APIDOC ## listUsers ### Description Gets all existing users. ### Parameters #### Request Body - **sid** (String) - Required ### Response #### Success Response (200) - **user** (WSUser) - List of users ``` -------------------------------- ### Get Root Folder API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Retrieves the root folder of the system. ```APIDOC ## GET /folder/getRootFolder ### Description Gets the root folder. ### Method GET ### Endpoint /folder/getRootFolder ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. ### Request Example ``` GET /folder/getRootFolder?sid=your_session_id ``` ### Response #### Success Response (200) - **folder** (WSFolder) - The root folder object. #### Response Example ```json { "folder": { "serialVersionUID": 1, "log": null, "name": "Root", "description": "", "position": 0 } } ``` ``` -------------------------------- ### Folder Management (Java SOAP Client) Source: https://context7.com/logicaldoc/community/llms.txt Manage folders using the Java SOAP client. Includes creating, listing children, getting path, finding by path, moving, and renaming folders. Requires a valid session ID (sid). ```java // Java SOAP Client - Folder Management import com.logicaldoc.webservice.soap.client.SoapFolderClient; import com.logicaldoc.webservice.model.WSFolder; import java.util.List; SoapFolderClient folderClient = new SoapFolderClient( "http://localhost:8080/services/soap/Folder", 1, false, 50 ); // Create new folder WSFolder newFolder = new WSFolder(); newFolder.setName("Project Alpha"); newFolder.setDescription("Project Alpha documentation"); newFolder.setParentId(4L); WSFolder created = folderClient.create(sid, newFolder); System.out.println("Created folder ID: " + created.getId()); // List children List children = folderClient.listChildren(sid, 4L); for (WSFolder folder : children) { System.out.println(folder.getId() + ": " + folder.getName()); } // Get folder path (breadcrumb) List path = folderClient.getPath(sid, 100L); StringBuilder breadcrumb = new StringBuilder(); for (WSFolder f : path) { breadcrumb.append("/").append(f.getName()); } System.out.println("Path: " + breadcrumb); // Find folder by path WSFolder folder = folderClient.findByPath(sid, "/Default/Projects/2024"); System.out.println("Found: " + folder.getId()); // Move folder folderClient.move(sid, 100L, 200L); // Rename folder folderClient.rename(sid, 100L, "New Name"); ``` -------------------------------- ### GET /logicaldoc/community/getVersionContent Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Retrieves the content of a specific version of a document. Returns the raw content of the file. ```APIDOC ## GET /logicaldoc/community/getVersionContent ### Description Retrieves the content of a specific version of a document; returns the raw content of the file. ### Method GET ### Endpoint /logicaldoc/community/getVersionContent ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **docId** (Long) - Required - The ID of the document. - **version** (String) - Required - The version to retrieve, eg: '1.0', '2.3'. ### Response #### Success Response (200) - **DataHandler** (DataHandler) - The raw content of the document version. ``` -------------------------------- ### Folder Management API Source: https://context7.com/logicaldoc/community/llms.txt APIs for managing folders, including listing workspaces, creating, listing children, getting paths, finding by path, moving, and renaming folders. ```APIDOC ## GET /listWorkspaces ### Description Lists all available workspaces. ### Method GET ### Endpoint /services/rest/folder/listWorkspaces ### Request Example ```bash curl -u admin:admin -H "Accept: application/json" "http://localhost:8080/services/rest/folder/listWorkspaces" ``` ``` ```APIDOC ## Folder Management (SOAP) ### Description Provides SOAP client methods for various folder operations. ### Method SOAP Client (Java) ### Endpoint http://localhost:8080/services/Folder ### Operations - **create**: Creates a new folder. - **listChildren**: Lists subfolders of a given folder. - **getPath**: Retrieves the path (breadcrumb) to a folder. - **findByPath**: Finds a folder by its path. - **move**: Moves a folder to a different parent. - **rename**: Renames a folder. ### Request Example (Create Folder) ```java SoapFolderClient folderClient = new SoapFolderClient("http://localhost:8080/services/Folder", 1, false, 50); WSFolder newFolder = new WSFolder(); newFolder.setName("Project Alpha"); newFolder.setDescription("Project Alpha documentation"); newFolder.setParentId(4L); WSFolder created = folderClient.create(sid, newFolder); System.out.println("Created folder ID: " + created.getId()); ``` ### Request Example (List Children) ```java List children = folderClient.listChildren(sid, 4L); for (WSFolder folder : children) { System.out.println(folder.getId() + ": " + folder.getName()); } ``` ### Request Example (Get Path) ```java List path = folderClient.getPath(sid, 100L); StringBuilder breadcrumb = new StringBuilder(); for (WSFolder f : path) { breadcrumb.append("/").append(f.getName()); } System.out.println("Path: " + breadcrumb); ``` ### Request Example (Find By Path) ```java WSFolder folder = folderClient.findByPath(sid, "/Default/Projects/2024"); System.out.println("Found: " + folder.getId()); ``` ### Request Example (Move Folder) ```java folderClient.move(sid, 100L, 200L); ``` ### Request Example (Rename Folder) ```java folderClient.rename(sid, 100L, "New Name"); ``` ``` -------------------------------- ### Run MySQL container for LogicalDOC Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Initializes a MySQL container with the required authentication plugin and database credentials. ```Shell docker run -d --name=logicaldoc-db -e MYSQL_ROOT_PASSWORD=mypassword -e MYSQL_DATABASE=logicaldoc -e MYSQL_USER=ldoc -e MYSQL_PASSWORD=changeme mysql:8.0 --default-authentication-plugin=mysql_native_password ``` ```Shell docker run -d --name=logicaldoc-db -e MYSQL_ROOT_PASSWORD=mypassword -e MYSQL_DATABASE=logicaldoc -e MYSQL_USER=ldoc -e MYSQL_PASSWORD=changeme mysql:8.0.23 --default-authentication-plugin=mysql_native_password ``` ```Shell docker run -d --name=logicaldoc-db -e MYSQL_ROOT_PASSWORD=mypassword -e MYSQL_DATABASE=logicaldoc -e MYSQL_USER=ldoc -e MYSQL_PASSWORD=changeme mysql:latest --default-authentication-plugin=mysql_native_password ``` -------------------------------- ### Build LogicalDOC Community Web Application Source: https://github.com/logicaldoc/community/blob/master/Build_this_Sources.md Run this command in the community/logicaldoc/ directory to build the application while skipping tests. ```bash mvn -Dmaven.test.skip=true install ``` -------------------------------- ### GET /logicaldoc/community/getDocuments Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Gets metadata for a collection of existing documents using their identifiers. ```APIDOC ## GET /logicaldoc/community/getDocuments ### Description Gets document metadata of a collection of existing documents with the given identifiers; returns an array of WSDocument. ### Method GET ### Endpoint /logicaldoc/community/getDocuments ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **docIds** (Long) - Required - An array of document IDs. ### Response #### Success Response (200) - **documents** (WSDocument) - Required - An array of WSDocument objects for the specified document IDs. - **serialVersionUID** (Long) - Required - **log** (Logger) - Required - **DOC_UNLOCKED** (Int) - Required - **DOC_CHECKED_OUT** (Int) - Required - **DOC_LOCKED** (Int) - Required - **EXPORT_UNLOCKED** (Int) - Required - **EXPORT_LOCKED** (Int) - Required - **INDEX_TO_INDEX** (Int) - Required - **INDEX_INDEXED** (Int) - Required - **INDEX_SKIP** (Int) - Required - **fileSize** (Long) - Required - **title** (String) - Required - **exportVersion** (String) - Required - **type** (String) - Required - **fileName** (String) - Required ``` -------------------------------- ### Build LogicalDOC from Source Source: https://github.com/logicaldoc/community/blob/master/README.md Commands to clone the repository, navigate to the build directory, and compile the project using Maven. ```sh $ git clone [git-repo-url] logicaldoc-community $ cd logicaldoc-community $ cd build/poms $ mvn clean install $ cd ../../community/logicaldoc $ mvn clean package ``` -------------------------------- ### GET /logicaldoc/community/getDocumentByCustomId Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Gets document metadata of an existing document using its custom identifier. ```APIDOC ## GET /logicaldoc/community/getDocumentByCustomId ### Description Gets document metadata of an existing document with the given custom identifier. ### Method GET ### Endpoint /logicaldoc/community/getDocumentByCustomId ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **customId** (String) - Required - The custom identifier of the document. ### Response #### Success Response (200) - **document** (WSDocument) - Required - The WSDocument object for the specified custom ID. - **serialVersionUID** (Long) - Required - **log** (Logger) - Required - **DOC_UNLOCKED** (Int) - Required - **DOC_CHECKED_OUT** (Int) - Required - **DOC_LOCKED** (Int) - Required - **EXPORT_UNLOCKED** (Int) - Required - **EXPORT_LOCKED** (Int) - Required - **INDEX_TO_INDEX** (Int) - Required - **INDEX_INDEXED** (Int) - Required - **INDEX_SKIP** (Int) - Required - **fileSize** (Long) - Required - **title** (String) - Required - **exportVersion** (String) - Required - **type** (String) - Required - **fileName** (String) - Required ``` -------------------------------- ### Initialize Eclipse Project with Maven Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservicesamples/README.txt Generates the necessary Eclipse project files and downloads required dependencies. ```bash mvn eclipse:eclipse ``` -------------------------------- ### Run LogicalDOC with external database configuration Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Connects to an external database by specifying host, port, and credentials via environment variables. ```console $ docker run -d -p 8080:8080 -p 8022:22 -e DB_HOST=10.1.2.3 -e DB_PORT=3306 -e DB_USER=... -e DB_PASSWORD=... logicaldoc/logicaldoc ``` -------------------------------- ### POST /create Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Creates a new folder. ```APIDOC ## POST /create ### Description Creates a new folder; returns the newly created folder. ### Parameters #### Request Body - **sid** (String) - Required - Session ID - **folder** (WSFolder) - Required - Definition of the new folder ### Response #### Success Response (200) - **folder** (WSFolder) - The created folder object ``` -------------------------------- ### listGroups Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Security.html Gets all existing groups. ```APIDOC ## listGroups ### Description Gets all existing groups. ### Parameters #### Request Body - **sid** (String) - Required ### Response #### Success Response (200) - **group** (WSGroup) - List of groups ``` -------------------------------- ### GET /services/rest/document/getContent Source: https://context7.com/logicaldoc/community/llms.txt Downloads the binary content of a document. ```APIDOC ## GET /services/rest/document/getContent ### Description Downloads the binary content of a document. ### Method GET ### Endpoint /services/rest/document/getContent ### Parameters #### Query Parameters - **docId** (long) - Required - The unique identifier of the document. ``` -------------------------------- ### Manage Users and Groups via SOAP Source: https://context7.com/logicaldoc/community/llms.txt Demonstrates user and group lifecycle management using the Java SOAP client. ```java import com.logicaldoc.webservice.soap.client.SoapSecurityClient; import com.logicaldoc.webservice.model.WSUser; import com.logicaldoc.webservice.model.WSGroup; import java.util.List; SoapSecurityClient securityClient = new SoapSecurityClient("http://localhost:8080/services/Security"); // List all users List users = securityClient.listUsers(sid, null); for (WSUser user : users) { System.out.println(user.getUsername() + " - " + user.getEmail()); } // List users in a specific group List groupUsers = securityClient.listUsers(sid, "editors"); // Create new user WSUser newUser = new WSUser(); newUser.setUsername("jsmith"); newUser.setName("John Smith"); newUser.setFirstName("John"); newUser.setEmail("jsmith@company.com"); newUser.setGroupIds(List.of(2L, 3L)); // Assign to groups long userId = securityClient.storeUser(sid, newUser); System.out.println("Created user ID: " + userId); // Change user password int result = securityClient.changePassword(sid, userId, null, "newSecurePassword123"); // 0 = success, 1 = incorrect old password, 2 = notification failed // Get user by ID WSUser user = securityClient.getUser(sid, userId); // Get user by username WSUser user = securityClient.getUserByUsername(sid, "jsmith"); // Update user user.setCity("New York"); user.setPostalcode("10001"); securityClient.storeUser(sid, user); // Delete user securityClient.deleteUser(sid, userId); // List all groups List groups = securityClient.listGroups(sid); for (WSGroup group : groups) { System.out.println(group.getName() + " - " + group.getDescription()); } // Create new group WSGroup newGroup = new WSGroup(); newGroup.setName("reviewers"); newGroup.setDescription("Document reviewers team"); newGroup.setUserIds(List.of(4L, 6L, 8L)); long groupId = securityClient.storeGroup(sid, newGroup); System.out.println("Created group ID: " + groupId); // Get group WSGroup group = securityClient.getGroup(sid, groupId); // Delete group securityClient.deleteGroup(sid, groupId); ``` -------------------------------- ### Run LogicalDOC with full deployment persistence Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Persists the entire deployment by mounting an additional volume for the application data. ```console $ docker run -d --name logicaldoc --restart=always -p 8080:8080 -v /path/conf:/LogicalDOC/conf -v /path/repository:/LogicalDOC/repository -v /mount-LogicalDOC:/path --link logicaldoc-db logicaldoc/logicaldoc ``` -------------------------------- ### GET /logicaldoc/community/getAliases Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Retrieves the aliases of a given document. ```APIDOC ## GET /logicaldoc/community/getAliases ### Description Gets the aliases of the given document; returns an array of WSDocument that are aliases. ### Method GET ### Endpoint /logicaldoc/community/getAliases ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **docId** (Long) - Required - The ID of the document. ### Response #### Success Response (200) - **aliases** (WSDocument) - Required - An array of WSDocument objects representing the aliases. - **serialVersionUID** (Long) - Required - **log** (Logger) - Required - **DOC_UNLOCKED** (Int) - Required - **DOC_CHECKED_OUT** (Int) - Required - **DOC_LOCKED** (Int) - Required - **EXPORT_UNLOCKED** (Int) - Required - **EXPORT_LOCKED** (Int) - Required - **INDEX_TO_INDEX** (Int) - Required - **INDEX_INDEXED** (Int) - Required - **INDEX_SKIP** (Int) - Required - **fileSize** (Long) - Required - **title** (String) - Required - **exportVersion** (String) - Required - **type** (String) - Required - **fileName** (String) - Required ``` -------------------------------- ### GET /services/rest/document/getDocument Source: https://context7.com/logicaldoc/community/llms.txt Retrieves the metadata for a specific document by its ID. ```APIDOC ## GET /services/rest/document/getDocument ### Description Retrieves the metadata for a specific document by its ID. ### Method GET ### Endpoint /services/rest/document/getDocument ### Parameters #### Query Parameters - **docId** (long) - Required - The unique identifier of the document. ### Response #### Success Response (200) - **id** (long) - Document ID - **fileName** (string) - Name of the file - **fileSize** (long) - Size of the file in bytes - **version** (string) - Document version - **folderId** (long) - ID of the parent folder - **status** (int) - Document status - **language** (string) - Document language - **tags** (array) - List of tags - **creation** (string) - Creation timestamp - **date** (string) - Last modification timestamp #### Response Example { "id": 12345, "fileName": "report.pdf", "fileSize": 102400, "version": "1.2", "folderId": 4, "status": 0, "language": "en", "tags": ["important", "2024"], "creation": "2024-01-15 10:30:00", "date": "2024-01-15 14:22:00" } ``` -------------------------------- ### Get Folder API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Retrieves details of an existing folder. ```APIDOC ## GET /folder/getFolder ### Description Gets an existing folder. ### Method GET ### Endpoint /folder/getFolder ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **folderId** (Int) - Required - The ID of the folder to retrieve. ### Request Example ``` GET /folder/getFolder?sid=your_session_id&folderId=123 ``` ### Response #### Success Response (200) - **folder** (WSFolder) - The folder object. #### Response Example ```json { "folder": { "serialVersionUID": 1, "log": null, "name": "Example Folder", "description": "", "position": 0 } } ``` ``` -------------------------------- ### Retrieve System Information and Statistics via REST Source: https://context7.com/logicaldoc/community/llms.txt Fetches system metadata, statistics, and language settings. ```bash curl -H "Accept: application/json" \ "http://localhost:8080/services/rest/system/getInfo" ``` ```bash curl -u admin:admin \ -H "Accept: application/json" \ "http://localhost:8080/services/rest/system/getStatistics" ``` ```bash curl -u admin:admin \ -H "Accept: application/json" \ "http://localhost:8080/services/rest/system/getTenantStatistics?tenantId=1" ``` ```bash curl -H "Accept: application/json" \ "http://localhost:8080/services/rest/system/getLanguages" ``` -------------------------------- ### GET /getLinks Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Retrieves all links associated with a specific document. ```APIDOC ## GET /getLinks ### Description Retrieves all the links of a specific document. Returns an array of links. ### Method GET ### Endpoint /getLinks ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **docId** (Long) - Required - The ID of the document. ### Response #### Success Response (200) - **link** (WSLink) - Required - Multiple - An array of links associated with the document. - **serialVersionUID** (Long) - Required - Serial version UID for the WSLink object. #### Response Example ```json { "link": [ { "serialVersionUID": 1 } ] } ``` ``` -------------------------------- ### GET /api/system/statistics Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/System.html Retrieves a set of statistics about the LogicalDOC system. ```APIDOC ## GET /api/system/statistics ### Description Gets a set of statistics of the system. ### Method GET ### Endpoint /api/system/statistics ### Query Parameters - **sid** (String) - Required - A session identifier or token. ### Response #### Success Response (200) - **parameter** (WSParameter) - Multiple - A list of system parameters and their values. - **name** (String) - Required - The name of the parameter. - **value** (String) - Required - The value of the parameter. #### Response Example ```json { "parameter": [ { "name": "total_documents", "value": "15000" }, { "name": "active_users", "value": "250" }, { "name": "storage_used_gb", "value": "500" } ] } ``` ``` -------------------------------- ### Retrieve and Download Documents with Java SOAP Client Source: https://context7.com/logicaldoc/community/llms.txt Demonstrates using the SOAP client to fetch metadata, download files, and iterate through version history. ```java // Java SOAP Client - Document Retrieval import com.logicaldoc.webservice.soap.client.SoapDocumentClient; import jakarta.activation.DataHandler; import java.io.FileOutputStream; import java.util.List; SoapDocumentClient documentClient = new SoapDocumentClient("http://localhost:8080/services/Document"); // Get document metadata WSDocument doc = documentClient.getDocument(sid, 12345L); System.out.println("File name: " + doc.getFileName()); System.out.println("Version: " + doc.getVersion()); System.out.println("Size: " + doc.getFileSize() + " bytes"); // Download document content DataHandler data = documentClient.getContent(sid, 12345L); data.writeTo(new FileOutputStream("/path/to/save/document.pdf")); // Get specific version DataHandler versionData = documentClient.getVersionContent(sid, 12345L, "1.0"); // Get version history List versions = documentClient.getVersions(sid, 12345L); for (WSDocument version : versions) { System.out.println("Version: " + version.getVersion() + " - " + version.getDate()); } // List documents in folder List docs = documentClient.listDocuments(sid, 4L, null); for (WSDocument d : docs) { System.out.println(d.getId() + ": " + d.getFileName()); } ``` -------------------------------- ### Build LogicalDOC Docker Image with Apt Cacher Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Build the LogicalDOC Docker image while utilizing an apt-cacher to potentially speed up the build process. Replace the IP address with your Docker host's IP. ```bash $ docker build -t logicaldoc/logicaldoc --build-arg APT_PROXY=172.18.0.1:3142 . ``` -------------------------------- ### GET /services/rest/document/list Source: https://context7.com/logicaldoc/community/llms.txt Lists all documents contained within a specific folder. ```APIDOC ## GET /services/rest/document/list ### Description Lists all documents contained within a specific folder. ### Method GET ### Endpoint /services/rest/document/list ### Parameters #### Query Parameters - **folderId** (long) - Required - The ID of the folder to list. ``` -------------------------------- ### POST /create Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Creates a new document with metadata and content. ```APIDOC ## POST /create ### Description Creates a new document; the user can completely customize the document through a value object containing the document's metadata; returns the newly created document. ### Parameters #### Request Body - **sid** (String) - Required - Session ID - **document** (WSDocument) - Required - Document metadata - **content** (DataHandler) - Required - The raw content of the file ### Response #### Success Response (200) - **document** (WSDocument) - The newly created document object ``` -------------------------------- ### Build LogicalDOC Docker Image Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Build the LogicalDOC Docker image using the 'docker build' command. This command tags the image as 'logicaldoc/logicaldoc'. ```bash $ docker build -t logicaldoc/logicaldoc . ``` -------------------------------- ### GET getDocument Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Retrieves the metadata of an existing document with the given identifier. ```APIDOC ## GET getDocument ### Description Gets the metadata of an existing document with the given identifier; returns the document's representation. ### Parameters #### Request Body - **sid** (String) - Required - Session ID - **docId** (Long) - Required - Document ID ### Response #### Success Response (200) - **document** (WSDocument) - The document object containing metadata like title, fileName, fileSize, and status flags. ``` -------------------------------- ### GET /logicaldoc/community/getRecentDocuments Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Lists the last modified documents in the current session. ```APIDOC ## GET /logicaldoc/community/getRecentDocuments ### Description Lists of last modified documents in the current session. ### Method GET ### Endpoint /logicaldoc/community/getRecentDocuments ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **maxHits** (Integer) - Optional - Maximum number of returned records. ### Response #### Success Response (200) - **document** (WSDocument) - Required - An array of WSDocument objects representing the recent documents. - **serialVersionUID** (Long) - Required - **log** (Logger) - Required - **DOC_UNLOCKED** (Int) - Required - **DOC_CHECKED_OUT** (Int) - Required - **DOC_LOCKED** (Int) - Required - **EXPORT_UNLOCKED** (Int) - Required - **EXPORT_LOCKED** (Int) - Required - **INDEX_TO_INDEX** (Int) - Required - **INDEX_INDEXED** (Int) - Required - **INDEX_SKIP** (Int) - Required - **fileSize** (Long) - Required - **title** (String) - Required - **exportVersion** (String) - Required - **type** (String) - Required - **fileName** (String) - Required ``` -------------------------------- ### POST /getResource Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Gets the content of a resource associated to the given document. ```APIDOC ## POST /getResource ### Description Gets the content of a resource associated to the given document; returns the raw content of the file. ### Parameters #### Request Body - **sid** (String) - Required - Session ID - **docId** (Long) - Required - Document identifier - **fileVersion** (String) - Required - The file version to retrieve - **suffix** (String) - Required - Suffix specification ### Response #### Success Response (200) - **DataHandler** (DataHandler) - The raw content of the file ``` -------------------------------- ### Manage Bookmarks Source: https://context7.com/logicaldoc/community/llms.txt Endpoints for creating, listing, and removing bookmarks for documents and folders. ```bash curl -u admin:admin \ -H "Accept: application/json" \ "http://localhost:8080/services/rest/bookmark/bookmarkDocument?docId=12345" ``` ```bash curl -u admin:admin \ -H "Accept: application/json" \ "http://localhost:8080/services/rest/bookmark/bookmarkFolder?folderId=100" ``` ```bash curl -u admin:admin \ -H "Accept: application/json" \ "http://localhost:8080/services/rest/bookmark/getBookmarks" ``` ```bash curl -u admin:admin \ -X DELETE \ "http://localhost:8080/services/rest/bookmark/unbookmarkDocument?docId=12345" ``` ```bash curl -u admin:admin \ -X DELETE \ "http://localhost:8080/services/rest/bookmark/unbookmarkFolder?folderId=100" ``` ```bash curl -u admin:admin \ -X DELETE \ "http://localhost:8080/services/rest/bookmark/deleteBookmark?bookmarkId=1" ``` -------------------------------- ### POST /getDocument Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Gets the metadata of an existing document with the given identifier. ```APIDOC ## POST /getDocument ### Description Gets the metadata of an existing document with the given identifier; returns the document's representation. ### Method POST ### Endpoint /getDocument ### Parameters #### Request Body - **sid** (string) - Required - Session identifier - **docId** (long) - Required - Document identifier ### Response #### Success Response (200) - **document** (object) - The document metadata representation ``` -------------------------------- ### Folder Get Path API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Computes the path from the root to the target folder. ```APIDOC ## GET /folder/getPath ### Description Computes the path from the root to the target folder; returns the array of folders, the first is the root. ### Method GET ### Endpoint /folder/getPath ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **folderId** (Int) - Required - The ID of the target folder. ### Request Example ``` GET /folder/getPath?sid=your_session_id&folderId=123 ``` ### Response #### Success Response (200) - **folders** (Array) - An array of folder objects representing the path from the root. #### Response Example ```json { "folders": [ { "serialVersionUID": 1, "log": null, "name": "Root", "description": "", "position": 0 }, { "serialVersionUID": 1, "log": null, "name": "Parent Folder", "description": "", "position": 0 }, { "serialVersionUID": 1, "log": null, "name": "Target Folder", "description": "", "position": 0 } ] } ``` ``` -------------------------------- ### List Workspaces (REST API) Source: https://context7.com/logicaldoc/community/llms.txt Use this endpoint to list available workspaces. Requires basic authentication. ```bash curl -u admin:admin \ -H "Accept: application/json" \ "http://localhost:8080/services/rest/folder/listWorkspaces" ``` -------------------------------- ### Deploy LogicalDOC Stack with Docker Compose Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Deploy a complete LogicalDOC production stack using Docker Compose. This provisions MySQL and LogicalDOC containers and their associated volumes. ```bash $ docker-compose -f docker-compose.yml up -d ``` -------------------------------- ### GET /logicaldoc/community/getExtractedText Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Document.html Retrieves the document's text stored in the full-text index. ```APIDOC ## GET /logicaldoc/community/getExtractedText ### Description Gets the document's text stored in the full-text index. ### Method GET ### Endpoint /logicaldoc/community/getExtractedText ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **docId** (Long) - Required - The ID of the document. ### Response #### Success Response (200) - **text** (String) - Required - The extracted text of the document. ``` -------------------------------- ### Folder Creation API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html API for creating a new folder. ```APIDOC ## POST /api/folders/createFolder ### Description Creates a new folder. Returns the newly created folder ID. ### Method POST ### Endpoint /api/folders/createFolder ### Parameters #### Request Body - **sid** (String) - Required - Session identifier. - **parentId** (Long) - Required - The ID of the parent folder. - **name** (String) - Required - The name of the new folder. ### Response #### Success Response (200) - **folderId** (Long) - The ID of the newly created folder. ``` -------------------------------- ### Get Granted Users API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Retrieves the list of users granted permissions for a specific folder. ```APIDOC ## GET /folder/getGrantedUsers ### Description Retrieves the list of granted users for the given folder. ### Method GET ### Endpoint /folder/getGrantedUsers ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **folderId** (Int) - Required - The ID of the folder. ### Request Example ``` GET /folder/getGrantedUsers?sid=your_session_id&folderId=123 ``` ### Response #### Success Response (200) - **users** (Array) - A list of users with granted permissions. #### Response Example ```json { "users": [ { "serialVersionUID": 1, "username": "john.doe", "firstName": "John", "lastName": "Doe" } ] } ``` ``` -------------------------------- ### Deploy Docker Stack Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-core/src/test/resources/README.md Command to deploy the LogicalDOC Docker stack using the stack.yml file. Ensure the stack initializes completely before accessing the application. ```bash docker stack deploy -c stack.yml logicaldoc ``` -------------------------------- ### Get Granted Groups API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Retrieves the list of groups granted permissions for a specific folder. ```APIDOC ## GET /folder/getGrantedGroups ### Description Retrieves the list of granted groups for the given folder. ### Method GET ### Endpoint /folder/getGrantedGroups ### Parameters #### Query Parameters - **sid** (String) - Required - Session identifier. - **folderId** (Int) - Required - The ID of the folder. ### Request Example ``` GET /folder/getGrantedGroups?sid=your_session_id&folderId=123 ``` ### Response #### Success Response (200) - **groups** (Array) - A list of groups with granted permissions. #### Response Example ```json { "groups": [ { "serialVersionUID": 1, "name": "Administrators", "description": "" } ] } ``` ``` -------------------------------- ### Configure viewer.mjs settings Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-gui/readmePdfjs.txt Adjust path references and default viewer behavior within the viewer.mjs file. ```javascript sidebarViewOnLoad: false, ``` ```javascript defaultUrl: { value: 'compressed.tracemonkey-pldi-09.pdf', kind: OptionKind.VIEWER }, ``` -------------------------------- ### Folder Create API Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Creates a new folder. ```APIDOC ## POST /folder/create ### Description Creates a new folder; returns the newly created folder. ### Method POST ### Endpoint /folder/create ### Parameters #### Request Body - **sid** (String) - Required - Session identifier. - **folder** (WSFolder) - Required - The folder object to create. - **name** (String) - Required - The name of the new folder. - **description** (String) - Optional - Description for the new folder. - **position** (Int) - Optional - Position of the new folder. ### Request Example ```json { "sid": "your_session_id", "folder": { "name": "New Folder", "description": "This is a new folder.", "position": 0 } } ``` ### Response #### Success Response (200) - **folderId** (Int) - The ID of the newly created folder. #### Response Example ```json { "folderId": 789 } ``` ``` -------------------------------- ### Authenticate with LogicalDOC REST API Source: https://context7.com/logicaldoc/community/llms.txt Methods for establishing and terminating sessions using username/password, API keys, or form data. ```bash # Login with username and password (REST API) curl -X GET "http://localhost:8080/services/rest/auth/login?u=admin&pw=admin" \ -H "Accept: application/json" # Response: Session ID string # "sid123456789" # Login with API key (REST API) curl -X GET "http://localhost:8080/services/rest/auth/loginApiKey" \ -H "X-API-KEY: your-api-key-here" \ -H "Accept: application/json" # Login with form parameters (REST API) curl -X POST "http://localhost:8080/services/rest/auth/loginForm" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=admin&password=admin" # Login with JSON body (REST API) curl -X POST "http://localhost:8080/services/rest/auth/login" \ -H "Content-Type: application/json" \ -d '{"username": "admin", "password": "admin"}' # Get current session ID curl -X GET "http://localhost:8080/services/rest/auth/getSid" \ -H "Accept: application/json" # Logout (REST API) curl -X DELETE "http://localhost:8080/services/rest/auth/logout?sid=sid123456789" ``` -------------------------------- ### POST /getPath Source: https://github.com/logicaldoc/community/blob/master/logicaldoc-webservice/wsdoc/Folder.html Computes the path from the root to the target folder. ```APIDOC ## POST /getPath ### Description Computes the path from the root to the target folder; returns the array of folders, the first is the root. ### Parameters #### Request Body - **sid** (String) - Required - Session ID - **folderId** (Long) - Required - ID of the folder ### Response #### Success Response (200) - **folders** (WSFolder) - Array of folders ``` -------------------------------- ### Execute Checkout and Checkin Workflow in Java Source: https://context7.com/logicaldoc/community/llms.txt Utilize the RestDocumentClient to programmatically handle document versioning and retrieval. ```java // Java REST Client - Checkout/Checkin Workflow import com.logicaldoc.webservice.rest.client.RestDocumentClient; import java.io.File; RestDocumentClient documentClient = new RestDocumentClient( "http://localhost:8080/services/rest/document", "your-api-key" ); long docId = 12345L; // Checkout the document documentClient.checkout(docId); System.out.println("Document checked out"); // Make your changes to the file... File updatedFile = new File("/path/to/updated_document.pdf"); // Checkin with minor version documentClient.checkin(docId, "Updated content", false, updatedFile); System.out.println("Checkin completed"); // Verify the update WSDocument doc = documentClient.getDocument(docId); System.out.println("New version: " + doc.getVersion()); System.out.println("New file size: " + doc.getFileSize()); ```