GCXONEDokumentation

Bericht

Auf dieser Seite
  1. POST /reports
  2. Anfragekörper
  3. Antworten
  4. POST /reports/execute
  5. Anfragekörper
  6. Antworten
  7. POST /reports/filter
  8. Anfragekörper
  9. Antworten
  10. POST /reports/sendEmail
  11. Anfragekörper
  12. Antworten
  13. GET /reports/{reportId}
  14. Parameter
  15. Antworten
  16. PUT /reports/{reportId}
  17. Parameter
  18. Anfragekörper
  19. Antworten
  20. DELETE /reports/{reportId}
  21. Parameter
  22. Antworten
  23. GET /reports/{reportId}/preview
  24. Parameter
  25. Antworten

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

POST /reports

Bericht hinzufügen

Anfragekörper

json
{
  "name": "string",
  "reportTemplateId": "string",
  "description": "string",
  "template": "string",
  "healthTemplate": "Basic | Plus | Advanced",
  "cronSchedule": "string",
  "hierarchyId": "string",
  "isActive": "boolean",
  "userIds": [
    "string"
  ],
  "roleIds": [
    "string"
  ],
  "emailIds": [
    "string"
  ],
  "emailSubject": "string",
  "emailBody": "string",
  "lang": "string",
  "timezone": "string",
  "momentsTimeZoneCountryName": "string"
}

Antworten

Status

Beschreibung

Inhalt

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

json
{
  "result": "reportId"
}

POST /reports/execute

Einen Bericht auslösen oder Beispieldaten für die Vorlage abrufen

Anfragekörper

json
{
  "jobId": "string",
  "startTime": "number",
  "endTime": "number",
  "onlySampleData": "boolean",
  "cronSchedule": "string",
  "jobConfig": {
    "any": "string"
  }
}

Antworten

Status

Beschreibung

Inhalt

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

json
{
  "data": {
    "response": [
      {
        "site": "Muster HQ BLR",
        "count": 5,
        "events": [
          {
            "key": "camera.health.fail",
            "value": 2
          },
          {
            "key": "camera.health.normal",
            "value": 3
          }
        ],
        "siteId": "0896302cceb04a059fa6aff014e51ac6",
        "sensors": [
          {
            "name": "5N/A",
            "deviceType": "camera",
            "manafacturer": "HIKVISION",
            "s3ImagePath": "",
            "event": "camera.health.fail",
            "associatedDeviceName": "Network Video Recorder",
            "eventTime": 1719964871485
          },
          {
            "name": "IPCamera 04",
            "deviceType": "camera",
            "manafacturer": "HIKVISION",
            "s3ImagePath": "https://nxg-reference-img-upload-test.s3-eu-central-1.amazonaws.com/0896302cceb04a059fa6aff014e51ac6/df0c6f6d4e5e4e9f8e6732121f14b5ee/64d478a78a9a4400ba27876ef71cf84e.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA2B4BNPFBH2CVMGRH%2F20240703%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240703T082324Z&X-Amz-Expires=604800&X-Amz-Signature=67128d2e4353f760891b4f294dcfc1f1b09b44a8b87cac7fe14497b11ac1c51e&X-Amz-SignedHeaders=host",
            "event": "camera.health.fail",
            "associatedDeviceName": "Network Video Recorder",
            "eventTime": 1719964872557
          }
        ]
      }
    ]
  },
  "serviceProvider": {
    "uniqueId": "e7f417cf4a434b5093a8173cdb50005f",
    "email": "admin@web02.io",
    "persona": {
      "address": {},
      "contact": {},
      "profile": {
        "business": [],
        "photos": [
          "https://nxg-reference-img-upload-test.s3-eu-central-1.amazonaws.com/e4299bcb77bc4a6780f0473ff03f72fd/e7f417cf4a434b5093a8173cdb50005f.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA2B4BNPFBH2CVMGRH%2F20240703%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240703T082324Z&X-Amz-Expires=86400&X-Amz-Signature=77f79aee130a8e5083cf88ff9befb0714f5fd2526c115a27db6bbe096ed1799f&X-Amz-SignedHeaders=host"
        ],
        "tags": [],
        "followers": [],
        "s3ImagePath": "e4299bcb77bc4a6780f0473ff03f72fd/e7f417cf4a434b5093a8173cdb50005f.png"
      }
    },
    "name": "NXG Web 02",
    "description": ""
  },
  "report": {
    "name": "Health Check Failure Reports",
    "description": "This report provides information about the cameras which are not operational.",
    "type": "HealthReport",
    "isActive": true
  }
}

POST /reports/filter

Berichtsliste mit Filterung, Sortierung und Paginierung abrufen.

Anfragekörper

Berichtfilterung und -sortierung

json
{
  "filters": [
    {
      "columnName": "string (required)",
      "type": "distinctList | date | number | StringConditionFilter (required)",
      "filter": "object (required)"
    }
  ],
  "sortOrder": [
    {
      "columnName": "string",
      "isAscending": "boolean"
    }
  ],
  "primaryColumns": [
    "string"
  ],
  "hierarchyLevel": "string",
  "hierarchyId": "string",
  "nPerPage": "number",
  "pageNumber": "number",
  "isConfigDetailRequired": "boolean",
  "getConfig": "boolean",
  "getChildOrParent": "boolean"
}

Antworten

Status

Beschreibung

Body

200

Erfolg

Objekt

204

Kein Inhalt

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

Beispiel 200 Antwort:

json
{
  "dataResult": [
    {
      "name": "Health Check Failure Reports",
      "type": "HealthReportCustomer",
      "isActive": true,
      "createdOn": 1719834171704
    },
    {
      "name": "Health Check Failure Reports",
      "type": "HealthReportCustomer",
      "isActive": true,
      "createdOn": 1719822647976
    },
    {
      "name": "Health Check Failure Reports",
      "type": "HealthReport",
      "isActive": true,
      "createdOn": 1719668666364
    }
  ],
  "totalRecordsCount": 3
}

POST /reports/sendEmail

E‑Mail senden

Anfragekörper

json
{
  "subject": "string",
  "emailBody": "string",
  "emailList": "string",
  "type": "string",
  "emailAttachment": {
    "fileName": "string",
    "file": "string"
  }
}

Antworten

Status

Beschreibung

Body

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

500

interner Serverfehler

Beispiel 200 Antwort:

json
{
  "message": "Accepted for email transfer"
}

GET /reports/{reportId}

Bericht abrufen

Parameter

Name

In

Typ

Erforderlich

Beschreibung

reportId

path

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": "2f76ca1411ef439e9d69ad3730ec3408",
    "name": "Test Update",
    "type": "HealthReportCustomer",
    "description": "This report provides information about the cameras which are not operational.",
    "serviceProviderId": "e7f417cf4a434b5093a8173cdb50005f",
    "template": "",
    "cronSchedule": "0 4 * * *",
    "hierarchyLevel": "serviceprovider",
    "hierarchyId": "e7f417cf4a434b5093a8173cdb50005f",
    "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"
            }
          ]
        }
      }
    ],
    "roleIds": [],
    "userIds": [
      "70cb24d36f86424b802873af7e78c2d3"
    ],
    "emailIds": [
      "dev@nxgen.io"
    ],
    "emailSubject": "{{reportName}}",
    "emailBody": "Dear Customer,,<br><br>I hope this message finds you well.<br><br>I am 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."
  }
}

PUT /reports/{reportId}

Bericht aktualisieren

Parameter

Name

Im

Typ

Erforderlich

Beschreibung

reportId

Pfad

Zeichenkette

ja

Anfragekörper

json
{
  "name": "string",
  "reportTemplateId": "string",
  "description": "string",
  "template": "string",
  "healthTemplate": "Basic | Plus | Advanced",
  "cronSchedule": "string",
  "hierarchyId": "string",
  "isActive": "boolean",
  "userIds": [
    "string"
  ],
  "roleIds": [
    "string"
  ],
  "emailIds": [
    "string"
  ],
  "emailSubject": "string",
  "emailBody": "string",
  "lang": "string",
  "timezone": "string",
  "momentsTimeZoneCountryName": "string"
}

Antworten

Status

Beschreibung

Inhalt

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

json
{
  "result": "reportId"
}

DELETE /reports/{reportId}

Bericht löschen

Parameter

Name

Im

Typ

Erforderlich

Beschreibung

reportId

Pfad

Zeichenkette

ja

Antworten

Status

Beschreibung

Body

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200 Antwort:

json
{
  "result": "reportId"
}

GET /reports/{reportId}/preview

Vorschau für einen Bericht

Parameter

Name

In

Typ

Erforderlich

Beschreibung

reportId

Pfad

String

ja

Antworten

Status

Beschreibung

Body

200

Erfolg

400

Ungültige Eingabe

401

Nicht autorisiert

403

Verboten

404

Nicht gefunden

Beispiel 200Antwort:

json
{
  "fileUrl": "https://nxgen.cloud/file"
}
War diese Seite hilfreich?

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