Use the Operation API to save changes to several items of the same type in a single request. The following changes are allowed in an operation:
<operation> <operationType>delete</operationType> <refURLs> <refURL>/unifiedconfig/config/calltype/5000</refURL> <refURL>/unifiedconfig/config/calltype/5001</refURL> </refURLs> </operation>
<operation> <operationType>update</operationType> <refURLs> <refURL>/unifiedconfig/config/agent/5000</refURL> <refURL>/unifiedconfig/config/agent/5001</refURL> </refURLs> <changeSet> <agent> <skillGroupsAdded> <skillGroup> <refURL>/unifiedconfig/config/skillgroup/6000<refURL> </skillGroup> </skillGroupsAdded> </agent> </changeSet> </operation>
The following example shows the response when the delete operation is successful:
<operationsResult> <status>success</status> </operationsResult>
The following example shows a partial success response for a request to delete several agents:
<operationsResult> <apiErrors> <apiError> <errorDetail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type= "resourceErrorDetail"> <refURL>agent/1</refURL> <apiErrors> <apiError> <errorMessage>The specified ID does not exist in the database.</errorMessage> <errorType>notFound.dbData</errorType> </apiError> </apiErrors> </errorDetail> <errorMessage>There were one or more errors processing the following request: delete agent/1</errorMessage> <errorType>operation.resourceErrors</errorType> </apiError> <apiError> <errorDetail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type= "resourceErrorDetail"> <refURL>agent/2</refURL> <apiErrors> <apiError> <errorMessage>The specified ID does not exist in the database.</errorMessage> <errorType>notFound.dbData</errorType> </apiError> </apiErrors> </errorDetail> <errorMessage>There were one or more errors processing the following request: delete agent/2</errorMessage> <errorType>operation.resourceErrors</errorType> </apiError> </apiErrors> <status>partialSuccess</status> </operationsResult>
The following example shows a failure response for a request to delete a call type that does not exist:
<operationsResult> <status>failure</status> <apiErrors> <apiError> <errorDetail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type= "resourceErrorDetail"> <refURL>/unifiedconfig/config/calltype/9999</refURL> <apiErrors> <apiError> <errorMessage>The specified ID does not exist in the database.</errorMessage> <errorType>notFound.dbData</errorType> </apiError> </apiErrors> </errorDetail> <errorMessage>There were one or more errors processing the following request: delete /unifiedconfig/config /calltype/9999</errorMessage> <errorType>operation.resourceErrors</errorType> </apiError> </apiErrors> </operationsResult>