logical_doc_rest_api
LogicalDocRestApi - JavaScript client for logical_doc_rest_api
This is the interactive documentation of the REST APIs exposed by LogicalDOC. You can find more information about LogicalDOC at https://www.logicaldoc.com or on Twitter @logicaldoc.
Note: The access path to the API is protected with basic authentication, to be able to run the samples you must log in using the credentials of a Logicaldoc user, or passing to the request the session ID (SID) as a cookie (cookie name: ldoc-sid
).
Here is an example to list the children folders:
curl -u admin:admin -H ''Accept: application/json'' http://localhost:8080/services/rest/folder/listChildren?folderId=4
RESTful Guide with curl: https://wiki.logicaldoc.com/wiki/RESTful_Guide_with_curl
Practical examples of use are available for various programming languages at: http://wiki.logicaldoc.com/wiki/Bindings_And_Samples
SDK Clients for a number of programming languages(Java, Javascript, Python, PHP, C# and more) can be downloaded at: https://app.swaggerhub.com/apis/swatzniak/logicaldoc_rest_api
Find out more about LogicalDOC https://www.logicaldoc.com This SDK is automatically generated by the Swagger Codegen project:
- API version: 8.4.2
- Package version: 8.4.2
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
Node.js
Fornpm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install logical_doc_rest_api --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your logical_doc_rest_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('logical_doc_rest_api')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/logical_doc_rest_api then install it via:
npm install YOUR_USERNAME/logical_doc_rest_api --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: rules: parser: amd: false
Getting Started
Please follow the installation instruction and execute the following JS code:
var LogicalDocRestApi = ; var defaultClient = LogicalDocRestApiApiClientinstance; // Configure HTTP basic authorization: basicAuthvar basicAuth = defaultClientauthentications'basicAuth';basicAuthusername = 'YOUR USERNAME'basicAuthpassword = 'YOUR PASSWORD' var api = var { if error console; else console; };api;
Documentation for API Endpoints
All URIs are relative to https://localhost:8080/services/rest
Class | Method | HTTP request | Description |
---|---|---|---|
LogicalDocRestApi.AuthorApi | getSid | GET /auth/getSid | |
LogicalDocRestApi.AuthorApi | login | GET /auth/login | |
LogicalDocRestApi.AuthorApi | loginPost | POST /auth/login | |
LogicalDocRestApi.AuthorApi | logout | DELETE /auth/logout | |
LogicalDocRestApi.BookmarkApi | bookmarkDocument | GET /bookmark/bookmarkDocument | |
LogicalDocRestApi.BookmarkApi | bookmarkFolder | GET /bookmark/bookmarkFolder | |
LogicalDocRestApi.BookmarkApi | deleteBookmark | DELETE /bookmark/deleteBookmark | |
LogicalDocRestApi.BookmarkApi | getBookmarks | GET /bookmark/getBookmarks | |
LogicalDocRestApi.BookmarkApi | saveBookmark | POST /bookmark/saveBookmark | |
LogicalDocRestApi.BookmarkApi | unbookmarkDocument | DELETE /bookmark/unbookmarkDocument | |
LogicalDocRestApi.BookmarkApi | unbookmarkFolder | DELETE /bookmark/unbookmarkFolder | |
LogicalDocRestApi.DocumentApi | addNote | POST /document/addNote | Adds a new note for the given document |
LogicalDocRestApi.DocumentApi | callDelete | DELETE /document/delete | Deletes a document |
LogicalDocRestApi.DocumentApi | checkin | POST /document/checkin | Check-in an existing document |
LogicalDocRestApi.DocumentApi | checkout | POST /document/checkout | Checkout a document |
LogicalDocRestApi.DocumentApi | createAlias | POST /document/createAlias | Creates a new document alias |
LogicalDocRestApi.DocumentApi | createDocument | POST /document/create | Creates a new document |
LogicalDocRestApi.DocumentApi | createDownloadTicket | POST /document/createDownloadTicket | Creates a new download ticket |
LogicalDocRestApi.DocumentApi | createPdf | PUT /document/createPdf | Creates the PDF conversion of the given document; if the PDF conversion was already created, nothing will happen |
LogicalDocRestApi.DocumentApi | createThumbnail | PUT /document/createThumbnail | Creates the thumbail of the given document; if the thumbnail was already created, nothing will happen |
LogicalDocRestApi.DocumentApi | deleteLink | DELETE /document/deleteLink | Removes an existing link |
LogicalDocRestApi.DocumentApi | deleteNote | DELETE /document/deleteNote | Deletes a note |
LogicalDocRestApi.DocumentApi | deleteVersion | DELETE /document/deleteVersion | Delete the version of a document |
LogicalDocRestApi.DocumentApi | getAliases | GET /document/getAliases | Gets the aliases |
LogicalDocRestApi.DocumentApi | getContent | GET /document/getContent | Gets the document content |
LogicalDocRestApi.DocumentApi | getDocument | GET /document/getDocument | Gets document metadata |
LogicalDocRestApi.DocumentApi | getDocumentByCustomId | GET /document/getDocumentByCustomId | Gets document metadata by custom ID |
LogicalDocRestApi.DocumentApi | getDocuments | GET /document/getDocuments | Gets the metadata of a collection of document |
LogicalDocRestApi.DocumentApi | getExtractedText | GET /document/getExtractedText | Gets the extracted text of a document |
LogicalDocRestApi.DocumentApi | getLinks | GET /document/getLinks | Gets the links of a document |
LogicalDocRestApi.DocumentApi | getNotes | GET /document/getNotes | Gets all the notes of a document |
LogicalDocRestApi.DocumentApi | getRatings | GET /document/getRatings | Retrieves the different ratings of a focuments |
LogicalDocRestApi.DocumentApi | getRecentDocuments | GET /document/getRecentDocuments | Gets the last modified documents |
LogicalDocRestApi.DocumentApi | getResource | GET /document/getResource | Gets the content of a resource |
LogicalDocRestApi.DocumentApi | getVersionContent | GET /document/getVersionContent | Gets the document content by version |
LogicalDocRestApi.DocumentApi | getVersions | GET /document/getVersions | Gets the versions |
LogicalDocRestApi.DocumentApi | isReadable | GET /document/isReadable | Tests if a document is readable |
LogicalDocRestApi.DocumentApi | link | POST /document/link | Creates a link between two documents |
LogicalDocRestApi.DocumentApi | list | GET /document/list | Lists documents by folder |
LogicalDocRestApi.DocumentApi | listDocuments | GET /document/listDocuments | Lists documents by folder and filename |
LogicalDocRestApi.DocumentApi | lock | PUT /document/lock | Locks a document |
LogicalDocRestApi.DocumentApi | move | PUT /document/move | Moves an existing document with the given identifier |
LogicalDocRestApi.DocumentApi | promoteVersion | PUT /document/promoteVersion | Promotes an old version to the current default one |
LogicalDocRestApi.DocumentApi | rateDocument | PUT /document/rateDocument | Add/Update the user's vote for a document |
LogicalDocRestApi.DocumentApi | reindex | POST /document/reindex | Re-indexes a document |
LogicalDocRestApi.DocumentApi | rename | PUT /document/rename | Renames the title of an existing document with the given identifier |
LogicalDocRestApi.DocumentApi | replaceFile | POST /document/replaceFile | Replace the file of a version |
LogicalDocRestApi.DocumentApi | restore | PUT /document/restore | Restores a deleted document |
LogicalDocRestApi.DocumentApi | saveNote | POST /document/saveNote | Adds a new note |
LogicalDocRestApi.DocumentApi | sendEmail | POST /document/sendEmail | Sends documents by email |
LogicalDocRestApi.DocumentApi | setPassword | POST /document/setPassword | Password protect a document |
LogicalDocRestApi.DocumentApi | unlock | PUT /document/unlock | Unlocks the document |
LogicalDocRestApi.DocumentApi | unprotect | POST /document/unprotect | Temporarily removes password protection |
LogicalDocRestApi.DocumentApi | unsetPassword | POST /document/unsetPassword | Removes password protection |
LogicalDocRestApi.DocumentApi | update | PUT /document/update | Updates an existing document |
LogicalDocRestApi.DocumentApi | upload | POST /document/upload | Uploads a document |
LogicalDocRestApi.DocumentApi | uploadResource | POST /document/uploadResource | Uploads a new resource of the document |
LogicalDocRestApi.DocumentMetadataApi | deleteAttributeSet | DELETE /documentMetadata/deleteAttributeSet | Deletes an attribute set |
LogicalDocRestApi.DocumentMetadataApi | deleteTemplate | DELETE /documentMetadata/deleteTemplate | Deletes a template |
LogicalDocRestApi.DocumentMetadataApi | getAttributeOptions | GET /documentMetadata/getAttributeOptions | Retrieves the options for the given attribute |
LogicalDocRestApi.DocumentMetadataApi | getAttributeSet | GET /documentMetadata/getAttributeSet | Gets an attribute set by name |
LogicalDocRestApi.DocumentMetadataApi | getAttributeSetById | GET /documentMetadata/getAttributeSetById | Gets attribute set's metadata |
LogicalDocRestApi.DocumentMetadataApi | getTemplate | GET /documentMetadata/getTemplate | Gets template's metadata |
LogicalDocRestApi.DocumentMetadataApi | getTemplateById | GET /documentMetadata/getTemplateById | Gets template's metadata |
LogicalDocRestApi.DocumentMetadataApi | listAttributeSets | GET /documentMetadata/listAttributeSets | Lists the attribute sets |
LogicalDocRestApi.DocumentMetadataApi | listTemplates | GET /documentMetadata/listTemplates | Lists all the templates |
LogicalDocRestApi.DocumentMetadataApi | setAttributeOptions | PUT /documentMetadata/setAttributeOptions | Save attribute options |
LogicalDocRestApi.DocumentMetadataApi | storeAttributeSet | POST /documentMetadata/storeAttributeSet | Create/Update an attribute set |
LogicalDocRestApi.DocumentMetadataApi | storeTemplate | POST /documentMetadata/storeTemplate | Create/Update a template |
LogicalDocRestApi.FolderApi | copy | POST /folder/copy | Copies a folder |
LogicalDocRestApi.FolderApi | createAliasFolder | POST /folder/createAlias | Creates a new folder alias |
LogicalDocRestApi.FolderApi | createFolder | POST /folder/createFolder | Creates a subfolder |
LogicalDocRestApi.FolderApi | createFolderByModel | POST /folder/create | Creates a new folder |
LogicalDocRestApi.FolderApi | createPath | POST /folder/createPath | Creates a path |
LogicalDocRestApi.FolderApi | createSimple | POST /folder/createSimple | Creates folders from path |
LogicalDocRestApi.FolderApi | createSimpleForm | POST /folder/createSimpleForm | Creates folders from path |
LogicalDocRestApi.FolderApi | createSimpleJSON | POST /folder/createSimpleJSON | Creates folders from path |
LogicalDocRestApi.FolderApi | deleteFolder | DELETE /folder/delete | Deletes a folder |
LogicalDocRestApi.FolderApi | findByPath | GET /folder/findByPath | Gets a folder |
LogicalDocRestApi.FolderApi | getDefaultWorkspace | GET /folder/getDefaultWorkspace | Gets the Default workspace |
LogicalDocRestApi.FolderApi | getFolder | GET /folder/getFolder | Gets a folder |
LogicalDocRestApi.FolderApi | getGrantedGroups | GET /folder/getGrantedGroups | Retrieves the list of granted groups for the given folder |
LogicalDocRestApi.FolderApi | getGrantedUsers | GET /folder/getGrantedUsers | Retrieves the list of granted users for the given folder |
LogicalDocRestApi.FolderApi | getPath | GET /folder/getPath | Gets a path of folders |
LogicalDocRestApi.FolderApi | getPathString | GET /folder/getPathString | Gets a path |
LogicalDocRestApi.FolderApi | getRootFolder | GET /folder/getRootFolder | Gets the root folder |
LogicalDocRestApi.FolderApi | grantGroup | PUT /folder/grantGroup | Grants group permission to the folder |
LogicalDocRestApi.FolderApi | grantUser | PUT /folder/grantUser | Grants user permission to the folder |
LogicalDocRestApi.FolderApi | isGranted | GET /folder/isGranted | Tests user permission on a folder |
LogicalDocRestApi.FolderApi | isReadableFolder | GET /folder/isReadable | Tests if a folder is readable |
LogicalDocRestApi.FolderApi | isWritable | GET /folder/isWritable | Tests if a folder is writable |
LogicalDocRestApi.FolderApi | listChildren | GET /folder/listChildren | Lists the child folders |
LogicalDocRestApi.FolderApi | listWorkspaces | GET /folder/listWorkspaces | Retrieves the list of all workspaces |
LogicalDocRestApi.FolderApi | moveFolder | PUT /folder/move | Moves a folder |
LogicalDocRestApi.FolderApi | renameFolder | PUT /folder/rename | Renames a folder |
LogicalDocRestApi.FolderApi | updateFolder | POST /folder/update | Updates a folder |
LogicalDocRestApi.SearchApi | find | POST /search/find | Search documents |
LogicalDocRestApi.SearchApi | findByFilename | GET /search/findByFilename | Search documents by Filename |
LogicalDocRestApi.SearchApi | findFolders | GET /search/findFolders | Search folders by name |
LogicalDocRestApi.SystemApi | getInfo | GET /system/getInfo | Get system information |
LogicalDocRestApi.SystemApi | getLanguages | GET /system/getLanguages | Get enabled languages |
LogicalDocRestApi.SystemApi | getStatistics | GET /system/getStatistics | Get system statistics |
LogicalDocRestApi.TagApi | addDocumentTags | POST /tag/addDocumentTags | Appends new tags to a document |
LogicalDocRestApi.TagApi | addFolderTags | POST /tag/addFolderTags | Appends new tags to a folder |
LogicalDocRestApi.TagApi | findDocumentsByTag | GET /tag/findDocumentsByTag | Finds authorized documents for the current user having a specified tag. |
LogicalDocRestApi.TagApi | findFoldersByTag | GET /tag/findFoldersByTag | Finds authorized folders for the current user having a specified tag. |
LogicalDocRestApi.TagApi | getDocumentTags | GET /tag/getDocumentTags | Gets all the tags of a document |
LogicalDocRestApi.TagApi | getFolderTags | GET /tag/getFolderTags | Gets all the tags of a folder |
LogicalDocRestApi.TagApi | getTagCloud | GET /tag/getTagCloud | Retrieves all tag clouds in the repository |
LogicalDocRestApi.TagApi | getTags | GET /tag/getTags | Gets all the tags used in the sysem |
LogicalDocRestApi.TagApi | getTagsPreset | GET /tag/getTagsPreset | Retrieves all the tags in the preset |
LogicalDocRestApi.TagApi | setDocumentTags | POST /tag/setDocumentTags | Set the tags of a document |
LogicalDocRestApi.TagApi | setFolderTags | POST /tag/setFolderTags | Sets the tags of a folder |
Documentation for Models
- LogicalDocRestApi.CommandInfo
- LogicalDocRestApi.DataFlavor
- LogicalDocRestApi.DataHandler
- LogicalDocRestApi.DataSource
- LogicalDocRestApi.InputStream
- LogicalDocRestApi.OutputStream
- LogicalDocRestApi.WSAttribute
- LogicalDocRestApi.WSAttributeSet
- LogicalDocRestApi.WSBookmark
- LogicalDocRestApi.WSDocument
- LogicalDocRestApi.WSFolder
- LogicalDocRestApi.WSLink
- LogicalDocRestApi.WSNote
- LogicalDocRestApi.WSParameter
- LogicalDocRestApi.WSRating
- LogicalDocRestApi.WSRight
- LogicalDocRestApi.WSSearchOptions
- LogicalDocRestApi.WSSearchResult
- LogicalDocRestApi.WSSystemInfo
- LogicalDocRestApi.WSTagCloud
- LogicalDocRestApi.WSTemplate
Documentation for Authorization
basicAuth
- Type: HTTP basic authentication