---
title: "Rapport Sjabloon"
source: /nl/gcxone/api/report-template
locale: nl
updated: 2026-09-04
---
Operaties op rapport‑sjabloon resources. 3 eindpunten, elk relatief ten opzichte van `https://api.nxgen.cloud/api/v1` en geauthenticeerd zoals beschreven onder [Authenticatie](/gcxone/api/authentication).

## GET /report-templates

Haal alle rapport‑sjablonen op

### Parameters

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| hierarchyLevel | query | string | ja |  |

### Responsen

| Status | Beschrijving | Body |
| --- | --- | --- |
| 200 | Succes |  |
| 400 | Ongeldige invoer |  |
| 401 | Niet toegestaan |  |
| 403 | Verboden |  |
| 404 | Niet gevonden |  |

Voorbeeld `200` respons:

```json
{
  "data": [
    {
      "uniqueId": "f8715fd9a65b473580d787a63dca6a5e",
      "type": "HealthReport",
      "serviceProviderIds": [],
      "hierarchyLevel": "site",
      "template": "<!DOCTYPE html>",
      "isActive": true,
      "userLevel": false,
      "cronSchedule": "0 4 * * *",
      "emailSubject": "{{reportName}}",
      "emailBody": "Dear Customer,,<br><br>We hope this message finds you well.<br><br>We are pleased to inform you that the {{reportName}} is now available for download. Please find the details of the report <a href='{{fileUrl}}'>here</a><br><br>Please note that this link will remain active for the next seven days only. Kindly ensure that you download and review the report within this timeframe."
    }
  ]
}
```

## POST /report-templates/execute

Haal rapportvoorbeeld op basis van sjabloon

### Verzoek body

```json
{
  "reportTemplateId": "string",
  "hierarchyId": "string",
  "startTime": "number",
  "endTime": "number",
  "onlySampleData": "boolean"
}
```

### Responsen

| Status | Beschrijving | Inhoud |
| --- | --- | --- |
| 200 | Succes |  |
| 400 | Ongeldige invoer |  |
| 401 | Niet toegestaan |  |
| 403 | Verboden |  |
| 404 | Niet gevonden |  |

Voorbeeld `200` respons:

```json
{
  "data": {}
}
```

## GET /report-templates/{reportTemplateId}

Rapporttemplate ophalen op Id

### Parameters

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| reportTemplateId | pad | string | ja |  |

### Responsen

| Status | Beschrijving | Inhoud |
| --- | --- | --- |
| 200 | Succes |  |
| 400 | Ongeldige invoer |  |
| 401 | Niet geautoriseerd |  |
| 403 | Verboden |  |
| 404 | Niet gevonden |  |

Voorbeeld `200` respons:

```json
{
  "data": {
    "uniqueId": "f8715fd9a65b473580d787a63dca6a5e",
    "type": "HealthReport",
    "serviceProviderIds": [],
    "hierarchyLevel": "site",
    "template": "<!DOCTYPE html>",
    "isActive": true,
    "dataSources": [
      {
        "parameters": [
          "customerId"
        ],
        "_id": "6683e770d05d712a670cee7d",
        "query": "[{\"$match\":{\"customerId\":\"{{customerId}}\"}}]",
        "collectionName": "Sensors",
        "output": "response",
        "metadata": {
          "fieldsRequiringSignedUrl": [
            {
              "field": "s3ImagePath",
              "bucketName": "nxg-reference-img-upload-test"
            }
          ]
        }
      }
    ],
    "emailSubject": "{{reportName}}",
    "emailBody": "Dear Customer,,<br><br>We hope this message finds you well.<br><br>We are pleased to inform you that the {{reportName}} is now available for download. Please find the details of the report <a href='{{fileUrl}}'>here</a><br><br>Please note that this link will remain active for the next seven days only. Kindly ensure that you download and review the report within this timeframe."
  }
}
```