Action: GetDocumentNode

Purpose: Returns a pointer to the DocumentNode (ie the top-most node in the DOM tree) of a specified DOM. If you know the DocumentName, use this Action to retrieve the DocumentOID. Note: if you want the outermost tag in the document, use the GetDocumentElement Action instead.

Action-specific name/value pairs:

Parameter Name Description
DocumentName The name of the document whose DocumentNode (ie DocumentOID) property is to be retrieved.

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

{DocumentName:"example"}

Example Request

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

or:

Action=GetDocumentElement
&JSON=%7BDocumentName%3A%22example%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

Example Response

XML

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

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

{DocumentOID:"1-1"}