Method UpdateIndexBasedSecurity
UpdateIndexBasedSecurity(String, IndexBasedSecurityContract)
Update a index based security
Declaration
IndexBasedSecurityContract UpdateIndexBasedSecurity(string connectionId, IndexBasedSecurityContract indexBasedSecurity)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
IndexBasedSecurityContract | indexBasedSecurity | The index based security to update |
Returns
Type | Description |
---|---|
IndexBasedSecurityContract |
Examples
POST http://YourServerName/InfoShare/Json/Common/UpdateIndexBasedSecurity
Example for update index based security.{
"connectionId": "bcdc04fb-bb99-4b35-91bb-7135bc3f0d38",
"indexBasedSecurity":
{
"AccessRules":
[
{
"DynamicGroups":
[
"9e5b3f9d-6f99-ec11-a1d5-00155d109000"
],
"Groups":
[
"9e5b3f9d-6f99-ec11-a1d5-00155d109000"
],
"Id": "f3a0da5a-6399-ec11-a1d5-00155d109000",
"InfoStoreIds":
[
"60a95d7f-6f99-ec11-a1d5-00155d109000"
],
"Name": "AccessRuleUser",
"NewRoleId": "caffc1ae-f18e-ec11-a1cd-00155d109000",
"SearchConditions":
[
{
"ComparisonEnum": "NotEquals",
"GlobalValues": [],
"Id": "06a1da5a-6399-ec11-a1d5-00155d109000",
"PlaceHolder": "",
"PropertyTypeId": "01000006-38a7-11d8-a902-0050bf427e8f",
"RelationEnum": "Or",
"Values":
[
"Corynne C."
]
}
],
"UseForDocuments": false,
"UseForProcesses": false,
"UserTableConditions":
[
{
"ColumnName": "First name",
"Id": "ffa0da5a-6399-ec11-a1d5-00155d109000",
"Operator": "Equals",
"RelationEnum": "And",
"Value": "Georg"
}
],
"UserTableName": "Records",
"Users":
[
"9eb4194e-7073-ec11-a1a9-00155d109000"
]
},
{
"DynamicGroups":
[
"e4ec8e4e-6299-ec11-a1d5-00155d109000"
],
"Groups":
[
"9e5b3f9d-6f99-ec11-a1d5-00155d109000"
],
"InfoStoreIds":
[
"8160827d-6199-ec11-a1d5-00155d109000"
],
"Name": "AccessRuleSys",
"NewRoleId": "caffc1ae-f18e-ec11-a1cd-00155d109000",
"SearchConditions":
[
{
"ComparisonEnum": "NotEquals",
"GlobalValues": [],
"PlaceHolder": "",
"PropertyTypeId": "01000006-38a7-11d8-a902-0050bf427e8f",
"RelationEnum": "Or",
"Values":
[
"Vanessa P."
]
}
],
"UseForDocuments": false,
"UseForProcesses": false,
"UserTableConditions":
[
{
"ColumnName": "First name",
"Operator": "Equals",
"RelationEnum": "And",
"Value": "Georg"
}
],
"UserTableName": "Belege",
"Users":
[
"970e2bcb-6199-ec11-a1d5-00155d109000"
]
}
],
"Active": true,
"ExcludeFilters":
[
{
"ComparisonEnum": "Equals",
"GlobalValues": [],
"Id": "d5a0da5a-6399-ec11-a1d5-00155d109000",
"PlaceHolder": "%userloginname%",
"PropertyTypeId": "0100000a-38a7-11d8-a902-0050bf427e8f",
"RelationEnum": "And",
"Values":
[
"9eb4194e-7073-ec11-a1a9-00155d109000"
]
},
{
"ComparisonEnum": "Equals",
"GlobalValues": [],
"PlaceHolder": "",
"PropertyTypeId": "45672355-3b57-11d8-a902-0050bf427e8f",
"RelationEnum": "Or",
"Values":
[
"2022-02-28"
]
}
],
"ExcludedGroups":
[
"e4ec8e4e-6299-ec11-a1d5-00155d109000",
"45c9835a-6299-ec11-a1d5-00155d109000"
],
"ExcludedInfoStoreIds":
[
"c9998877-6199-ec11-a1d5-00155d109000",
"8160827d-6199-ec11-a1d5-00155d109000"
],
"ExcludedUsers":
[
"970e2bcb-6199-ec11-a1d5-00155d109000",
"f5d21cd7-6199-ec11-a1d5-00155d109000"
],
"Id": "c9a0da5a-6399-ec11-a1d5-00155d109000",
"RefreshIntervalSecondsExternalData": 123,
"UseQueryFilter": true
}
}
Response:
{
"UpdateIndexBasedSecurityResult": {
"AccessRules":
[
{
"DynamicGroups":
[
"9e5b3f9d-6f99-ec11-a1d5-00155d109000"
],
"Groups":
[
"9e5b3f9d-6f99-ec11-a1d5-00155d109000"
],
"Id": "f3a0da5a-6399-ec11-a1d5-00155d109000",
"InfoStoreIds":
[
"60a95d7f-6f99-ec11-a1d5-00155d109000"
],
"Name": "AccessRuleUser",
"NewRoleId": "caffc1ae-f18e-ec11-a1cd-00155d109000",
"SearchConditions":
[
{
"ComparisonEnum": "NotEquals",
"GlobalValues": [],
"Id": "06a1da5a-6399-ec11-a1d5-00155d109000",
"PlaceHolder": "",
"PropertyTypeId": "01000006-38a7-11d8-a902-0050bf427e8f",
"RelationEnum": "Or",
"Values":
[
"Corynne C."
]
}
],
"UseForDocuments": false,
"UseForProcesses": false,
"UserTableConditions":
[
{
"ColumnName": "First name",
"Id": "ffa0da5a-6399-ec11-a1d5-00155d109000",
"Operator": "Equals",
"RelationEnum": "And",
"Value": "Georg"
}
],
"UserTableName": "Records",
"Users":
[
"9eb4194e-7073-ec11-a1a9-00155d109000"
]
},
{
"DynamicGroups":
[
"e4ec8e4e-6299-ec11-a1d5-00155d109000"
],
"Groups":
[
"9e5b3f9d-6f99-ec11-a1d5-00155d109000"
],
"Id": "e3a473b3-7899-ec11-a1d6-00155d109000",
"InfoStoreIds":
[
"8160827d-6199-ec11-a1d5-00155d109000"
],
"Name": "AccessRuleSys",
"NewRoleId": "caffc1ae-f18e-ec11-a1cd-00155d109000",
"SearchConditions":
[
{
"ComparisonEnum": "NotEquals",
"GlobalValues": [],
"Id": "f6a473b3-7899-ec11-a1d6-00155d109000",
"PlaceHolder": "",
"PropertyTypeId": "01000006-38a7-11d8-a902-0050bf427e8f",
"RelationEnum": "Or",
"Values":
[
"Vanessa P."
]
}
],
"UseForDocuments": false,
"UseForProcesses": false,
"UserTableConditions":
[
{
"ColumnName": "First name",
"Id": "efa473b3-7899-ec11-a1d6-00155d109000",
"Operator": "Equals",
"RelationEnum": "And",
"Value": "Georg"
}
],
"UserTableName": "Belege",
"Users":
[
"970e2bcb-6199-ec11-a1d5-00155d109000"
]
}
],
"Active": true,
"ExcludeFilters":
[
{
"ComparisonEnum": "Equals",
"GlobalValues": [],
"Id": "d5a0da5a-6399-ec11-a1d5-00155d109000",
"PlaceHolder": "%userloginname%",
"PropertyTypeId": "0100000a-38a7-11d8-a902-0050bf427e8f",
"RelationEnum": "And",
"Values":
[
"9eb4194e-7073-ec11-a1a9-00155d109000"
]
},
{
"ComparisonEnum": "Equals",
"GlobalValues": [],
"Id": "b2a473b3-7899-ec11-a1d6-00155d109000",
"PlaceHolder": "",
"PropertyTypeId": "45672355-3b57-11d8-a902-0050bf427e8f",
"RelationEnum": "Or",
"Values":
[
"2022-02-28"
]
}
],
"ExcludedGroups":
[
"e4ec8e4e-6299-ec11-a1d5-00155d109000",
"45c9835a-6299-ec11-a1d5-00155d109000"
],
"ExcludedInfoStoreIds":
[
"c9998877-6199-ec11-a1d5-00155d109000",
"8160827d-6199-ec11-a1d5-00155d109000"
],
"ExcludedUsers":
[
"970e2bcb-6199-ec11-a1d5-00155d109000",
"f5d21cd7-6199-ec11-a1d5-00155d109000"
],
"Id": "c9a0da5a-6399-ec11-a1d5-00155d109000",
"RefreshIntervalSecondsExternalData": 123,
"UseQueryFilter": true
}
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |
ServiceException | Index based security {indexBasedSecurityId} not found (10278) |
ServiceException | Role not found {roleId} (10046) |
ServiceException | InfoStore not found {infoStoreId} (10018) |
ServiceException | User not found {userId} (10047) |
ServiceException | Group not found {groupId} (10092) |
ServiceException | Can not define DynamicGroups when users and groups are defined (10365) |
ServiceException | Can not define UserTableName or UserTableConditions when users, groups or dynamic groups are defined (10366) |
ServiceException | Property type {propertyTypeValue} is invalid (10128) |