GCXONEDokumentation

Berichtsvorlage

Auf dieser Seite
  1. GET /report-templates
  2. Parameter
  3. Antworten
  4. POST /report-templates/execute
  5. Anfrage-Body
  6. Antworten
  7. GET /report-templates/{reportTemplateId}
  8. Parameter
  9. Antworten

Operationen an Berichtsvorlagen-Ressourcen. 3 Endpunkte, jeweils relativ zu https://api.nxgen.cloud/api/v1 und authentifiziert wie unter Authentifizierung.

GET /report-templates

Alle Berichtsvorlagen abrufen

Parameter

Name

In

Typ

Erforderlich

Beschreibung

hierarchyLevel

Abfrage

Zeichenkette

ja

Antworten

Status

Beschreibung

Inhalt

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

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

Berichtsmuster basierend auf Vorlage abrufen

Anfrage-Body

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

Antworten

Status

Beschreibung

Inhalt

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

json
{
  "data": {}
}

GET /report-templates/{reportTemplateId}

Berichtsvorlage nach Id abrufen

Parameter

Name

In

Typ

Erforderlich

Beschreibung

reportTemplateId

Pfad

String

ja

Antworten

Status

Beschreibung

Inhalt

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

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."
  }
}
War diese Seite hilfreich?

Vielen Dank — Ihr Feedback geht an das Team, das diese Seite betreut.