{"id":231223,"date":"2023-10-13T08:30:00","date_gmt":"2023-10-13T07:30:00","guid":{"rendered":"https:\/\/www.virtualworlduk.co.uk\/wordp\/?p=231223"},"modified":"2023-10-19T11:58:32","modified_gmt":"2023-10-19T10:58:32","slug":"vmware-skyline-an-adventure-with-api-and-powerbi-part-2","status":"publish","type":"post","link":"https:\/\/www.virtualworlduk.co.uk\/wordp\/vmware-skyline-an-adventure-with-api-and-powerbi-part-2\/","title":{"rendered":"VMware Skyline \u2013 An Adventure with API and PowerBI \u2013 Part 2"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"231223\" class=\"elementor elementor-231223\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-579504e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"579504e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-173d68f\" data-id=\"173d68f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a349a0a elementor-widget elementor-widget-text-editor\" data-id=\"a349a0a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This is Part 2 of this series, where I take an adventure through using Skyline APIs with PowerBI.\u00a0 The first part of this series looked at making sure you had the correct rights within Skyline Advisor, how to generate the Access_Token that is required to access the API data and how to test that using the GraphiQL capability built into the Skyline Advisor web page.<\/p><p>This part of the series is focused on how to get the data into PowerBI from the Skyline API.\u00a0 We will not be automating the process from start to finish in this part of the series as that would require us to automate the generation of the Access_Token which will be covered in a later part of the series.<\/p><p>Part 1 of this series can be found here:\u00a0<br \/><a href=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/2023\/10\/12\/vmware-skyline-an-adventure-with-api-and-powerbi-part-1\/\">https:\/\/www.virtualworlduk.co.uk\/wordp\/2023\/10\/12\/vmware-skyline-an-adventure-with-api-and-powerbi-part-1\/<\/a><\/p><p>Part 3 of this series can be found here:<br \/><a href=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/2023\/10\/19\/vmware-skyline-an-adventure-with-api-and-powerbi-part-3\/\">https:\/\/www.virtualworlduk.co.uk\/wordp\/2023\/10\/19\/vmware-skyline-an-adventure-with-api-and-powerbi-part-3\/<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4de53ec elementor-widget elementor-widget-heading\" data-id=\"4de53ec\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Getting Data Into PowerBI<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-328dbfc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"328dbfc\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3b6b5d6\" data-id=\"3b6b5d6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6e4c0a4 elementor-widget elementor-widget-text-editor\" data-id=\"6e4c0a4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As mentioned at the end of the last section, we&#8217;re going to take a look at how to get the data into PowerBI from the Skyline API but at this stage we will be manually adding the access_token &#8211; this will mean that you&#8217;ll need to update the access_token every time you refresh the PowerBI data (unless you refresh the data within about 5 minutes of generating the access_token)<\/p><p>We&#8217;ll be looking through the process of this by utilising the &#8216;Advanced Editor&#8217; in PowerBI, and we&#8217;ll try to break down each item to explain a little more about what we&#8217;re trying to do.\u00a0 You can also skip to the end of this part where I&#8217;ll provide the full code from the &#8216;Advanced Editor&#8217;.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2f026a3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2f026a3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ecbe157\" data-id=\"ecbe157\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7c9c61f elementor-widget elementor-widget-heading\" data-id=\"7c9c61f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Accessing the Advanced Editor in PowerBI<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3c38b59 elementor-widget elementor-widget-text-editor\" data-id=\"3c38b59\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This is the process that I would do to get into the Advanced Editor in a new PowerBI file.<\/p><p>Start up PowerBI Desktop, click on the &#8216;Transform data&#8217; entry at the top of the screen &#8211; this will take you to the Power Query Editor.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8639df1 elementor-widget elementor-widget-image\" data-id=\"8639df1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"640\" height=\"153\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_56_35-Untitled-Power-Query-Editor-1024x244.png\" class=\"attachment-large size-large wp-image-231225\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_56_35-Untitled-Power-Query-Editor-1024x244.png 1024w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_56_35-Untitled-Power-Query-Editor-300x71.png 300w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_56_35-Untitled-Power-Query-Editor-768x183.png 768w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_56_35-Untitled-Power-Query-Editor.png 1396w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7a708bd elementor-widget elementor-widget-text-editor\" data-id=\"7a708bd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As this is a new file, you won&#8217;t see any queries listed.<\/p><p>Click the drop down arrow by the &#8216;New Source&#8217; entry at the top of the screen, to open a menu.\u00a0 From the menu select &#8216;Blank Query&#8217;<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0ff161b elementor-widget elementor-widget-image\" data-id=\"0ff161b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"98\" height=\"300\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_58_50--98x300.png\" class=\"attachment-medium size-medium wp-image-231226\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_58_50--98x300.png 98w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-11_58_50-.png 149w\" sizes=\"(max-width: 98px) 100vw, 98px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-022dd4a elementor-widget elementor-widget-text-editor\" data-id=\"022dd4a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This will now create a new query called Query1.<\/p><p>To access the Advanced Editor, we will now right mouse click on Query1 and select the &#8216;Advanced Editor&#8217; option.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cd11037 elementor-widget elementor-widget-image\" data-id=\"cd11037\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"193\" height=\"300\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_01_06-Untitled-Power-Query-Editor-193x300.png\" class=\"attachment-medium size-medium wp-image-231227\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_01_06-Untitled-Power-Query-Editor-193x300.png 193w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_01_06-Untitled-Power-Query-Editor.png 278w\" sizes=\"(max-width: 193px) 100vw, 193px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dfd16bc elementor-widget elementor-widget-text-editor\" data-id=\"dfd16bc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You should now be presented with the &#8216;Advanced Editor&#8217; pane that should look similar to below<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-484a056 elementor-widget elementor-widget-image\" data-id=\"484a056\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"463\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_02_53-Untitled-Power-Query-Editor.png\" class=\"attachment-large size-large wp-image-231228\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_02_53-Untitled-Power-Query-Editor.png 741w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_02_53-Untitled-Power-Query-Editor-300x217.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f87bdd7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f87bdd7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fe4cd41\" data-id=\"fe4cd41\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-df4c657 elementor-widget elementor-widget-heading\" data-id=\"df4c657\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Body Information<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f65385 elementor-widget elementor-widget-text-editor\" data-id=\"8f65385\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The first part of the code that we&#8217;ll be entering is the code that we&#8217;ll use to choose exactly what data we&#8217;ll be asking to have returned from the API connection.<\/p><p>We&#8217;ll call this the &#8216;body&#8217; of the data.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b78b6a2 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"b78b6a2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-javascript'>    body = &quot;{\r\n       &quot;&quot;query&quot;&quot;:&quot;&quot; \r\n         {\r\n       activeFindings(limit: 1000) {\r\n         findings {\r\n           findingId\r\n           accountId\r\n           findingDisplayName\r\n           severity\r\n           products\r\n           findingDescription\r\n           findingImpact\r\n           recommendations\r\n           kbLinkURLs\r\n           recommendationsVCF\r\n           kbLinkURLsVCF\r\n           categoryName\r\n           findingTypes\r\n           firstObserved\r\n           totalAffectedObjectsCount\r\n          }\r\n           totalRecords\r\n           timeTaken\r\n        }\r\n      }&quot;&quot;,&quot;&quot;variables&quot;&quot;:{}}&quot;,<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b120c7b elementor-widget elementor-widget-text-editor\" data-id=\"b120c7b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you head over to the VMware Skyline documentation here:\u00a0 <a href=\"https:\/\/docs.vmware.com\/en\/VMware-Skyline\/1.0\/skyline-api-guide\/GUID-92213394-4ADD-4A35-BD36-DC77397E249D.html\">https:\/\/docs.vmware.com\/en\/VMware-Skyline\/1.0\/skyline-api-guide\/GUID-92213394-4ADD-4A35-BD36-DC77397E249D.html<\/a><\/p><p>You&#8217;ll notice that what we are entering in our body is similar to the POST command that you would enter into the GraphiQL explorer interface in Skyline Advisor to take a look at the active findings.<\/p><p>In the above code block we are saying that we would like to query the data to gather the active findings with a limit of 1,000 (although the limit may only be 200).<\/p><p>The fields in the results that we would like to gather are listed under the &#8216;findings&#8217; section.<\/p><p>If you notice the first part of the code includes the variable &#8216;body&#8217;.\u00a0 This is therefore saying that the variable &#8216;body&#8217; contains all of the other text in this first piece of code.\u00a0 This will allow us to use the variable later in our code rather than entering all of the information.\u00a0 This makes is easier to read the code and also allows for the variable to be reused multiple times later in the code, if needed.<\/p><p>This part of the code can be pasted into the &#8216;Advanced Editor&#8217; under &#8216;let&#8217; but replacing the &#8216;source&#8217; information already listed.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-855a3f1 elementor-widget elementor-widget-image\" data-id=\"855a3f1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"605\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_15_25-Untitled-Power-Query-Editor.png\" class=\"attachment-large size-large wp-image-231229\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_15_25-Untitled-Power-Query-Editor.png 738w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-12_15_25-Untitled-Power-Query-Editor-300x284.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b0eb857 elementor-widget elementor-widget-text-editor\" data-id=\"b0eb857\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Do not worry about the errors being shown at the moment, this is because the query isn&#8217;t complete.\u00a0 We&#8217;ll continue to build up the query in the next section.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ab3ed0c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ab3ed0c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4fc6aca\" data-id=\"4fc6aca\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c10ae94 elementor-widget elementor-widget-heading\" data-id=\"c10ae94\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Data Information<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-43b35f4 elementor-widget elementor-widget-text-editor\" data-id=\"43b35f4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The next section that we will be adding to the query is the Data section.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f1fe097 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"f1fe097\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-javascript'>Data= Web.Contents(&quot;https:\/\/skyline.vmware.com\/public\/api\/data&quot;,[Content=Text.ToBinary(body),Headers=[#&quot;Content-Type&quot;=&quot;application\/json&quot;,#&quot;Authorization&quot;=&quot;Bearer YOUR_ACCESS_TOKEN&quot;,#&quot;accept&quot; = &quot;text\/plain&quot;]]),<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-add7a4b elementor-widget elementor-widget-text-editor\" data-id=\"add7a4b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This is the part of the query that explains where we are going to get the information from and how we are going to connect.<\/p><p>Make sure that you change the &#8216;YOUR_ACCESS_TOKEN&#8217; entry across to the access token that you generated in part 1&#8230; also remembering that the access token only has a limited life and therefore may need to be regenerated to run the query.<\/p><p>This is the section that is likely to need to be edited before each refresh of the data and will be part of the area that we look at when we try to automate the generation of the access token in a later part.<\/p><p>If you notice on this code, we are creating the variable &#8216;Data&#8217; (which we&#8217;ll use later) and in the process we are saying to utilise the information we have entered in the &#8216;body&#8217; variable at the top of the query.<\/p><p>Your query should be looking similar to below<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2caffdf elementor-widget elementor-widget-image\" data-id=\"2caffdf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"604\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_01_59-Advanced-Editor.png\" class=\"attachment-large size-large wp-image-231233\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_01_59-Advanced-Editor.png 738w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_01_59-Advanced-Editor-300x283.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3c9c144 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3c9c144\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-516709b\" data-id=\"516709b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1f2da5c elementor-widget elementor-widget-heading\" data-id=\"1f2da5c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Additional Items<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9e80a59 elementor-widget elementor-widget-text-editor\" data-id=\"9e80a59\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The additional items section is where we pull the previous information together.\u00a0 To avoid us having to have all of the previous information added as part of the same lines as the following information, we have been assigning the previous information to variables which will then be used in the following code.\u00a0 When it comes to updating the information or making changes, we therefore only need to make changes in the variable entries rather than, potentially, multiple times throughout the rest of the query.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-12716de elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"12716de\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-javascript'>DataRecord = Json.Document(Data),\r\n    Source=DataRecord,\r\n    data = Source[data],<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f80820 elementor-widget elementor-widget-text-editor\" data-id=\"8f80820\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this piece of code we are creating another variable, this time called &#8216;DataRecord&#8217;.\u00a0 The DataRecord variable is telling the query that we want the results to come back to us as a Json document and we want it to include the information collected in the &#8216;Data&#8217; variable.<\/p><p>We are then going to assign the result of the DataRecord variable to the &#8216;Source&#8217; variable.\u00a0 A new &#8216;data&#8217; variable is created which is going to include the Source.<\/p><p>Our query should now be looking similar to below<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bd7ab9f elementor-widget elementor-widget-image\" data-id=\"bd7ab9f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"604\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_14_55-Advanced-Editor.png\" class=\"attachment-large size-large wp-image-231234\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_14_55-Advanced-Editor.png 738w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_14_55-Advanced-Editor-300x283.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-680d8a4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"680d8a4\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-712cf56\" data-id=\"712cf56\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4fa3619 elementor-widget elementor-widget-heading\" data-id=\"4fa3619\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Organising the data in PowerBI<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-41fc303 elementor-widget elementor-widget-text-editor\" data-id=\"41fc303\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The last part of this query is where we start to transform the data collected within PowerBI<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-25edf3b elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"25edf3b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-javascript'>activeFindings = data[activeFindings],\r\n    findings = activeFindings[findings],\r\n    #&quot;Converted to Table&quot; = Table.FromList(findings, Splitter.SplitByNothing(), null, null, ExtraValues.Error),\r\n    #&quot;Expanded Column1&quot; = Table.ExpandRecordColumn(#&quot;Converted to Table&quot;, &quot;Column1&quot;, {&quot;findingId&quot;, &quot;accountId&quot;, &quot;findingDisplayName&quot;, &quot;severity&quot;, &quot;products&quot;, &quot;findingDescription&quot;, &quot;findingImpact&quot;, &quot;recommendations&quot;, &quot;kbLinkURLs&quot;, &quot;recommendationsVCF&quot;, &quot;kbLinkURLsVCF&quot;, &quot;categoryName&quot;, &quot;findingTypes&quot;, &quot;firstObserved&quot;, &quot;totalAffectedObjectsCount&quot;}, {&quot;findingId&quot;, &quot;accountId&quot;, &quot;findingDisplayName&quot;, &quot;severity&quot;, &quot;products&quot;, &quot;findingDescription&quot;, &quot;findingImpact&quot;, &quot;recommendations&quot;, &quot;kbLinkURLs&quot;, &quot;recommendationsVCF&quot;, &quot;kbLinkURLsVCF&quot;, &quot;categoryName&quot;, &quot;findingTypes&quot;, &quot;firstObserved&quot;, &quot;totalAffectedObjectsCount&quot;}),\r\n    #&quot;Expanded products&quot; = Table.ExpandListColumn(#&quot;Expanded Column1&quot;, &quot;products&quot;),\r\n    #&quot;Extracted Values&quot; = Table.TransformColumns(#&quot;Expanded products&quot;, {&quot;recommendations&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values1&quot; = Table.TransformColumns(#&quot;Extracted Values&quot;, {&quot;kbLinkURLs&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values2&quot; = Table.TransformColumns(#&quot;Extracted Values1&quot;, {&quot;recommendationsVCF&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values3&quot; = Table.TransformColumns(#&quot;Extracted Values2&quot;, {&quot;kbLinkURLsVCF&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values4&quot; = Table.TransformColumns(#&quot;Extracted Values3&quot;, {&quot;findingTypes&quot;, each Text.Combine(List.Transform(_, Text.From)), type text})<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-13850c2 elementor-widget elementor-widget-text-editor\" data-id=\"13850c2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The data received from the API query has come into PowerBI as a list.\u00a0 A list can be useful in some circumstances but we actually need it as a table so that we can use the data in a report.\u00a0 So the first thing we need to do is perform a convert from list to table.<\/p><p>Once this is converted into a table, we would have a single column where each collected record would just have an entry of record, so the next step is to expand the column that has been created to see what other data we have available.<\/p><p>We now have a lot of columns showing in our table, which should equate to the same names we entered in the &#8216;body&#8217; variable earlier.\u00a0 If we were to look across to the &#8216;products&#8217; column, we would see that we just have entries called &#8216;List&#8217;, so the next step is going to expand that list.\u00a0 That column should now show the names of the endpoints from Skyline.\u00a0 This will have created multiple entries for each finding, one for each endpoint associated with the finding.<\/p><p>If we were to look through the next step in the query, you would see that there is a list associated with &#8216;recommendations&#8217;, &#8216;kbLinkURLs&#8217;, &#8216;recommendationsVCF&#8217;, &#8216;kbLinkURLsVCF&#8217; and &#8216;findingTypes&#8217;.\u00a0 The final parts of the code above expand each of these lists to allow us to see all of the data.<\/p><p>Your query should now look similar to below<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c4fdfaf elementor-widget elementor-widget-image\" data-id=\"c4fdfaf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"453\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_29_27-Advanced-Editor.png\" class=\"attachment-large size-large wp-image-231236\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_29_27-Advanced-Editor.png 982w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_29_27-Advanced-Editor-300x212.png 300w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_29_27-Advanced-Editor-768x544.png 768w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aa7ff10 elementor-widget elementor-widget-text-editor\" data-id=\"aa7ff10\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You may also notice that the final change that has been made to the very last line of the query is that &#8216;Source&#8217; has now been changed over to the name of the last step in our query, so this now reads:\u00a0 #&#8221;Extracted Values4&#8243;<\/p><p>You should also notice that now that the entire code is entered into the Advanced Editor, there are no syntax errors detected, so from a coding point of view, the code is valid.<\/p><p>If you click &#8216;Done&#8217;, you can then right mouse click on &#8216;Query1&#8217; in the Power Query Editor and rename the query to &#8216;Skyline_Finding_Data&#8217;.<\/p><p>If you have entered the code correctly, and with a value access_token, you should now see a table in the main part of the Power Query Editor showing a list of the findings that are currently triggered by that Skyline entity.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a0fb4e5 elementor-widget elementor-widget-image\" data-id=\"a0fb4e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"338\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_37_16-Testing-using-API-Power-Query-Editor-1024x541.png\" class=\"attachment-large size-large wp-image-231240\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_37_16-Testing-using-API-Power-Query-Editor-1024x541.png 1024w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_37_16-Testing-using-API-Power-Query-Editor-300x158.png 300w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_37_16-Testing-using-API-Power-Query-Editor-768x406.png 768w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_37_16-Testing-using-API-Power-Query-Editor-1536x811.png 1536w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_37_16-Testing-using-API-Power-Query-Editor.png 1911w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ad329d0 elementor-widget elementor-widget-text-editor\" data-id=\"ad329d0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As some of the information is sensitive, I&#8217;ve blocked out those elements.\u00a0 If everything is looking good, then you can click the &#8216;Close &amp; Apply&#8217; button at the top of the screen which will then close the Power Query Editor, return you to the PowerBI desktop screen but will also update the available data with the &#8216;Skyline_Finding_Data&#8217; query we have just created.\u00a0 You could then create tables and reports using the data, which could start looking similar to below<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-65125cd elementor-widget elementor-widget-image\" data-id=\"65125cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"334\" src=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_41_16-_-tam-pbi-coe-VMware-Slack-1024x534.png\" class=\"attachment-large size-large wp-image-231241\" alt=\"\" srcset=\"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_41_16-_-tam-pbi-coe-VMware-Slack-1024x534.png 1024w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_41_16-_-tam-pbi-coe-VMware-Slack-300x156.png 300w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_41_16-_-tam-pbi-coe-VMware-Slack-768x401.png 768w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_41_16-_-tam-pbi-coe-VMware-Slack-1536x801.png 1536w, https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/2023-10-12-13_41_16-_-tam-pbi-coe-VMware-Slack.png 1917w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3886735 elementor-widget elementor-widget-text-editor\" data-id=\"3886735\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The full code is provided below but please remember that the &#8216;YOUR_ACCESS_TOKEN&#8217; entry needs to be updated with your time sensitive access token before trying to refresh the data.\u00a0 Failure to do so, will result in access being denied and errors received when trying to refresh the data.<\/p><p>The full query code is provided below.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-261df65 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"261df65\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0eb0e7c\" data-id=\"0eb0e7c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-733b135 elementor-widget elementor-widget-heading\" data-id=\"733b135\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Full Query Code<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-076d5d8 elementor-widget elementor-widget-code-block-for-elementor\" data-id=\"076d5d8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-block-for-elementor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-javascript'>let\r\n     body = &quot;{\r\n       &quot;&quot;query&quot;&quot;:&quot;&quot; \r\n         {\r\n       activeFindings(limit: 1000) {\r\n         findings {\r\n           findingId\r\n           accountId\r\n           findingDisplayName\r\n           severity\r\n           products\r\n           findingDescription\r\n           findingImpact\r\n           recommendations\r\n           kbLinkURLs\r\n           recommendationsVCF\r\n           kbLinkURLsVCF\r\n           categoryName\r\n           findingTypes\r\n           firstObserved\r\n           totalAffectedObjectsCount\r\n          }\r\n           totalRecords\r\n           timeTaken\r\n        }\r\n      }&quot;&quot;,&quot;&quot;variables&quot;&quot;:{}}&quot;,\r\n      Data= Web.Contents(&quot;https:\/\/skyline.vmware.com\/public\/api\/data&quot;,[Content=Text.ToBinary(body),Headers=[#&quot;Content-Type&quot;=&quot;application\/json&quot;,#&quot;Authorization&quot;=&quot;Bearer YOUR_ACCESS_TOKEN&quot; ,#&quot;accept&quot; = &quot;text\/plain&quot;]]),\r\n    DataRecord = Json.Document(Data),\r\n    Source=DataRecord,\r\n    data = Source[data],\r\n    \r\n    activeFindings = data[activeFindings],\r\n    findings = activeFindings[findings],\r\n    #&quot;Converted to Table&quot; = Table.FromList(findings, Splitter.SplitByNothing(), null, null, ExtraValues.Error),\r\n    #&quot;Expanded Column1&quot; = Table.ExpandRecordColumn(#&quot;Converted to Table&quot;, &quot;Column1&quot;, {&quot;findingId&quot;, &quot;accountId&quot;, &quot;findingDisplayName&quot;, &quot;severity&quot;, &quot;products&quot;, &quot;findingDescription&quot;, &quot;findingImpact&quot;, &quot;recommendations&quot;, &quot;kbLinkURLs&quot;, &quot;recommendationsVCF&quot;, &quot;kbLinkURLsVCF&quot;, &quot;categoryName&quot;, &quot;findingTypes&quot;, &quot;firstObserved&quot;, &quot;totalAffectedObjectsCount&quot;}, {&quot;findingId&quot;, &quot;accountId&quot;, &quot;findingDisplayName&quot;, &quot;severity&quot;, &quot;products&quot;, &quot;findingDescription&quot;, &quot;findingImpact&quot;, &quot;recommendations&quot;, &quot;kbLinkURLs&quot;, &quot;recommendationsVCF&quot;, &quot;kbLinkURLsVCF&quot;, &quot;categoryName&quot;, &quot;findingTypes&quot;, &quot;firstObserved&quot;, &quot;totalAffectedObjectsCount&quot;}),\r\n    #&quot;Expanded products&quot; = Table.ExpandListColumn(#&quot;Expanded Column1&quot;, &quot;products&quot;),\r\n    #&quot;Extracted Values&quot; = Table.TransformColumns(#&quot;Expanded products&quot;, {&quot;recommendations&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values1&quot; = Table.TransformColumns(#&quot;Extracted Values&quot;, {&quot;kbLinkURLs&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values2&quot; = Table.TransformColumns(#&quot;Extracted Values1&quot;, {&quot;recommendationsVCF&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values3&quot; = Table.TransformColumns(#&quot;Extracted Values2&quot;, {&quot;kbLinkURLsVCF&quot;, each Text.Combine(List.Transform(_, Text.From)), type text}),\r\n    #&quot;Extracted Values4&quot; = Table.TransformColumns(#&quot;Extracted Values3&quot;, {&quot;findingTypes&quot;, each Text.Combine(List.Transform(_, Text.From)), type text})\r\nin\r\n    #&quot;Extracted Values4&quot;<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-08598e5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"08598e5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-47c17dc\" data-id=\"47c17dc\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7a4a510 elementor-widget elementor-widget-text-editor\" data-id=\"7a4a510\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>A good source for going through the process of downloading general data using an API into PowerBI can be found here:\u00a0 <a href=\"https:\/\/www.thedataschool.co.uk\/james-fox\/load-an-api-into-power-bi-and-create-your-first-visualisation-in-5-steps\/\">https:\/\/www.thedataschool.co.uk\/james-fox\/load-an-api-into-power-bi-and-create-your-first-visualisation-in-5-steps\/<\/a><\/p><p>Some of the creation of this query was aided by the information provided here:\u00a0 <a href=\"https:\/\/community.fabric.microsoft.com\/t5\/Desktop\/Pull-data-from-API-using-POST-method-in-Power-BI\/m-p\/574727\">https:\/\/community.fabric.microsoft.com\/t5\/Desktop\/Pull-data-from-API-using-POST-method-in-Power-BI\/m-p\/574727<\/a><\/p><p>Good information to know is that GraphQL (which is used by Skyline) is not the same as a REST API.\u00a0 The GraphQL requires the query to include just the information that you need rather than everything&#8230; a good description about GraphQL is provided here, although I didn&#8217;t ultimately use the method described in this blog post:\u00a0 <a href=\"https:\/\/ashiqf.com\/2021\/04\/25\/what-is-graphql-and-how-to-consume-a-graphql-query-based-api-in-power-automate\/\">https:\/\/ashiqf.com\/2021\/04\/25\/what-is-graphql-and-how-to-consume-a-graphql-query-based-api-in-power-automate\/<\/a><\/p><p>This was another source used to help form the beginning part of the query:\u00a0 <a href=\"https:\/\/stackoverflow.com\/questions\/70523096\/how-we-fetch-data-from-graphql-api-in-powerbi\">https:\/\/stackoverflow.com\/questions\/70523096\/how-we-fetch-data-from-graphql-api-in-powerbi<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>This is Part 2 of this series, where I take an adventure through using Skyline APIs with PowerBI.\u00a0 The first part of this series looked at making sure you had the correct rights within Skyline Advisor, how to generate the Access_Token that is required to access the API data and how to test that using the GraphiQL capability built into [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":231248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[49,9],"tags":[],"class_list":["post-231223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-skyline","category-vmware"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-content\/uploads\/2023\/10\/tn-skyline-animated-overview.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/posts\/231223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/comments?post=231223"}],"version-history":[{"count":17,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/posts\/231223\/revisions"}],"predecessor-version":[{"id":231265,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/posts\/231223\/revisions\/231265"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/media\/231248"}],"wp:attachment":[{"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/media?parent=231223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/categories?post=231223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtualworlduk.co.uk\/wordp\/wp-json\/wp\/v2\/tags?post=231223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}