cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2215
Views
25
Helpful
12
Replies

Issue with the 'Update SkillProfile By ID' API

johncarlin1
Level 1
Level 1

I'm having some issues with the 'Update SkillProfile By ID' API. I'm sending a PUT HTTP request to https://api.wxcc-anz1.cisco.com/organization/<myOrgId>/skill-profile/d696a074-ad28-452a-845c-e0bbf7b20fe2 with the following body (this is the response body returned by "Get SkillProfile By ID"):

{
    "id""d696a074-ad28-452a-845c-e0bbf7b20fe2",
    "name""SP_thisAgentName",
    "description""thisAgentName Skill Profile",
    "activeSkills": [
        {
            "id""46167718-db7f-4667-8430-962511c5a7be",
            "proficiencyValue"10,
            "skillId""b3bb8e23-4900-4c9d-b022-5188ace4cbfa"
        },
        {
            "id""9b0f33b0-92fb-44de-a5d2-253fa37bad24",
            "proficiencyValue"10,
            "skillId""1415699a-9b0d-4965-ba16-67564e0ec221"
        },
        {
            "id""5b744f06-a8dc-474a-9fb1-42ed8c69dcbd",
            "proficiencyValue"8,
            "skillId""5a78c151-88cb-46e5-81e4-34eb0e9692d4"
        }
    ],
    "createdTime"1632700394000,
    "lastUpdatedTime"1646026207000
}

When doing so I get this response:
{
    "trackingId""ccconfig_7145918f-84a8-43cb-a068-0520448ad07c",
    "error": {
        "key""409",
        "message": [
            {
                "description""Internal error. Please contact Cisco Support Team"
            }
        ]
    }
}
 
This suggests it's a server side error to me.  I note that the request body I'm using isn't verbatim what is shown in the documentation for this API but I have tried the verbatim version with the same response.  Has anyone successfully used the "Update SkillProfile By ID" API?
12 Replies 12

aruc
Cisco Employee
Cisco Employee

@Chris Deren You tagged the wrong Arun

Arunabh Bhattacharjee
Cisco Employee
Cisco Employee

Hi @johncarlin1 @Chris Deren 

 

Wanted to acknowledge that this is an issue & share some good news around this - we have found several improvements on the spec so will remove the version dependency in the coming release as well as fix the issues with the 409s and 400s.

 

The enhancements are planned to be deployed - (which will eliminate the issues you reported above) by week of May 24th 2022.

In parallel, we are also working on usability improvements that will make it easier to make skill changes on the fly programmatically.

 

We will keep you'll posted on the testing and the progress with the Skills + SkillProfile APIs and getting the reported issues squared away.

Thanks again for your feedback so far.

 

Regards,

Arunabh.

Hi @Arunabh Bhattacharjee, has the fix for this been deployed yet?  I'm getting a 409 response when attempting to update skill profiles now.

Hi @johncarlin1  @Chris Deren  the first drop only had documentation updates and enhancements but another header was added to unblock you.

For the time being, please use this optional (not mandatory - it is temporary till we fix the issue) header in the requests - 

Header:

X-IGNORE-INTERNAL-DATA

Value:

false

 

example: 

 

Screen Shot 2022-06-01 at 10.48.45 PM.png

 

What this does is show you the internal versions of the entities.

 

As the team is working on hiding and abstracting the internal versions of these address book entities,

This will help you bypass the 409s.

You can add the version number as N in the request and it will work.

Where N is the version that is returned by the API when you use the header

 

Apologies on the delays, we will continue to improve the experience as these APIs are enhanced further.

 

This optional header should help unblock the version issue (for the time being).

 

Thanks & Regards,

Arunabh. 

Thanks @Arunabh Bhattacharjee, this is working for me now.  For anyone else trying this, I've included the additional 'X-IGNORE-INTERNAL-DATA: false' header in the GET request that precedes the PUT request.  The body of the GET response is sent in the PUT request - the only modification required is to update the proficiencies. Response from the PUT request is a 200 OK along with details of the updated skill profile.

Thanks @johncarlin1  for the additional pointers. If you believe that was an acceptable solution, please feel free to tag it as a solution.

We will send another post on this thread once the fix for this version field is dpeloyed. (it will be hidden eventually and these details abstracted)

 

Thanks & Regards,

 

@aruc 

 

Any update on this as I am still seeing the 409 error?

Thanks for the update @Arunabh Bhattacharjee, we'll try again May 24th.

ntheolog
Cisco Employee
Cisco Employee

Hi  johncarlin1,

Following up on this issue.  It is a bug and we are continuing to fix it. 
In the meantime, if you still wanted to test it out before its fixed, there is a work-a-round.  I will paste the min body needed to receive a success "200 OKAY" below.  

The temp work-a-round when using this body is to increment the inner "ActiveSkills version".  Needs to increment by 1 consecutively. 
So on the next call, increase it from 0 to 1, additional calls... from 1 to 2, etc..

 

By no means is this the way it will work when fixed, this is just a "hack" to try it out, if you require. 
Otherwise, I would advise to wait for fix.

PUT minimum BODY below:

{
"id": "AXC0fhbDe-vnBSvWb1q1",
"name": "test_Skill1",
"description": "Change #1",
"activeSkills": [
{
"version": 0,
"id": "b64e440f-5d21-4633-a03e-b36d0dae99ad",
"textValue": "test",
"skillId": "AXffKW-I8xtF4WJlRp1H"
}
],
"version": 0,
"organizationId": "d4d06b45-179b-4480-9c12-45d23bb894se"
}

 

I am seeing something similar. I create the SkillProfile with the API, I am able to update it once and then any other subsequent updates result in:

 

{
"trackingId": "ccconfig_1a8bfafc-0b42-4261-b791-16c93539ddb1",
"error": {
"key": "400",
"message": [
{
"description": "Specified configuration has been updated. Reload the configuration before updating"
}
] }}


 I tried changing the version of the activeSkills as suggested, but nothing changed.  Also, the GET API does not even return the version of neither the skill profile object or the activeSkills objects. How are we supposed to update the version if we cannot get the current version?

Thanks @ntheolog , that workaround is helpful.  It doesn't seem to work when a skill profile contains more than one active skill though unless there is a trick to that as well?  We may have to wait for the proper fix before proceeding with our WCC deployment.  Do you have a rough ETA for resolution?

ntheolog
Cisco Employee
Cisco Employee
Hello,

This seems to be a bug.

Will investigate further and get back to you.

Thank you for reporting this.