pp108 : GetDocument

GetDocument

 

This Web service operation is used to fetch the details of a document including the metadata properties and the document. This Web service operation is part of the Document Store Web service interface in the Repository service group. When the URL of a specific document within the repository is provided to the SOAP request, the details of that document are returned as the response, and the document is downloaded to the location: <Process_Platform_Installation_Directory> /content/downloadcontent.

SOAP Request

<ns:GetDocument>
    <!-- Complete path to the document starting from document root -->
    <ns:DocumentURL fetchContent="true/false"></ns:DocumentURL>
 	<Version>
		<!--type: integer -->
        <MajorVersion>majorVersionNumber</MajorVersion>
		<!--type: integer -->
        <MinorVersion>minorVersionNumber</MinorVersion>
    </Version>
	<!--type: string -->
    <FetchSetting>[default/inline/file]</FetchSetting>
</ns:GetDocument>
Request Parameters

Parameter

Description

DocumentURL

Complete path to the document starting from the document root and separated by a forward slash (/).

  • If fetchContent=false, the response contains only the metadata details of the document, including all the system defined and user defined properties.
  • If fetchContent=true, the response contains metadata details of the document, including all the system defined and user defined properties, and the document is downloaded to <Process_Platform_Installation_Directory> /content/downloadcontent.
Version

Major and minor version of the document. This is applicable only if the repository is OpenText Content Server (OTCS).

  • If Version is not specified, the response contains the details of the latest version of the document.
  • If advanced versioning is specified, provide the required major and minor version of the document.
  • If linear versioning is followed, keep the major version as 0 and provide the version number as the minor version.

FetchSetting

The way you want to retrieve the document. Supports one of the three values: inline, file, or default.

  • If FetchSetting is inline, the document is retrieved inline with the response.
  • If FetchSetting is file, the document is retrieved by writing it to a file with the document name present in the CORDYS_HOME\content\downloadcontent folder.
  • If FetchSetting is default, the behavior is the same as the file option. The document is retrieved by writing it to a file with the document name present in the CORDYS_HOME\content\downloadcontent folder.

SOAP Response

<ns:GetDocumentResponse>
    <!--type: string-->
    <ns:DocumentName>documentname</ns:DocumentName>
    <ns:DocumentContent isLocation="true/false"/>
    <ns:Folder>folder path</ns:Folder>
    <ns:Properties>
        <!--type: string-->
        <ns:MimeType>html</ns:MimeType>
		 <!-- Optional -->
		 <!-- This comes only when it is configured for CMIS or Archive Center-->
		<CmisType>CMIS type of the document</CmisType>   > optional element that appears in the response when used with CMIS
        <!--type: dateTime-->
        <ns:LastModified>2009-05-16T18:12:28</ns:LastModified>
		<VersionInfo>
        	<Version>
				<!--type: integer -->
         		<MajorVersion>majorVersionNumber</MajorVersion>
				<!--type: integer -->
          		<MinorVersion>minorVersionNumber</MinorVersion>
				<!--type: integer -->
          		<LatestVersionNumber>latestVersionNumber</LatestVersionNumber>
          		<LockInfo isLocked="true/false" />
        	</Version>
      	</VersionInfo>
        <!--Zero or more repetitions:-->
        <ns:Property>
            <!--type: string-->
            <ns:Name>some string name</ns:Name>
            <!--type: string-->
            <ns:Value>some string value</ns:Value>

            <!-- Optional -->
            <ns:CategoryID>category id in CS</ns:CategoryID>
        </ns:Property>
    </ns:Properties>
</ns:GetDocumentResponse>
Response Parameters

Parameter

Description

DocumentName

The name of the document.

DocumentContent

  • If the FetchSetting is inline in the request, this contains the content of the document and the isLocation attribute is false.
  • If the FetchSetting is file or default in the request, this contains the name of the document saved and the isLocation attribute is true. The document content is saved to the <Process_Platform_Installation_Directory>/content/downloadcontent folder.

Note: The creation and retrieval of the document with the document content as inline text in the SOAP request or response has been deprecated. Consumers must leverage the streaming option for optimal performance and resource consumption.

Folder

The folder location of the document.

Properties

The document can contain the following set of properties:

  • MimeType - The mime type of the document content.
  • CmisType - The CMIS type of the document, which is supported when configured with CMIS or Archive Center.
  • LastModified - The date when the document was last modified.
  • MajorVersion - The major version number of the document.
  • MinorVersion - The minor version number of the document.
  • LatestVersionNumber - The latest version number of the document retrieved.
  • LockInfo - isLocked attribute is true if the document is locked and false if the document is not locked.
Property Each property corresponds to one property name and its value attached to this document.

Related reference

CreateDocument
DeleteDocument
GetDocumentsInfo
UpdateDocument

Related information

Document Store