Connect to the API From Scratch (Power BI)

Don't want to use a template? We get it, you like custom stuff✨

Prerequisites βœ…

Steps to Create New Connection

  1. Make a note of the tenant and instance you want to connect to, along with your personal Primary Key (you will need these for step 7).
  2. Open up Power BI (Desktop)
  3. Open Power Query (Transform Data, center top toolbar)
  4. Create a brand new query. Hit New Source > Web.
  5. Toggle the Advanced option and delete the second line under URL parts.
  6. Then click the "Add Header" button twice and fill out the request headers like so (see below screenshot in step 7):
    1. edison365-tenant
      1. This distinguishes your tenant from all the others
    2. edison365-instance
      1. This distinguishes your instance from any others
    3. Ocp-Apim-Subscription-Key
      1. This acts as your authentication to ensure the request is coming from you and only you
  7. Now that you've got the correct structure in place, it's time to fill it out with your specific request.
    1. Add your Request Endpoint
      1. Remember to replace the {endpoint} with the request you are interested in.
      2. For example: For the request GET Projects, the URL part reads https://my-api.edison365.com/v1/api/odata/RecordReports.
    2. Fill Out Your Request Header Parameters
        1.  Tenant name
        2. Fill out your Instance name
        3. Fill out your Primary Key
          1. Click Show to reveal your key and allow it to be copied/pasted.

Example: 

As a concrete example, a reasonable URL for a Support instance for the company Contoso might be: https://my.edison365.com/contoso/support


You can read off the info you need from the URL:

  • Tenant name: contoso
  • Instance name: support

This results in the request header parameters:

Shortcut

Now that you've done one query from scratch, you can save a bunch of work and duplicate the next ones.
I can't stress enough how much simpler this is if you begin by duplicating an existing query instead of going through this each time; a lot of the initial steps in build a query are identical, so I usually follow this process instead:
 
  1. Duplicate a query
  2. In the new query, navigate to the first applied step in the query
  3. In the formula bar at the top, amend the API URL (only the highlighted part) so it points at the endpoint I desire
  4. Run my query