8.4.21 • Published 5 years ago

logical_doc_rest_api v8.4.21

Weekly downloads
-
License
Apache 2.0 Licens...
Repository
-
Last release
5 years ago

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

For Node.js

npm

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 = require('logical_doc_rest_api');

var defaultClient = LogicalDocRestApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new LogicalDocRestApi.AuthorApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSid(callback);

Documentation for API Endpoints

All URIs are relative to https://localhost:8080/services/rest

ClassMethodHTTP requestDescription
LogicalDocRestApi.AuthorApigetSidGET /auth/getSid
LogicalDocRestApi.AuthorApiloginGET /auth/login
LogicalDocRestApi.AuthorApiloginPostPOST /auth/login
LogicalDocRestApi.AuthorApilogoutDELETE /auth/logout
LogicalDocRestApi.BookmarkApibookmarkDocumentGET /bookmark/bookmarkDocument
LogicalDocRestApi.BookmarkApibookmarkFolderGET /bookmark/bookmarkFolder
LogicalDocRestApi.BookmarkApideleteBookmarkDELETE /bookmark/deleteBookmark
LogicalDocRestApi.BookmarkApigetBookmarksGET /bookmark/getBookmarks
LogicalDocRestApi.BookmarkApisaveBookmarkPOST /bookmark/saveBookmark
LogicalDocRestApi.BookmarkApiunbookmarkDocumentDELETE /bookmark/unbookmarkDocument
LogicalDocRestApi.BookmarkApiunbookmarkFolderDELETE /bookmark/unbookmarkFolder
LogicalDocRestApi.DocumentApiaddNotePOST /document/addNoteAdds a new note for the given document
LogicalDocRestApi.DocumentApicallDeleteDELETE /document/deleteDeletes a document
LogicalDocRestApi.DocumentApicheckinPOST /document/checkinCheck-in an existing document
LogicalDocRestApi.DocumentApicheckoutPOST /document/checkoutCheckout a document
LogicalDocRestApi.DocumentApicreateAliasPOST /document/createAliasCreates a new document alias
LogicalDocRestApi.DocumentApicreateDocumentPOST /document/createCreates a new document
LogicalDocRestApi.DocumentApicreateDownloadTicketPOST /document/createDownloadTicketCreates a new download ticket
LogicalDocRestApi.DocumentApicreatePdfPUT /document/createPdfCreates the PDF conversion of the given document; if the PDF conversion was already created, nothing will happen
LogicalDocRestApi.DocumentApicreateThumbnailPUT /document/createThumbnailCreates the thumbail of the given document; if the thumbnail was already created, nothing will happen
LogicalDocRestApi.DocumentApideleteLinkDELETE /document/deleteLinkRemoves an existing link
LogicalDocRestApi.DocumentApideleteNoteDELETE /document/deleteNoteDeletes a note
LogicalDocRestApi.DocumentApideleteVersionDELETE /document/deleteVersionDelete the version of a document
LogicalDocRestApi.DocumentApigetAliasesGET /document/getAliasesGets the aliases
LogicalDocRestApi.DocumentApigetContentGET /document/getContentGets the document content
LogicalDocRestApi.DocumentApigetDocumentGET /document/getDocumentGets document metadata
LogicalDocRestApi.DocumentApigetDocumentByCustomIdGET /document/getDocumentByCustomIdGets document metadata by custom ID
LogicalDocRestApi.DocumentApigetDocumentsGET /document/getDocumentsGets the metadata of a collection of document
LogicalDocRestApi.DocumentApigetExtractedTextGET /document/getExtractedTextGets the extracted text of a document
LogicalDocRestApi.DocumentApigetLinksGET /document/getLinksGets the links of a document
LogicalDocRestApi.DocumentApigetNotesGET /document/getNotesGets all the notes of a document
LogicalDocRestApi.DocumentApigetRatingsGET /document/getRatingsRetrieves the different ratings of a focuments
LogicalDocRestApi.DocumentApigetRecentDocumentsGET /document/getRecentDocumentsGets the last modified documents
LogicalDocRestApi.DocumentApigetResourceGET /document/getResourceGets the content of a resource
LogicalDocRestApi.DocumentApigetVersionContentGET /document/getVersionContentGets the document content by version
LogicalDocRestApi.DocumentApigetVersionsGET /document/getVersionsGets the versions
LogicalDocRestApi.DocumentApiisReadableGET /document/isReadableTests if a document is readable
LogicalDocRestApi.DocumentApilinkPOST /document/linkCreates a link between two documents
LogicalDocRestApi.DocumentApilistGET /document/listLists documents by folder
LogicalDocRestApi.DocumentApilistDocumentsGET /document/listDocumentsLists documents by folder and filename
LogicalDocRestApi.DocumentApilockPUT /document/lockLocks a document
LogicalDocRestApi.DocumentApimovePUT /document/moveMoves an existing document with the given identifier
LogicalDocRestApi.DocumentApipromoteVersionPUT /document/promoteVersionPromotes an old version to the current default one
LogicalDocRestApi.DocumentApirateDocumentPUT /document/rateDocumentAdd/Update the user's vote for a document
LogicalDocRestApi.DocumentApireindexPOST /document/reindexRe-indexes a document
LogicalDocRestApi.DocumentApirenamePUT /document/renameRenames the title of an existing document with the given identifier
LogicalDocRestApi.DocumentApireplaceFilePOST /document/replaceFileReplace the file of a version
LogicalDocRestApi.DocumentApirestorePUT /document/restoreRestores a deleted document
LogicalDocRestApi.DocumentApisaveNotePOST /document/saveNoteAdds a new note
LogicalDocRestApi.DocumentApisendEmailPOST /document/sendEmailSends documents by email
LogicalDocRestApi.DocumentApisetPasswordPOST /document/setPasswordPassword protect a document
LogicalDocRestApi.DocumentApiunlockPUT /document/unlockUnlocks the document
LogicalDocRestApi.DocumentApiunprotectPOST /document/unprotectTemporarily removes password protection
LogicalDocRestApi.DocumentApiunsetPasswordPOST /document/unsetPasswordRemoves password protection
LogicalDocRestApi.DocumentApiupdatePUT /document/updateUpdates an existing document
LogicalDocRestApi.DocumentApiuploadPOST /document/uploadUploads a document
LogicalDocRestApi.DocumentApiuploadResourcePOST /document/uploadResourceUploads a new resource of the document
LogicalDocRestApi.DocumentMetadataApideleteAttributeSetDELETE /documentMetadata/deleteAttributeSetDeletes an attribute set
LogicalDocRestApi.DocumentMetadataApideleteTemplateDELETE /documentMetadata/deleteTemplateDeletes a template
LogicalDocRestApi.DocumentMetadataApigetAttributeOptionsGET /documentMetadata/getAttributeOptionsRetrieves the options for the given attribute
LogicalDocRestApi.DocumentMetadataApigetAttributeSetGET /documentMetadata/getAttributeSetGets an attribute set by name
LogicalDocRestApi.DocumentMetadataApigetAttributeSetByIdGET /documentMetadata/getAttributeSetByIdGets attribute set's metadata
LogicalDocRestApi.DocumentMetadataApigetTemplateGET /documentMetadata/getTemplateGets template's metadata
LogicalDocRestApi.DocumentMetadataApigetTemplateByIdGET /documentMetadata/getTemplateByIdGets template's metadata
LogicalDocRestApi.DocumentMetadataApilistAttributeSetsGET /documentMetadata/listAttributeSetsLists the attribute sets
LogicalDocRestApi.DocumentMetadataApilistTemplatesGET /documentMetadata/listTemplatesLists all the templates
LogicalDocRestApi.DocumentMetadataApisetAttributeOptionsPUT /documentMetadata/setAttributeOptionsSave attribute options
LogicalDocRestApi.DocumentMetadataApistoreAttributeSetPOST /documentMetadata/storeAttributeSetCreate/Update an attribute set
LogicalDocRestApi.DocumentMetadataApistoreTemplatePOST /documentMetadata/storeTemplateCreate/Update a template
LogicalDocRestApi.FolderApicopyPOST /folder/copyCopies a folder
LogicalDocRestApi.FolderApicreateAliasFolderPOST /folder/createAliasCreates a new folder alias
LogicalDocRestApi.FolderApicreateFolderPOST /folder/createFolderCreates a subfolder
LogicalDocRestApi.FolderApicreateFolderByModelPOST /folder/createCreates a new folder
LogicalDocRestApi.FolderApicreatePathPOST /folder/createPathCreates a path
LogicalDocRestApi.FolderApicreateSimplePOST /folder/createSimpleCreates folders from path
LogicalDocRestApi.FolderApicreateSimpleFormPOST /folder/createSimpleFormCreates folders from path
LogicalDocRestApi.FolderApicreateSimpleJSONPOST /folder/createSimpleJSONCreates folders from path
LogicalDocRestApi.FolderApideleteFolderDELETE /folder/deleteDeletes a folder
LogicalDocRestApi.FolderApifindByPathGET /folder/findByPathGets a folder
LogicalDocRestApi.FolderApigetDefaultWorkspaceGET /folder/getDefaultWorkspaceGets the Default workspace
LogicalDocRestApi.FolderApigetFolderGET /folder/getFolderGets a folder
LogicalDocRestApi.FolderApigetGrantedGroupsGET /folder/getGrantedGroupsRetrieves the list of granted groups for the given folder
LogicalDocRestApi.FolderApigetGrantedUsersGET /folder/getGrantedUsersRetrieves the list of granted users for the given folder
LogicalDocRestApi.FolderApigetPathGET /folder/getPathGets a path of folders
LogicalDocRestApi.FolderApigetPathStringGET /folder/getPathStringGets a path
LogicalDocRestApi.FolderApigetRootFolderGET /folder/getRootFolderGets the root folder
LogicalDocRestApi.FolderApigrantGroupPUT /folder/grantGroupGrants group permission to the folder
LogicalDocRestApi.FolderApigrantUserPUT /folder/grantUserGrants user permission to the folder
LogicalDocRestApi.FolderApiisGrantedGET /folder/isGrantedTests user permission on a folder
LogicalDocRestApi.FolderApiisReadableFolderGET /folder/isReadableTests if a folder is readable
LogicalDocRestApi.FolderApiisWritableGET /folder/isWritableTests if a folder is writable
LogicalDocRestApi.FolderApilistChildrenGET /folder/listChildrenLists the child folders
LogicalDocRestApi.FolderApilistWorkspacesGET /folder/listWorkspacesRetrieves the list of all workspaces
LogicalDocRestApi.FolderApimoveFolderPUT /folder/moveMoves a folder
LogicalDocRestApi.FolderApirenameFolderPUT /folder/renameRenames a folder
LogicalDocRestApi.FolderApiupdateFolderPOST /folder/updateUpdates a folder
LogicalDocRestApi.SearchApifindPOST /search/findSearch documents
LogicalDocRestApi.SearchApifindByFilenameGET /search/findByFilenameSearch documents by Filename
LogicalDocRestApi.SearchApifindFoldersGET /search/findFoldersSearch folders by name
LogicalDocRestApi.SystemApigetInfoGET /system/getInfoGet system information
LogicalDocRestApi.SystemApigetLanguagesGET /system/getLanguagesGet enabled languages
LogicalDocRestApi.SystemApigetStatisticsGET /system/getStatisticsGet system statistics
LogicalDocRestApi.TagApiaddDocumentTagsPOST /tag/addDocumentTagsAppends new tags to a document
LogicalDocRestApi.TagApiaddFolderTagsPOST /tag/addFolderTagsAppends new tags to a folder
LogicalDocRestApi.TagApifindDocumentsByTagGET /tag/findDocumentsByTagFinds authorized documents for the current user having a specified tag.
LogicalDocRestApi.TagApifindFoldersByTagGET /tag/findFoldersByTagFinds authorized folders for the current user having a specified tag.
LogicalDocRestApi.TagApigetDocumentTagsGET /tag/getDocumentTagsGets all the tags of a document
LogicalDocRestApi.TagApigetFolderTagsGET /tag/getFolderTagsGets all the tags of a folder
LogicalDocRestApi.TagApigetTagCloudGET /tag/getTagCloudRetrieves all tag clouds in the repository
LogicalDocRestApi.TagApigetTagsGET /tag/getTagsGets all the tags used in the sysem
LogicalDocRestApi.TagApigetTagsPresetGET /tag/getTagsPresetRetrieves all the tags in the preset
LogicalDocRestApi.TagApisetDocumentTagsPOST /tag/setDocumentTagsSet the tags of a document
LogicalDocRestApi.TagApisetFolderTagsPOST /tag/setFolderTagsSets the tags of a folder

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication