API / User_competencies

With /user_competencies endpoint you can manage users' competencies in Silverbucket. If you want to manage the competencies, it can be done with the /competencies endpoint.
https://<your_environment_url>/customer-api/1.0/user_competencies/

GET

If you call the /user_competencies without parameters you will get all the competencies for all the users. An example result could look like this:
{
"next": null,
"previous": null,
"current": 1,
"itemsPerPage": 500,
"count": 2,
"lastPage": 1,
"data": [
{
"id": 1,
"created": "2020-06-09T13:24:15.699382",
"modified": "2020-06-09T13:24:15.959279",
"user": 5279,
"competency": 17,
"competency_level": 1,
"target_competency_level": 3
},
{
"id": 2,
"created": "2020-06-09T13:24:15.699382",
"modified": "2020-06-09T13:24:15.959279",
"user": 1,
"competency": 41,
"competency_level": 4,
"target_competency_level": null
}
],
"excelUrl": "/customer-api/1.0/user_competencies/?excel=true",
"csvUrl": "/customer-api/1.0/user_competencies/?csv=true"
}

POST

You can add new competencies for user with POST method to the same endpoint than GET. Successful call will give response code 201. POST body has to contain the following fields, expect the target_competency_level is optional:
{
"user": <user_id>,
"competency": <competency_id>,
"competency_level": <competency_level_id>,
"target_competency_level": <competency_level_id>
}

PATCH

You can modify users' competencies with PATCH method. Add record's ID in the endpoint's URL:
https://<your_environment_url>/customer-api/1.0/user_competencies/<id>/
Add new values to message body for competency_level and target_competency_level. Successful call will give result code 200.