GetDocumentById - Obsolete

This method is obsolete and will be completely removed in the near future. Use the new web service method, GetDocument which provides more metadata.

Note

A new parameter "ProjectId" is added to the output.

Description

This method returns a document for the given documentId. 

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription

documentId

long

Mandatory

Not Relevant

documentId of the document to be retrieved

applicationNamestringMandatoryShould be less than or equal to 10 charactersThe name of the integration partner


Request - sample input

<GetDocumentById>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <documentId>57226</documentId>
    <applicationName>test</applicationName>
  </MethodParameters>
</GetDocumentById>

Response

TypeDescription

Document

Matching the document to the given id


Request - sample output

  <GetDocumentById>
  <MethodParameters>
    <Document>
      <DocumentId>57226</DocumentId>
      <FileName>Advanced-Test-Automation-Engineer-Syllabus-GA-2016 (1) (1).pdf</FileName>
      <FileTypeId>4</FileTypeId>
      <DocumentTypeId>13</DocumentTypeId>
      <Title>download100.png</Title>
      <Description>A new doc for chapter 2</Description>
      <OrderNumber isNull="false" />
      <UpdatedDate>11/15/2017 4:37:21 PM</UpdatedDate>
      <Url>http://172.20.1.183:8080/Document/DownloadDocumentWebService/DownloadDocWithSessionKey?sessionKey=rl%2fL3WDK6Fs%2bCIaABAaVX8uzFT11JpdnlRSStClMXE%2fNyT2ZEJ5bXyhdPr5zzd24</Url>
      <Path isNull="true" />
      <Official>False</Official>
      <OwnedById>44</OwnedById>
      <ShowInBoligboken>True</ShowInBoligboken>
      <Status>1</Status>
      <PdfDocId>57226</PdfDocId>
      <PdfDocPath isNull="true" />
      <ApplicationTag isNull="true" />
      <FolderId>0</FolderId>
      <RoomIds isNull="true" />
      <DeviceIds isNull="true" />
      <ChapterTags isNull="true" />
      <ProjectId>1234</ProjectId>
    </Document>
  </MethodParameters>
</GetDocumentById>

Exceptions

Error CodeDescription

123

An exception occurred while processing your request

134

Document does not exist for the given documentId

135

User is not authorized to access the document with the given documentId or your license does not authorize you to access this documentId

138applicationName length has exceeded the maximum character limit allowed (10)
146The applicationName is not set
167You are not authorized to use this method