Use API keys for authentication and access

You can use the API key provided by your administrator to securely authenticate in the following scenarios:

Excel authentication

  1. Open an Excel sheet.

  2. Click Data > Get Data and Launch Power Query Editor.

  3. Change the credentials to Anonymous:

    • Click Data Source Settings.

    • Click Edit Permissions

    • Click Edit

    • Select Anonymous

    • Click Save

  4. Create a Blank Query.

  5. Open the Advanced Editor.

  6. Paste the URL and API secret in the code as shown:

    Here is a sample code:

    Copy
    let
        baseUrl = "https://prophix-devops.com/cr/example/odata/GetHubData(packageid='TestPackage',customercode='CUSTOMERCODE')",
        apiSecret = "xxxxxxxxxxx",

        authToken = "Bearer " & apiSecret,
        headers = [
            #"Authorization" = authToken
        ],
        source = OData.Feed(baseUrl, null, [Headers=headers])
    in
        source

Restore backups from a URL

For detailed instructions on using an API key to restore a backup file, refer to Restore backup from a URL using an API Key in the Job Schedules article.

Web services authentication

When importing data using the Web Connector (OData) file type, users have the option to authenticate using an API Secret instead of a traditional username and password.

  1. Go to Transfers > Data > Define File Structure > Import.

  2. In the General tab.

    • Select an import file structure or add a new one .

    • In the File Type drop-down, select Web Connector (OData).

  3. Go to the Parameters tab.

    • In the Odata connector drop-down, select Generic (API Secret) as the authentication option.

    • Provide the API secret issued by the Administrator.

  4. Configure any other necessary settings based on your organization's requirements, then click

     Note:  The same authentication method will now be available in Automation > Jobs > Schedules for jobs with Job Type = Web Service: