# Periodic export

## Enable the periodic data export feature

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

Be sure to save the private key in a safe place, you must be able to provide it when downloading exported files.

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

```javascript
{
  "enabled": boolean,
  "privateKey": string
}
```

{% endtab %}
{% endtabs %}

## Download a single periodically exported file

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

#### Query Parameters

| Name                                         | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| file<mark style="color:red;">\*</mark>       | String  | <p>Possible values:</p><p><code>answerSetResult</code>, <code>answerSetTextResult</code>, <code>evaluation</code>, <code>evaluationBlock</code>, <code>evaluationBlockQuestion</code>, <code>evaluationBlockQuestionSet</code>, <code>evaluationBlockTeacher</code>, <code>evaluationCode</code>, <code>evaluationFeedback</code>, <code>evaluationFeedbackField</code>, <code>evaluationFeedbackTask</code>, <code>evaluationLabel</code>, <code>evaluationToLabel</code>, <code>organisation</code>, <code>question</code>, <code>questionLabel</code>, <code>questionScale</code>, <code>questionScaleValue</code>, <code>questionToLabel</code>, <code>subject</code>, <code>subjectGrade</code>, <code>subjectGradePeriod</code>, <code>subjectLabel</code>, <code>subjectToLabel</code>, <code>subjectTopicType</code>, <code>subjectTopicTypeTeacher</code>, <code>teacher</code>, <code>user</code>, <code>genericTopic</code>, <code>genericTopicToLabel</code>, <code>genericTopicLabel</code>, <code>genericTopicTopicType</code>, <code>topicType</code>, <code>year</code>, <code>period</code>, <code>subjectPeriod</code></p> |
| fileType<mark style="color:red;">\*</mark>   | String  | <p>Possible values:</p><p><code>csv</code>, <code>json</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| privateKey<mark style="color:red;">\*</mark> | String  | The private key (encryption key) that was created when the periodic export feature was enabled                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| parseJsonDataTypes                           | Boolean | Ensures the data types in the JSON files are conform the data model                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

{% tabs %}
{% tab title="200: OK Returns the file as an attachment" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Download all periodically exported files as a zip

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

#### Query Parameters

| Name                                         | Type    | Description                                                                                    |
| -------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------- |
| fileType<mark style="color:red;">\*</mark>   | String  | <p>Possible values:</p><p><code>csv</code>, <code>json</code></p>                              |
| privateKey<mark style="color:red;">\*</mark> | String  | The private key (encryption key) that was created when the periodic export feature was enabled |
| parseJsonDataTypes                           | Boolean | Ensures the data types in the JSON files are conform the data model                            |

{% tabs %}
{% tab title="200: OK Returns the zip-file as an attachment" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Disable the periodic data export feature

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

#### Query Parameters

| Name           | Type    | Description                                                       |
| -------------- | ------- | ----------------------------------------------------------------- |
| deleteSettings | Boolean | Removes previously exported files and invalidates the private key |

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

```javascript
{
    "enabled": boolean
}
```

{% endtab %}
{% endtabs %}

## Data model

<figure><img src="/files/p3bnSg8buUljJYyGTVxj" alt=""><figcaption></figcaption></figure>

{% file src="/files/p3bnSg8buUljJYyGTVxj" %}
The SVG in full size
{% endfile %}

{% file src="/files/AQqC8X7Rs8PiupneORPb" %}
For use with <https://diagramplus.com/>
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.evalytics.nl/onderdelen/periodic-export.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
