Python wrapper of the OpenKM RESTful API.
Go to the downloaded folder and execute on command line:
sudo python setup.py install
To use the package, you can import it with:
from OKMObjects.okmDocument import OkmDocument
Now, you only have to create a new OkmDocument and call the methods that you need.
mDocumentAPI = OkmDocument('username', 'password', 'http://<localhost>:8080/OpenKM')
mDocumentAPI.getDocument('<document-route>', '<destination-name>')
mDocumentAPI.deleteDocument('<document-route>')
The methods that are available to use in this package are
@srcPath could be the UUID or the route of the file in the OKM Server.
This method deletes a concrete document.
@srcPath could be the UUID or the route of the file in the OKM Server. @dstName is the name that the file will have in our computer.
This method downloads a concrete document.
@srcPath could be the UUID or the route of the file in the OKM Server.
This method downloads the properties of a concrete document into a JSON file.
@srcPath could be the UUID or the route of the file in the OKM Server.
This method downloads the versions history of a concrete document into a JSON file.
@srcPath could be the UUID or the route of the file in the OKM Server. @dstPath is the route of the file in the OKM Server.
This method duplicates the document into the destination path.
@srcPath could be the UUID or the route of the file in the OKM Server. @dstPath is the route of the file in the OKM Server.
This method moves the document into the destination path.
@srcPath is the local route of the file in our computer. @dstName is the name that the file will have in the OKM Server
This method uploads a document to our server.