GET /api/competences

Description

Returns list of all competences defined and defined as visible for user. Not that this will not return course competences that are modules of a parent course. The modules are nested in the children attribute of the object.

Parameters

mode

String. Optional. Allowed values: "active"/"inactive"/"all". Default: "active". "Active" will return only currently active competences, "inactive" will return only those that havev been deactivated, "all" will return both.

start

DEPRECATED. Will be removed in future version. Use offset in stead.

limit

Int. Optional. Default: 20. Maximum: 100. Limit the size of the result set.

offset

Int. Optional. Default: 0. Offset the result set, starting at this index. For batching/paging.

competence_group_ids

List of ints. Optional. Restricts the result to competences added to these groups.

external_competence_group_ids

List of ids. Restrict to competences belonging to these groups. Can be used together with competence_group_ids.

types

List of strings. Optional. Competence types to restrict to.

term

String. Optional. Restrict result to competences matching search term.

category_ids

Array of ints. Optional. Restrict result to competences tagged with at least one of the categories.

attribute_ids

Array of ints. Optional. Restrict result to competences tagged with at least one of the attributes.

course_template_usage_allowed_only

Boolean. Optional. Return only competences that logged in user is allowed to create course events from. Applies to types "course" and "group" only (known collectively as "course_templates").

owner_only

Boolean. Optional. Return only competences that user (logged in or given via "user_name") is owner for.

organisation_owner_only (Not implemented, yet)

Boolean. Optional. Return only competences that is owned by organisation units user (logged in or given via "user_name") is admin for.

users_organisations_only

Boolean. Optional. Return only competences that is valid in the context of the logged in users. Mosly used when searchng for competences for admin users. When set to 1, Snapper Grape will only look down the organisation tree when looking for competences, else Snapper Grape will look up and down for admin users.

instructor_only

Boolean. Optional. Return only competences that user (logged in or given via "user_name") is instructor for.

organisation_ids

List if ints. Optional. Available only for superuser and superadmin. Limits result to competence objects valid in organisations (looking up the org tree(s)).

external_organisation_ids

List if ints. Optional. Same as organisation_ids.

custom_attributes

Dot-notation object. Example: "custom_attributes.my_attribute=123&custom_attributes.my_other_attribute=abc". Limit the result to Competences with these custom attributes. Custom attributes are defined on a per-customer basis, and can be just about anything.

view

String. Optional. Defines either 'simple' or 'full' result type.

fields

String. Optional. See Field customization.

Return

Array of Competence objects.

Security

Superuser, manager, person

GET /api/competences/[competence_id]

Description

Returns detailed view of competence.

Parameters

view

String. Optional. Defines either 'simple' or 'full' result type.

fields

String. Optional. See Field customization.

Return

Array of one Competence object.

Security

Superuser, manager, person

GET /api/competences/[competence_id]/events

Description

Returns a list of events for this competence

/api/events?competence_id=123 will yield the same result as /api/competence/123/events.

Parameters

view

String. Optional. Defines either 'simple' or 'full' result type.

fields

String. Optional. See Field customization.

Return

Array of Event objects.

Security

Superuser, manager, person