Method UpdateMultipleDocuments
UpdateMultipleDocuments(String, List<String>, UpdateCommandContract)
Updates multiple documents
Declaration
UpdateMultipleDocumentsResultContract UpdateMultipleDocuments(string connectionId, List<string> documentIds, UpdateCommandContract updateCommand)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
System.Collections.Generic.List<System.String> | documentIds | A list of document ids to be updated. See also Id |
UpdateCommandContract | updateCommand | An update command object. See also UpdateCommandContract |
Returns
Type | Description |
---|---|
UpdateMultipleDocumentsResultContract | Returns an instance of UpdateMultipleDocumentsResultContract that contains a list of ServiceException. If the update of a document fails, a ServiceException is added to this list. |
Examples
POST http://YourServerName/InfoShare/Json/Document/UpdateMultipleDocuments
An example that updates multiple documents{
"connectionId": "59df463d-65d7-4f6c-8baa-003a65e28e4a",
"documentIds": ["f584cddf-557f-4b43-a7cf-d31cf19981fd", "ad639ec8-a4cf-42b3-ac76-a636458f6f6e"],
"updateCommand": {
"NewLifeCycleStartId": null,
"ProtectionDomainId": "0100a000-38a7-11d8-a902-0050bf427e8f",
"PropertyUpdates": [{
"PropertyTypeId": "01004003-38a7-11d8-a902-0050bf427e8f",
"PropertyUpdateActionEnum": "ReplaceAllValues",
"Value": {
"Values": ["test1@kdx.ch", "test2@kdx.ch"]
}
},
{
"PropertyTypeId": "d226eec7-f1a5-ec11-a1ea-000c29a3bff0",
"PropertyUpdateActionEnum": "ReplaceSingleValue",
"Value": {
"EnumIndexValues": [2]
},
"ReplaceValue": {
"EnumIndexValues": [1]
}
},
{
"PropertyTypeId": "219a4975-ec9e-ec11-a1e8-000c29a3bff0",
"PropertyUpdateActionEnum": "RemoveSingleValue",
"Value": {
"EnumIndexValues": [1]
}
},
{
"PropertyTypeId": "0100000b-38a7-11d8-a902-0050bf427e8f",
"PropertyUpdateActionEnum": "RemoveProperty"
},
{
"PropertyTypeId": "01004025-38a7-11d8-a902-0050bf427e8f",
"PropertyUpdateActionEnum": "AddValue",
"Value": {
"Values": ["1024"]
}
}
]
}
}
Response:
{
"UpdateMultipleDocumentsResult": {
"Exceptions": []
}
}
Exceptions
Type | Condition |
---|---|
ServiceException | No document found for documentId {documentId} (10005) |
ServiceException | Document '{documentId}' already checked out for user '{userId}' (10204) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Property type '{propertyTypeId}' not found (10288) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Action '{propertyUpdateActionEnum}' is not valid (10289) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Action '{propertyUpdateActionEnum}' is not allowed for a single value property (10290) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains no value. Supply a value for action '{propertyUpdateActionEnum}' (10291) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains more than one value. Only one value is allowed for action '{propertyUpdateActionEnum}' (10292) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains no value. At least one value is needed for action '{propertyUpdateActionEnum}' (10293) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains no value to be replaced. Supply a value to be replaced for action '{propertyUpdateActionEnum}' (10294) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains more than one value to be replaced. Only one value to be replaced is allowed for action '{propertyUpdateActionEnum}' (10295) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains no replace value. Supply a replace value for action '{propertyUpdateActionEnum}' (10296) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains more than one replace value. Only one replace value is allowed for action '{propertyUpdateActionEnum}' (10297) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains more than one value. Only one value is allowed for a single value property and for action '{propertyUpdateActionEnum}' (10298) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains no value to be removed. Supply a value to be removed for action '{propertyUpdateActionEnum}' (10299) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Update property contains more than one value to be removed. Only one value to be removed is allowed for action '{propertyUpdateActionEnum}' (10300) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Value '{value}' is too long (10301) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Value to be replaced '{value}' is too long (10302) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Replace value '{replaceValue}' is too long (10303) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Value '{value}' is not a number (10304) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Value to be replaced '{value}' is not a number (10305) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Replace value '{replaceValue}' is not a number (10306) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Failure while adding property value '{value}' (10307) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Failure while replacing property value '{value}' with value '{replaceValue}' (10308) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': String value '{value}' is not recognized as a valid Date. Expected format '{yyyy-MM-dd}' (10309) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': String value to be replaced '{value}' is not recognized as a valid Date. Expected format '{yyyy-MM-dd}' (10310) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Replace string value '{replaceValue}' is not recognized as a valid Date. Expected format '{yyyy-MM-dd}' (10311) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': String value '{value}' is not recognized as a valid DateTime. Expected format '{yyyy-MM-ddTHH:mm:ss}' (10312) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': String value to be replaced '{value}' is not recognized as a valid DateTime. Expected format '{yyyy-MM-ddTHH:mm:ss}' (10313) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Replace string value '{value}' is not recognized as a valid DateTime. Expected format '{yyyy-MM-ddTHH:mm:ss}' (10314) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Failure while removing property value '{value}' (10315) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Index value '{value}' is out of range. Must be non-negative and less than the size of the collection of the property type '{propertyTypeId}' (10316) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Index value to be replaced '{value}' is out of range. Must be non-negative and less than the size of the collection of the property type '{propertyTypeId}' (10317) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Replace index value '{value}' is out of range. Must be non-negative and less than the size of the collection of the property type '{propertyTypeId}' (10318) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': A property type to be updated can only be passed once. The following property type(s) is/are passed more than once: '{propertyTypeId}', etc. (10319) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Property type '{propertyTypeId}' is invalid. Must be a valid Guid (10320) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Cannot create, update or delete document property because property type '{propertyTypeId}' is deactivated (10321) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Cannot create, update or delete document property because property type '{propertyTypeId}' is deleted (10322) |
ServiceException | Document '{documentId}', property type '{propertyTypeId}', action '{propertyUpdateActionEnum}': Unknown data type for property type '{propertyTypeId}' (10323) |