Skip to main content
Planview Customer Success Center

Connecting Enterprise API reports via Excel

 

KeyedIn - Configuring the Reporting API Connection:

Open the Login record and navigate to the ‘API Access’ tab

                    - Enable ‘Integration User’

                    - Enable ‘Generate API Key’

                    - Enable ‘Reporting API’

Once these have been enabled, please click on ‘Save and Close’

clipboard_e763e9a5852a1f23a8e03f18099de14b1.png

 

Click on the name [top menu] and select ‘API Keys’

clipboard_ef196a218ace67a784481c2f15f621c94.png

In the following screen click on ‘Create Key’

clipboard_e495806f270b6062985dd43bdfab8aee3.png

 Set a name for the API key for identification purpose, Set an Expiry Date (Once the key expires it will no longer connect to the Reporting API, please generate a new API key once the key expires.)

clipboard_eae9248eb67bad8e938d09e2e30d57466.png

Click on ‘Create’ this will show the following screen:

clipboard_e6ed6c76bec7e27035b2a621c7ddc4db3.png

Click on ‘Copy’ and store the API key somewhere safe as this Key will be required for authorization purposes. Please note this screen will only be displayed once, If you lose your API Key then you will have to create another API Key.

**Please do not share this key with anyone else.

Click on ‘Close’

clipboard_e73020b27e60ff4b50ed4ed03d6753137.png

KeyedIn API connection has now been configured.

 

Excel – Connect report via Enterprise API

  1. Click on ‘Get Data’ > ‘From Other Sources’ > ‘Blank Query’

clipboard_e1d8abae660055ff3a1ce3f0f64644e3d.png

2. Click on ‘Advanced Editor’

clipboard_e980516aa168e9b4bbcfe22c31419e10c.png

3. This will show the following screen:

clipboard_e5ba6e88c730ef82af8c6879d407d0ec5.png

Remove everything in the advance editor screen and copy the following Syntax into the advance editor:

let 
 GetPage = (i) => let Page = Json.Document(
 Web.Contents("https://keyedinenterprise.co.uk/api/reporting/v1.0/Report"

, [Headers = [
#"Content-Type" = "application/json"
#"Authorization" = "mnintegration@kip.com:kiyfSKDkdikwmsjdudykQ==",

#"KIE-INSTANCE-ID" = "SITEID"]
 , Content=Json.FromValue([key = 527, recordsPerPage = 1000, pageNumber = i])
 ]
 )
 ) in Page,
 FirstPage = GetPage(1),
 TotalPages = FirstPage[data][totalPages],
 PageIndicies = {1 .. TotalPages},
 Pages = List.Transform(PageIndicies, each GetPage(_)[data][data]),
 Data = List.Union(Pages)
 in
 Data

If you would like to include parameters then the following syntax is an example of how to pass parameters, The Parameters are highlighted in in bold text:

let 
GetPage = (i) => let Page = Json.Document(
Web.Contents("https://keyedinenterprise.co.uk/api/reporting/v1.0/Report"

, [Headers = [ 

#"Content-Type" = "application/json", 
#"Authorization" =  "mnintegration@kip.com:kiyfSKDkdikwmsjdudykQ==",

#"KIE-INSTANCE-ID" = "SITEID"]
, Content=Json.FromValue([key = 527, recordsPerPage = 1000, pageNumber = I, Params = [param1 = Resource Name, param2 =Month]])
]
)
) in Page,
FirstPage = GetPage(1),
TotalPages = FirstPage[data][totalPages],
PageIndicies = {1 .. TotalPages},
Pages = List.Transform(PageIndicies, each GetPage(_)[data][data]),
Data = List.Union(Pages)
in
Data

**The Highlighted values will need to be amended to match your URL, Authorization and Report Key.


URL – The following table shows a list of URLs to connect to the reporting API depending on your region and Environment, Replace the Web.Contents with the desired URL.

SITED - This is your Instance ID tied to your environment, It can be found in the About section.

Environment

Region

URL

Production

UK

https://keyedinenterprise.co.uk/api/reporting/v1.0/Report

US

https://keyedinenterprise.com/api/reporting/v1.0/Report

Asia

https://keyedinenterprise.net/api/reporting/v1.0/Report

Sandbox

UK

https://sandbox.keyedinenterprise.co.uk/sbox-1/api/reporting/v1.0/Report

US

https://sandbox.keyedinenterprise.com/sbox-1/api/reporting/v1.0/Report

Asia

https://sandbox.keyedinenterprise.net/sbox-1/api/reporting/v1.0/Report

 

Green – Input the KeyedIn Username followed by the API key which was copied earlier.

Blue – Input the Report Key here

 Sample:

clipboard_e83befba25adfc6eaaa737876531a028d.png

4. Click on ‘Done’

5. Following message may show if there are no credentials provided If so please select ‘Edit Credentials’

clipboard_e940056a8c7feecb8af8ef675decace25.png

6. Select ‘Anonymous’ and the last level to apply the settings to via the drop down

clipboard_e98fe0363e84e5847b35aba4e40416ad4.png

7. Click on ‘Connect’

8. If the connection is successful then the report will be connected to Excel:

clipboard_ec357ca4043c8ffa78a3960c77bc43a3d.png

 

 Convert data to a table:

  1. Click on ‘Transform’ and then select ‘To Table’:

clipboard_edf730d128cfeb326e61afbb4acf79209.png

 2. Click on ‘OK’

clipboard_e0307725dabe08996a4340e9c0941c7cf.png

 

3. In the following screen click here

clipboard_e72d57a0dddc841e41961f8682a0646b5.png

4. Deselect ‘Use Original column name as prefix’ and then click on ‘OK’

clipboard_e9a262a16901ad8244688391705fe4e16.png

The data will now be converted to a table

5. Select ‘Close & Load’

clipboard_ea0bfc5824e31ff519db7deffde035734.png

clipboard_e5a222107cd0c5cfb9afa094b523f7a45.png