Method UpdateDocumentShare
UpdateDocumentShare(String, DocumentShareContract)
Updates a document share
Declaration
DocumentShareContract UpdateDocumentShare(string connectionId, DocumentShareContract documentShare)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
DocumentShareContract | documentShare | The document share being updated |
Returns
Type | Description |
---|---|
DocumentShareContract | The updated document share |
Remarks
- You (the current user) creates a document share for a specific user
- A document can be shared with a specific user multiple times. The time periods of the shares can overlap each other
- You need "GrantAccessToOtherUsers" access right on each document you want to share. See also AccessRightsEnum
- AllowedAccessOperations may contain only access operations you already have on all documents within a SecurityHandlerDocumentContract
- All access operations must belong to the access operation category "document"
Examples
POST http://YourServerName/InfoShare/Json/Document/UpdateDocumentShare
Example for update a document share.{
"connectionId": "1fbe116a-20a9-4378-b198-6cf3283f0238",
"documentShare": {
"SecurityHandlerDocuments": [{
"SearchableObjects": [{
"ObjectId": "7d58533d-75db-e911-a946-00155d290a08",
"StoreId": "3bb6448c-b9cf-e911-a939-00155d290a08",
"ObjectTypeId": "86BC60B4-86C3-4FD6-BEEF-50AF23A0AC9C"}],
"AllowedAccessOperations": ["01002010-38a7-11d8-a902-0050bf427e8f", "01002014-38a7-11d8-a902-0050bf427e8f"],
"StartDate": "2019-09-20T00:00:00",
"EndDate": "2019-09-21T23:59:59" }],
"SubjectId": "2cd4ad99-bacf-e911-a939-00155d290a08",
"TempAccessDefinitionName": "##DocShare##Freigabe Test",
"Id": "3cd73e49-9adb-e911-a946-00155d290a08" }
}
Response:
{
"UpdateDocumentShareResult": {
"Id": "3cd73e49-9adb-e911-a946-00155d290a08",
"SecurityHandlerDocuments": [{
"AllowedAccessOperations": ["01002010-38a7-11d8-a902-0050bf427e8f", "01002014-38a7-11d8-a902-0050bf427e8f"],
"CreateDate": "2019-09-20T11:32:12",
"CreatorUser": "2cd4ad99-bacf-e911-a939-00155d290a08",
"EndDate": "2019-09-21T23:59:59",
"Id": "4ed73e49-9adb-e911-a946-00155d290a08",
"LastChangeDate": "2019-09-20T11:32:12",
"LastChangeUser": "2cd4ad99-bacf-e911-a939-00155d290a08",
"Name": null,
"SearchableObjects": [{
"Id": "1ed83e49-9adb-e911-a946-00155d290a08",
"ObjectId": "7d58533d-75db-e911-a946-00155d290a08",
"ObjectTypeId": "86bc60b4-86c3-4fd6-beef-50af23a0ac9c",
"StoreId": "3bb6448c-b9cf-e911-a939-00155d290a08" }],
"StartDate": "2019-09-20T00:00:00" }],
"SubjectId": "2cd4ad99-bacf-e911-a939-00155d290a08",
"TempAccessDefinitionName": "##DocShare##Freigabe Test" }
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Not allowed (10014) |
ServiceException | String was not recognized as a valid DateTime: {dateTimeValue}. Expected format {expectedFormat} (10059) |
ServiceException | Not enough rights {rightName} ({rightId}) on searchable object {searchableObjectId} (10101) |
ServiceException | Access operation {accessOperationId} is not allowed on searchable object {searchableObjectId} (10102) |
ServiceException | Access operation {accessOperationId} is not allowed, because it belongs to the wrong access operation category {accessOperationCategoryName}. Category must be {documentAccessOperationCategoryName} (10103) |
ServiceException | Document share not found {documentShare.Id} (10104) |
ServiceException | Start date {startDate} must be earlier than end date {endDate} on security handler document {securityHandlerDocumentId} (10105) |
ServiceException | Searchable object {searchableObjectId} is not unique in security handler document {securityHandlerDocumentId} (10106) |
ServiceException | Security handler document {securityHandlerDocumentId} is not unique (10110) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |