Introduction
This is a companion to the Snapper Grape API documentation. It describes the data types returned from Snapper Grape API as of version 2.4.1
JSON data types
In addition to the standard JSON data types (number, string, boolean, array, object), we define here a data type date. Date is a string representation of a datetime object, on ISO standard format: ”2014-01-20 14:10”.
Attributes and configuration of Snapper Grape
Many of these objects are subject to configuration in Snapper Grape. Super users of Snapper Grape can turn on or off attributes at will. Some attributes may also have different meanings in different installations, and will have a rather vague description. This document describes all possible attributes of the objects. What you actually see when performing an API call most likely has fewer attributes than described here.
Role
Persons in Snapper Grape have zero or more roles. These roles typically define which competences are required. Roles are of different types, and thus can mean slightly different things. The most important type is the ”position” role, which gives the person his/her authorization level in Snapper Grape, and also defines which Organisation he/she belongs to. For this reason, positions have a separate API call, but roles of type position is still included in this call.
Simple representation
mandatory
Boolean
ONLY relevant when competence_id is specified in GET /api/roles
Specifies whether a given competence (as specified by competence_id for GET /api/roles) is optional or mandatory for the current role.
Full representation
description
String
Nullable
mandatory
Boolean
ONLY relevant when competence_id is specified in GET /api/roles
Specifies whether a given competence (as specified by competence_id for GET /api/roles) is optional or mandatory for the current role.
organisation_id
Number
Nullable
ID of organisation the role is linked to for person. Can indicate that person belongs to this organisation, but may have other meanings too.
organisation_ids
Array
Nullable
Array of organisation_ids. For special roles, indicates which parts of the organisation tree the role is valid.