Grep group#

Groups representing subjects, curricula, etc. from the national Grep database.

Availability#

Attribute group

To retrieve these groups, the application needs access to the groups-edu attribute group / scope.

Organization type

This group type is available for primary, lower secondary and upper secondary schools.

Member list

Versions#

There are two versions of the Grep groups. These can be distinguished based on the type field. The only difference between the versions is the structure of the id field.

The fc:grep groups are used when accessing the user groups API. The fc:grep2 groups are used when accessing the organization groups API.

Example#

For type fc:grep:

{
  "id": "fc:grep:http:__psi.udir.no_laereplan_aarstrinn_aarstrinn3",
  "type": "fc:grep",
  "displayName": "Tredje årstrinn",
  "membership": {
      "basic": "member"
  },
  "public": true,
  "grep_type": "aarstrinn",
  "code": "aarstrinn3"
}

For type fc:grep2:

{
  "id": "fc:grep2:eksempel.kommune.no:http%3A%2F%2Fpsi.udir.no%2Flaereplan%2Faarstrinn%2Faarstrinn3",
  "type": "fc:grep2",
  "displayName": "Tredje årstrinn",
  "membership": {
      "basic": "member"
  },
  "public": true,
  "grep_type": "aarstrinn",
  "code": "aarstrinn3"
}

Group object#

The group objects has the following fields:

id (required, string)

Unique identifier of the group. The format of this field depends on the group type.

For fc:grep groups, the format is fc:grep:<escaped-grep-id>. <escaped-grep-id> is the id of the Grep object, with / replaced with _.

For fc:grep2 groups, the format is fc:grep2:<realm>:<urlencoded-grep-id>. <realm> is the domain name of the school owner. <urlencoded-grep-id> is the urlencoded id of the Grep object.

type (required, string)

The group type. fc:grep or fc:grep2, depending on the API used to access the groups.

displayName (required, string)

A human readable name for the group. This field is comes from the tittel field in the Grep database. E.g. Tredje årstrinn.

membership (optional, object)

The role of the current user in the group. This field is only present when requesting groups for a specific user.

public (required, boolean)

Whether the group is included in the list of public groups. Always true for Grep groups.

grep_type (required, string)

The type of Grep entry. Possible values are fagkoder, programomraader, utdanningsprogram and aarstrinn. Here is a complete list.

code (required, string)

The short form Grep code of a Grep entry. This filed comes from the kode field in the Grep database. E.g.: SAF0001.

Membership object#

The membership object contains information about the user’s role in the Grep group.

{
  "basic": "member"
}

It has the following fields:

basic (required, string)

The basic membership role of the user. This field is always member for Grep groups.