GCXONEDocumentación

Plantilla de Informe

En esta página
  1. GET /report-templates
  2. Parámetros
  3. Respuestas
  4. POST /report-templates/execute
  5. Cuerpo de la solicitud
  6. Respuestas
  7. GET /report-templates/{reportTemplateId}
  8. Parámetros
  9. Respuestas

Operaciones sobre recursos de plantillas de informe. 3 puntos finales, cada uno relativo a https://api.nxgen.cloud/api/v1 y autenticado según lo descrito en Autenticación.

GET /report-templates

Obtener todas las plantillas de informe

Parámetros

Nombre

En

Tipo

Obligatorio

Descripción

hierarchyLevel

query

string

Respuestas

Estado

Descripción

Cuerpo

200

Éxito

400

Entrada inválida

401

No autorizado

403

Prohibido

404

No Encontrado

Ejemplo 200 respuesta:

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

Obtener muestra de informe basada en la plantilla

Cuerpo de la solicitud

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

Respuestas

Estado

Descripción

Cuerpo

200

Éxito

400

Entrada inválida

401

No autorizado

403

Prohibido

404

No Encontrado

Ejemplo 200 respuesta:

json
{
  "data": {}
}

GET /report-templates/{reportTemplateId}

Obtener plantilla de informe por Id

Parámetros

Nombre

En

Tipo

Obligatorio

Descripción

reportTemplateId

ruta

cadena

Respuestas

Estado

Descripción

Cuerpo

200

Éxito

400

Entrada inválida

401

No autorizado

403

Prohibido

404

No Encontrado

Ejemplo 200 respuesta:

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."
  }
}
¿Le ha resultado útil esta página?

Gracias — sus comentarios llegan al equipo responsable de esta página.