Search Results for

    Show / Hide Table of Contents

    Method CreateDocumentShare

    CreateDocumentShare(String, DocumentShareContract)

    Creates a new document share

    Declaration
    DocumentShareContract CreateDocumentShare(string connectionId, DocumentShareContract documentShare)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    DocumentShareContract documentShare

    Document share being created

    Returns
    Type Description
    DocumentShareContract

    The created 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/CreateDocumentShare

    Example for creates 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-20T23:59:59" }],
         "SubjectId": "2cd4ad99-bacf-e911-a939-00155d290a08",
         "TempAccessDefinitionName": "##DocShare##Freigabe Test" }
    }

    Response:

    {
       "CreateDocumentShareResult": {
         "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-20T23: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

    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 {documentShareId} (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

    Verification code is needed: Verification code not yet verified (10152)

    ServiceException

    User not found {userId} (10047)

    Back to top Copyright © Kendox