DocumentBrowserGetItem Method (ConnectionId, SessionId, DocumentId) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Reads data about an element/document but does not return its content. This method is typically used on the website to translate a documentID to the corresponding file-path name.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string GetItem(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value typically is retrieved from a call to the OpenSession method
documentId
Type: ContentStudio.DocumentDocumentId
The document to read

Return Value

Type: String
Xml
Xml
<root>
   <status>0</status>
   <statustext>Success</statustext>
   <canedit>Boolean (0/1)</canedit>
   <documentid>Int32</documentid>
   <filename>String</filename>
   <presentationtemplatefilename>String</presentationtemplatefilename>
   <presentationtemplateid>String</presentationtemplateid>
   <contenttype>String</contenttype>
   <documentname>String</documentname>
   <parentdocumentid>Int32</parentdocumentid>
   <imagesavailable>Boolean (0/1)</imagesavailable>
   <modulename>String</modulename>
   <unitid>Int32</unitid>
   <categoryid>Int32</categoryid>
   <categoryname>String</categoryname>
</root>
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
  • 1001 - The Session is invalid.
  • 1002 - Permission denied.
  • 1804 - The document could not be found.
  • 1838 - The document is published.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

BROWSE permission on the document is required to return minimum data. If the caller also has WRITE permission the rest of the fields can contain valid data; otherwise these fields are empty.
Remarks

The method takes into consideration the caller's permission. If the caller is anonymous only documents that are published and not archived at the time the call is made will be found. If the user has no edit permission for that element only the filename, presentationtemplateid, presentationtemplatefilename, documentid, imagesavailable, documentname fields will contain valid data - other fields will be empty.

Note Note
To just translate between id, path, guoid or virtual path, Content Studio 5.2 and later can use the DocumentId object which performs these kind of operations more efficiently. However that object does not take any security or publishing data into consideration.
See Also

Reference