Method StartFileTransactionAttachment
StartFileTransactionAttachment(String, String, String, String, String, String, String, Boolean)
Starting a new file transaction for a attachment. Download the file with the method GetTempFile. Call ReleaseFile to end transaction.
Declaration
FileTransactionResultContract StartFileTransactionAttachment(string connectionId, string documentId, string versionId, string documentDataId, string renditionId, string attachmentId, string accessTypeEnum, bool ignoreHashValidation)
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 | attachmentId | The attachment id. See also Attachments |
System.String | accessTypeEnum | Optional: Type of access AccessTypeEnum |
System.Boolean | ignoreHashValidation | Ignore system configuration for hash validation |
Returns
Type | Description |
---|---|
FileTransactionResultContract | Return a file id. |
Examples
POST http://YourServerName/InfoShare/Json/File/StartFileTransaction
Example for start file transaction.{
"connectionId": "bbf760ba-6bdb-45b6-9eec-992669fc7359",
"documentId": "89dcf0ba-9c19-485b-bc0a-e8b5666866fa",
"attachmentId":"02c90715-040d-02c8-100a-c6020e05c502"
}
Response:
{
"StartFileTransactionAttachmentResult": {
"AttachmentId": "02c90715-040d-02c8-100a-c6020e05c502",
"DocumentDataId": null,
"DocumentId": "89dcf0ba-9c19-485b-bc0a-e8b5666866fa",
"FileId": "6550eff7-4225-4ee2-804b-d01b5b12b2b1",
"RenditionId": null,
"VersionId": null
}
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Document without file {documentId} (10004) |
ServiceException | No document found for documentId {documentId} (10005) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |
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) |
ServiceException | Attachment not found {attachmentId} (10267) |