Question

API - How to Set Occupation And Skills For Multiple Users?

  • 20 September 2023
  • 2 replies
  • 39 views

Hello Docebo experts :)

I am having an issue with using the API to set occupation and skills for multiple users and would really appreciate your help. I don’t understand what the “canonical” variables stand for and where I can obtain them from. 

Here is my attempt, which sadly resulted in an error. I tried to assign a skill “Effective Communication” to a particular user. 

{
  "occupation": {
    "code": "esco_occupation_52df9d56-efd4-48d0-ad93-59231943fc4c", (i got the code by using “Retrieve The Occupations List From Workforce Service” on a user who already has a skill “Effective Communication”)
    "name": "3D Animator",
    "canonical_code": "string", (I have no idea what to put here)
    "canonical_name": "string", (I have no idea what to put here either)
    "is_custom": false (since this occupation was already set up by default by Docebo)
  },
  "skills": [
    {
      "code": "added_skill_effective-communication", (retrieved it from a user who already has this skill using API)
      "name": "Effective Communication", (that’s the name of the skill)
      "expertise": 1,
      "is_custom": true, (it is custom)
      "is_suggested": true (not sure what it means and if I should change it to “false”)
    }
  ]
}

 

Any suggestions on how to proceed will be hugely appreciated!

All the best,

 

Mateusz


2 replies

Userlevel 7
Badge +2

This would be super useful for me to know as well. It’s unfortunate that we cannot add skills to users via CSV and without any IT support, it’s tough...

Userlevel 4
Badge +1

I’m afraid I don’t have experience with the Skill API, but here are two things I would at least try, if you haven't already:

  1. Try omitting canonical_code and canonical_name from your request altogether.
  2. Use the same values for canonical_code and canonical_name as you did for code and name above.

Beyond that, I’m really not sure where these values might come from. I don’t suppose your error message included any detail about what was wrong?

Edit to add: It appears that the is_suggested field tracks whether the skill is recommended by the Artificial Intelligence or not (see the very end of this Knowledge Base article).

Reply