Method GetFileFromDocument
GetFileFromDocument(String, String, String, String, String, String)
Get file from document
Declaration
string GetFileFromDocument(string connectionId, string documentId, string versionId, string documentDataId, string renditionId, string accessTypeEnum)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
System.String | documentId | The document id. See also Id |
System.String | versionId | Optional: The version id. See also GetVersionListItems(String, String, Int32, Int32) |
System.String | documentDataId | Optional: The document data id. See also DocumentData |
System.String | renditionId | Optional: The rendition id. See also DocumentData |
System.String | accessTypeEnum | Type of access AccessTypeEnum |
Returns
Type | Description |
---|---|
System.String | The file id from document |
Examples
POST http://YourServerName/InfoShare/Json/File/GetFileFromDocument
A simple example for get file from document.{
"connectionId": "6750c3bd-2f8a-4beb-8f0f-25dc70340d71",
"documentId": "9e2009e6-0cde-e911-a947-00155d290a08",
"versionId": "",
"documentDataId": "",
"renditionId": "",
"accessTypeEnum": ""
}
Example for get file from document with optional parameter.
{
"connectionId": "6750c3bd-2f8a-4beb-8f0f-25dc70340d71",
"documentId": "9e2009e6-0cde-e911-a947-00155d290a08",
"versionId": "9e2009e6-0cde-e911-a947-00155d290a08",
"documentDataId": "1f2009e6-0cde-e911-a947-00155d290a08",
"renditionId": "5e2009e6-0cde-e911-a947-00155d290a08",
"accessTypeEnum": "UnknownAccess"
}
Response:
{
"GetFileFromDocumentResult": "a114bbb4-093c-4d69-b349-3371ffa1fe39"
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | No document found for documentId {documentId} (10005) |
ServiceException | Document without file {0} (10004) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |
ServiceException | From parameter to high (10009) |
ServiceException | Could not retrieve version {versionId} for document {documentId} (10130) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | BlobStore {blobStoreId} is not available (10171) |
ServiceException | Could not get file stream: {errorMessage} (10172) |