GCXONEDocumentation

Modèle de rapport

Sur cette page
  1. GET /report-templates
  2. Paramètres
  3. Réponses
  4. POST /report-templates/execute
  5. Corps de la demande
  6. Réponses
  7. GET /report-templates/{reportTemplateId}
  8. Paramètres
  9. Réponses

Opérations sur les ressources de modèle de rapport. 3 points de terminaison, chacun relatif à https://api.nxgen.cloud/api/v1 et authentifié comme décrit sous Authentification.

GET /report-templates

Récupérer tous les modèles de rapport

Paramètres

Nom

Dans

Type

Obligatoire

Description

hierarchyLevel

requête

chaîne

oui

Réponses

Statut

Description

Corps

200

Succès

400

Entrée invalide

401

Non autorisé

403

Interdit

404

Pas trouvé

Exemple 200 réponse :

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

Obtenir un exemple de rapport basé sur le modèle

Corps de la demande

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

Réponses

Statut

Description

Corps

200

Succès

400

Entrée invalide

401

Non autorisé

403

Interdit

404

Pas trouvé

Exemple 200 réponse:

json
{
  "data": {}
}

GET /report-templates/{reportTemplateId}

Obtenir le modèle de rapport par Id

Paramètres

Nom

Dans

Type

Obligatoire

Description

reportTemplateId

chemin

chaîne

oui

Réponses

Statut

Description

Corps

200

Succès

400

Entrée invalide

401

Non autorisé

403

Interdit

404

Pas trouvé

Exemple 200 réponse:

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."
  }
}
Cette page vous a-t-elle été utile ?

Merci — votre retour est transmis à l’équipe responsable de cette page.