Plantilla de Informe
En esta página
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 | sí |
Respuestas
Estado | Descripción | Cuerpo |
|---|---|---|
200 | Éxito | |
400 | Entrada inválida | |
401 | No autorizado | |
403 | Prohibido | |
404 | No Encontrado |
Ejemplo 200 respuesta:
{
"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
{
"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:
{
"data": {}
}GET /report-templates/{reportTemplateId}
Obtener plantilla de informe por Id
Parámetros
Nombre | En | Tipo | Obligatorio | Descripción |
|---|---|---|---|---|
reportTemplateId | ruta | cadena | sí |
Respuestas
Estado | Descripción | Cuerpo |
|---|---|---|
200 | Éxito | |
400 | Entrada inválida | |
401 | No autorizado | |
403 | Prohibido | |
404 | No Encontrado |
Ejemplo 200 respuesta:
{
"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."
}
}Gracias — sus comentarios llegan al equipo responsable de esta página.