07-21-2020 05:10 AM
Hey everyone,
I am trying to get the operator API working that will assign attributes to agents. I am using the following:
<operation> <operationType>update</operationType> <refURLs> <refURL>/unifiedconfig/config/agent/5124</refURL> </refURLs> <changeSet> <agent> <agentAttributesAdded> <agentAttribute> <attribute> <refURL>/unifiedconfig/config/attribute/5430</refURL> </attribute> </agentAttribute> </agentAttributesAdded> </agent> </changeSet> </operation>
When attempting to POST I receive the following error:
<errorDetail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="resourceErrorDetail"> <refURL>/unifiedconfig/config/agent/5124</refURL> <apiErrors> <apiError> <errorData>attributesAdded</errorData> <errorMessage>This field is not supported for this operation.</errorMessage> <errorType>invalidInput.mustBeBlank</errorType> </apiError> </apiErrors> </errorDetail> <errorMessage>There were one or more errors processing the following request: update /unifiedconfig/config/agent/5124</errorMessage> <errorType>operation.resourceErrors</errorType>
I am following the documentation listed here:
I do not want to go the route of using the agent API solely as I need to be able to update multiple agents on a single call. Any assistance would be greatly appreciated.
07-21-2020 07:57 AM
If you remove the
<agentAttributesAdded></agentAttributesAdded>
You'll actually will get a success but in my testing the change never happens. I'll be honest I believe I never got the operations API working so I would love to hear someone from Cisco address if this actually works as expected as the documentation isn't 10% correct. I tested this in PCCE 11.x.
david
07-21-2020 08:08 AM
I experienced that as well in UCCE. Per the doc they mention the following:
• Agent update: Update multiple agents (only available to supervisors). Only the skillGroupsAdded and skillGroupsRemoved parameters are allowed by the Operation API. See Agent API.
However the below link lists the following as an example:
07-23-2020 05:39 AM
Quick update. Testing the operation API with skill groups worked with no issues. I am thinking the code example in their doc is incorrect in using the </agentAttributesAdded> tag.
07-23-2020 12:07 PM
I can confirm the same. I can't find a way to troubleshoot the service handling the API requests. I hope Cisco can chime in on this.
david
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide