From 991669b19dd08364297047f7966b6f5b5e7e8c81 Mon Sep 17 00:00:00 2001 From: Vincent LE TOUX Date: Sat, 18 Mar 2023 09:05:32 +0100 Subject: [PATCH] add KPI history table --- PingCastlePowerBIConnector.pq | 31 +++++++++++++++++++++++++++-- PingCastlePowerBIConnector.query.pq | 1 + 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/PingCastlePowerBIConnector.pq b/PingCastlePowerBIConnector.pq index 9f12805..7121e95 100644 --- a/PingCastlePowerBIConnector.pq +++ b/PingCastlePowerBIConnector.pq @@ -41,8 +41,8 @@ PingCastleEntepriseType = type function ( Test = (url as text) => let - t = CallFunction(url, "GetReport", 26617) - //t = GetEntity(url, "Report") + //t = CallFunction(url, "GetReport", 26617) + t = GetEntity(url, "KPIHistory") //t=PingCastleEnteprise.CallAPIAllDomains(url, "Reports") in t; @@ -274,6 +274,32 @@ AADEventType= type table [ identity = text ]; +KPIHistoryType = type table [ + id = number, + day = datetime, + ownerID = number, + kpI111Measure = number, + kpI112Measure = number, + kpI113Measure = number, + kpI114Measure = number, + kpI121Measure = number, + kpI122Measure = number, + kpI123Measure = number, + kpI124Measure = number, + kpI131Measure = number, + kpI132Measure = number, + kpI133Measure = number, + kpI134Measure = number, + kpI211Measure = number, + kpI212Measure = number, + kpI213Measure = number, + kpI214Measure = number, + kpI221Measure = number, + kpI222Measure = number, + kpI223Measure = number, + kpI224Measure = number +]; + SchemaTable = #table({"Entity", "Type", "ApiEndpoint"}, { {"Domains", DomainType , "Domains"}, {"ActionPlans", ActionPlanType, "ActionPlan" }, @@ -292,6 +318,7 @@ SchemaTable = #table({"Entity", "Type", "ApiEndpoint"}, { {"AADReports", AADReportType , "AADReports"}, {"LastAADReports", AADReportType , "AADReports/OnlyLastReports"}, {"AzureADs", AzureADType , "AzureADs"}, + {"KPIHistory", KPIHistoryType , "KPIHistory"}, {"GetReport", 0 , "Reports/{id}"}, {"GetAADReport", 0 , "AADReports/{id}"} diff --git a/PingCastlePowerBIConnector.query.pq b/PingCastlePowerBIConnector.query.pq index cfcb8b3..c5065f2 100644 --- a/PingCastlePowerBIConnector.query.pq +++ b/PingCastlePowerBIConnector.query.pq @@ -1,5 +1,6 @@ // Use this file to write queries to test your data connector let result = PingCastleEnteprise.Contents("https://demo.pingcastle.com") + //result = PingCastleEnteprise.Contents("https://localhost:5003") in result