Action: CloneDocument

Purpose: Creates an exact copy of an existing DOM

The Action will return the DocumentOID of the newly created DOM

Action-specific name/value pairs:

Parameter Name Description
SourceDocumentName The DocumentName of the DOM to be copied
ToDocumentName The DocumentName to be assigned to the new DOM

Alternatively, the parameters above can be incorporated into a single JSON string and specified using the parameter name JSON, eg:

{SourceDocumentName:"example",ToDocumentName:"myNewCopy"}

Example Request

Action=CloneDocument
&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&SourceDocumentName=example
&Timestamp=2009-06-14T13%3A19%3A41
&ToDocumentName=myNewCopy
&Version=2009-04-15
&db=mdbx

or:

Action=CloneDocument
&JSON=%7BSourceDocumentName%3A%22example%22%2CToDocumentName%3A%22myNewCopy%22%7D
&MDBAccessKeyId=[your access key id]
&OutputFormat=JSON
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

This request will copy the DOM named example into a new DOM named myNewCopy.

Example Response

XML

<?xml version='1.0'?>
<CloneDocumentResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <CloneDocumentResult>
      <DocumentOID>
         8-1
      </DocumentOID>
   </CloneDocumentResult>
</CloneDocumentResponse>

JSON (ie if OutputFormat=JSON specified in the Request)

{DocumentOID:"8-1"}

The newly created DOM has been allocated a DocumentOID of 8-1.