Features Solutions Customers Support Blog

Welcome to the DocMoto
knowledge base

We hope you find DocMoto really easy to use but in case you have any questions, here you will find FAQs, step-by-step guides and videos demonstrating some of DocMoto's key features.

TRY DOCMOTO

Working With WebDAV

DocMoto is a standards based WebDAV server. As such it is possible to work with DocMoto using standard WebDAV commands and an http mechanism such as curl. Full details of the WebDAV specification and code samples are available here.

Connecting to the DocMoto Server

We recommend connecting to DocMoto on port 4983 (insecure) or 4984 (secure). These ports support pure WebDAV unlike the ports used by the DocMoto client (3983 and 3984).

Python API Utilities

The file LwpMotoUtils.py provides a set of utilities for connecting and working with DocMoto via WebDAV. We have an article detailing its usage here.

Setting properties

WebDAV properties are DocMoto tags. Using standard WebDAV calls you can set tag values or run DocMoto templates.

Properties are set using the PROPPATCH command. When adding a value for a property care must be taken to select the correct namespace.

The general form for setting a property is as follows

<prop>
	<MyTagName xmlns='MyTagNamespace:'>MyTagValue</MyTagName>
</prop>

The following code sets the comment tag with a value of "Some comments"

request = """<?xml version='1.0' encoding='utf-8'?>
<propertyupdate xmlns='DAV:' xmlns:dm='http://www.docmoto.com/2008/03/uiconfig'>
	<set>
		<prop>
			<comment xmlns='DAV:'>Some comments</comment>
		</prop>
	</set>
</propertyupdate>"""                 
          
# Confirm
LwpMotoUtils.createPropPatch(myURL, request)

A tag's correct namespace and name can be found under the Advanced settings in DocMoto's Tag Manager.

Multiple properties can be set with one call as follows:

request = """<?xml version='1.0' encoding='utf-8'?>
<propertyupdate xmlns='DAV:' xmlns:dm='http://www.docmoto.com/2008/03/uiconfig'>
	<set>
		<prop>
			<Status xmlns='DMUSER:'>Draft</Status>
		</prop>
		<prop>
			<ClientID xmlns='DMUSER:'>1234</ClientID>
		</prop>
		<prop>
			<comment xmlns='DAV:'>Some comments</comment>
 		</prop>                  
	</set>
</propertyupdate>"""                 
          
# Confirm
LwpMotoUtils.createPropPatch(myURL, request)

Note, tags with namespace DAV should be listed last when adding multiple properties

Calling Templates

Templates can be called immediately after creating a folder (MKCOL).

The tag Template_Name must be used, and the value should be the template's XML definition file held in the Templates folder within the DocMotoConfig folder.

The Template_Name tag has no namespace.

An example of calling a template is as follows:

# Templates can only be called immediately after creating a folder	
LwpMotoUtils.createCollection(myURL)

request = """<?xml version='1.0' encoding='utf-8'?>
	<propertyupdate xmlns='DAV:' xmlns:dm='http://www.docmoto.com/2008/03/uiconfig'>
		<set>
			<prop>
				<Template_Name xmlns=''>/DocMotoConfig/Templates/mytemplate.template.xml</Template_Name>
			</prop>
		</set>
	</propertyupdate>"""

# Confirm
LwpMotoUtils.createPropPatch(myURL, request)

Still have a question?

If you still can't find the answer to your question or need
more information, please contact the DocMoto team: