> For the complete documentation index, see [llms.txt](https://doc.evalytics.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.evalytics.nl/onderdelen/werkvormen.md).

# Topic types

When setting up evaluations, organisations have the option to setup questions within the evaluation for each topic type to the students/respondents. This is an existing functionality. Examples of topic types include lecture or seminar. Questions from a single question set can be set for each instructional format, or a separate question set per topic type.

Topic types can only be created in the highest (top) organisation and are then available to all lower-level organisations. The lower-level organisations can also make them (in)visible.

### Terms

| Name    | Type    | Required | Description                                                                                                                                                                                                                      |
| ------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| nameNl  | string  | Yes      | Name of the topic type in Dutch                                                                                                                                                                                                  |
| nameEn  | string  | Yes      | Name of the topic type in English                                                                                                                                                                                                |
| type    | string  | Yes      | A recognisable naming of the topic type in English. For example: exercise, theoryLesson. Can be used as an externalId.                                                                                                           |
| enabled | boolean | n.a.     | Indicates whether the topic type is available when creating a new course. Results and old courses remain unchanged. They are still visible there.                                                                                |
| parent  | int     | no       | Topic types can be linked to a parent. You can filter these with parent, and when retrieving item(s), it will return whether a topic type is linked to another topic type. The available parentId's are 1 (subject) or 7 (exam). |

## Get a list of topic types

<mark style="color:blue;">`GET`</mark> `https://api-portal.evalytics.nl/topicType`

#### Path Parameters

| Name   | Type    | Description         |
| ------ | ------- | ------------------- |
| parent | integer | Filter on parent id |

#### Query Parameters

| Name                 | Type    | Description                                              |
| -------------------- | ------- | -------------------------------------------------------- |
| showInvisible        | boolean | Show the topic types, made invisible by the organisation |
| populateQuestionSets | boolean | populate the linked questionSets (default = false)       |
| evalyticsTopics      | boolean | Include the default evalytics topicTypes                 |

{% tabs %}
{% tab title="200 " %}

```
{
  "metadata": {
    "timestamp": "2021-04-14T10:21:15.347Z",
    "resultSet": {
      "count": 32,
      "limit": 0,
      "skip": 0
    }
  },
  "results": [
    {
      "deleted": 0,
      "createdBy": "bootstrap",
      "modifiedBy": null,
      "parent": 1,
      "type": "minor",
      "nameNl": "Minor",
      "nameEn": "Minor",
      "organisation": 1,
      "topOrganisation": 1,
      "id": 3,
      "createdAt": "2018-09-11T18:11:43.000Z",
      "updatedAt": "2018-09-11T18:11:43.000Z"
    },
    {
      "deleted": 0,
      "createdBy": "bootstrap",
      "modifiedBy": null,
      "parent": 1,
      "type": "project",
      "nameNl": "Project",
      "nameEn": "Project",
      "organisation": 1,
      "topOrganisation": 1,
      "id": 4,
      "createdAt": "2018-09-11T18:11:43.000Z",
      "updatedAt": "2018-09-11T18:11:43.000Z"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Get topic type

<mark style="color:blue;">`GET`</mark> `https://api-portal.evalytics.nl/topicType/:id`

#### Path Parameters

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| id   | integer | Id of the topic type |

{% tabs %}
{% tab title="200 " %}

```
{
  "deleted": 0,
  "createdBy": "bootstrap",
  "modifiedBy": null,
  "parent": 1,
  "type": "minor",
  "nameNl": "Minor",
  "nameEn": "Minor",
  "organisation": 1,
  "topOrganisation": 1,
  "id": 3,
  "createdAt": "2018-09-11T18:11:43.000Z",
  "updatedAt": "2018-09-11T18:11:43.000Z",
  "disabled": false,
  "resultIndex": null,
  "questionSets": [
    {
      "id": 1,
      "name": "Standaard"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Add topic type

<mark style="color:green;">`POST`</mark> `https://api-portal.evalytics.nl/topicType`

{% tabs %}
{% tab title="200 " %}

```
{
  "organisation": 100,
  "topOrganisation": 100,
  "type": "subject",
  "nameNl": "Cursus",
  "nameEn": "Subject",
  "id": 1,
  "name": "Subject",
  "enabled": true,
  "resultIndex": null,
  "parent": null,
  "questionSets": [{
    "id": 123,
    "name": "Standaard"
  }]
}
```

{% endtab %}
{% endtabs %}

```json
{
    "type": (string - required),
    "nameNl": (string - required),
    "nameEn": (string - required),
    "questionSets": [{
        "id": (int)
    }],
    "parent": (int)
}
```

{% hint style="info" %}
Parent: Can be 1 (subject - default) or 7 (exam)
{% endhint %}

## Add questionSets to topic type

<mark style="color:green;">`POST`</mark> `https://api-portal.evalytics.nl/topicType/:id/updateQuestionSet`

#### Path Parameters

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| id   | integer | Id of the topic type |

{% tabs %}
{% tab title="200 " %}

```
{
  "organisation": 100,
  "topOrganisation": 100,
  "type": "subject",
  "nameNl": "Cursus",
  "nameEn": "Subject",
  "id": 1,
  "name": "Subject",
  "enabled": true,
  "questionSets": [{
    "id": 123,
    "name": "Standaard"
  }]
}
```

{% endtab %}
{% endtabs %}

```json
{
    "questionSets": [{
        "id": (int)
    }]
}
```

## Make a topic type invisible for a specific organisation.

<mark style="color:green;">`POST`</mark> `https://api-portal.evalytics.nl/topicType/:id/updateDisabled`

#### Path Parameters

| Name | Type   | Description          |
| ---- | ------ | -------------------- |
| id   | number | Id of the topic type |

{% tabs %}
{% tab title="200 " %}

```
{
  "organisation": 100,
  "topOrganisation": 100,
  "type": "subject",
  "nameNl": "Cursus",
  "nameEn": "Subject",
  "id": 1,
  "name": "Subject",
  "enabled": true,
  "questionSets": [{
    "id": 123,
    "name": "Standaard"
  }]
}
```

{% endtab %}
{% endtabs %}

```json
{
    "setDisabled": (boolean - required)
}
```
