Difference between revisions of "Direct link"

From OpenKM Documentation
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
Direct link need a '''user''' which have login grants. A good practice is configure the profile of this user to disallow anything when login from openkm UI.
+
You can download a document from OpenKM using a command line utility like '''wget'''. Since OpenKM 6.2.1 Community and OpenKM 6.2.5 Professional there is a service with BASIC authentication for this task. You can reference a document by UUID using the '''uuid''' parameter or by path, using the '''path''' parameter. In the same URL you need to specify the user and password. A good practice is configure the user profile disallowing anything.
  
 
Available parameters:
 
Available parameters:
* uuid ( the document UUID )
+
* uuid: the document UUID
* path ( the document path )
+
* path: the document path
 +
* inline: boolean. If the document is downloaded as attachment or shown inline.
  
 
Example
 
Example
  http://'''user''':'''user'''@openkm_host/OpenKM/Download?'''uuid'''=4ca63b87-e340-443e-aeef-6c7e2fb57aea
+
  http://'''user''':'''password'''@openkm_host/OpenKM/Download?'''uuid'''=4ca63b87-e340-443e-aeef-6c7e2fb57aea
  http://'''user''':'''user'''@openkm_host/OpenKM/Download?'''path'''=/okm:root/test/test.doc
+
  http://'''user''':'''password'''@openkm_host/OpenKM/Download?'''path'''=/okm:root/test/test.doc
  
{{Note|If you use path parameter, ia good practice encode url to prevent problems with special characters}}
+
This ease some integration tasks:
 +
 
 +
  $ wget http://okmAdmin:admin@localhost:8080/OpenKM/Download?uuid=xxx-yyy-zzz
 +
 
 +
{{Note|If you use parameter path, ia good practice encode url to prevent problems with special characters}}
 +
 
 +
[[Category: Utilities]]

Latest revision as of 13:53, 7 April 2014

You can download a document from OpenKM using a command line utility like wget. Since OpenKM 6.2.1 Community and OpenKM 6.2.5 Professional there is a service with BASIC authentication for this task. You can reference a document by UUID using the uuid parameter or by path, using the path parameter. In the same URL you need to specify the user and password. A good practice is configure the user profile disallowing anything.

Available parameters:

  • uuid: the document UUID
  • path: the document path
  • inline: boolean. If the document is downloaded as attachment or shown inline.

Example

http://user:password@openkm_host/OpenKM/Download?uuid=4ca63b87-e340-443e-aeef-6c7e2fb57aea
http://user:password@openkm_host/OpenKM/Download?path=/okm:root/test/test.doc

This ease some integration tasks:

 $ wget http://okmAdmin:admin@localhost:8080/OpenKM/Download?uuid=xxx-yyy-zzz

Nota clasica.png If you use parameter path, ia good practice encode url to prevent problems with special characters