API / Competency_levels

Users' current and target competencies are estimated with different levels. You can manage competency levels in Silverbucket's database with the endpoint /competency_levels:
https://<your_environment_url>/customer-api/1.0/competency_levels/

GET

You can list all the competency_levels in Silverbucket with the GET method. An example result could look like this:
{
    "next": null,
    "previous": null,
    "current": 1,
    "itemsPerPage": 500,
    "count": 1,
    "lastPage": 1,
    "data": [
        {
            "id": 20,
            "created": "2020-06-09T13:24:15.407214",
            "modified": "2020-06-09T13:24:15.438881",
            "name": "Beginner",
            "order": 1,
            "competency_level_group": null
        }
    ],
    "excelUrl": "/customer-api/1.0/competency_levels/?excel=true",
    "csvUrl": "/customer-api/1.0/competency_levels/?csv=true"
}

POST

You can add new competency levels with the POST method. Message body should have the new level's name and position in the level hierarchy in the order attribute.
{
    "name": "<string>",
    "order": <INTEGER>,
    "competency_level_group": <competency_level_group>
}

Competency_level_group

Competency level group is optional information for competency levels. You can organize competency level in groups and add different competency level groups for competency categories. This attribute is optional.

PATCH

You can modify competency level with the PATCH method. Add the competency level id which you want to edit in the endpoint's URL:
https://<your_environment_url>/customer-api/1.0/competency_levels/<competency_level_id>/
You can edit all the attributes which are available for POSTing.
How did we do with this article?