Querying Ideagen Risk Management API using Power Automate
Who is this article for?Users who want to learn more about using Power Automate to make API calls.
User account with API access is required.
This article will cover using Power Automate to both authenticate and make calls to the Ideagen Risk Management API. Before following the steps, please familiarise yourself with the Risk Management API.
In this article:
1. Preparing for a query
To ensure you can follow this guide, please ensure you have the following information ready:
- API Username
- API Password
- Client Name
- Client Secret
2. Generating an authentication token
Generating an authentication is done by making a POST request to the /oauth/token endpoint.
First you will need to make a new flow, within which you can Initialize your variables. These will be the variables you will need to make the POST call.
To create a new flow:
- Click Add New Step.
- Search for each of these options:
- API Username
- API Password
- Client Name
- Client Secret
- Select Initialize Variable.
- Click Add New Step below the variables.
- Select HTTP.
- Complete the fields following the image below as guidance.
-
Parameter fields:
-
Advanced Parameter fields:
-
Parameter fields:
- Save and run the flow.
This will then provide you an access token to make calls to Ideagen Risk Management site.
Access tokens expire 12 hours after being generated using the above method.
3. Making API calls
Before making calls using the token, you will need to find out what endpoints are available for the Module you want to query.
To list all available endpoints, log in to the application and navigate to the following URL: https://{sitename}.pentanarpm.uk/cpmweb/swagger-ui.html.
In the following example, we are going to create a call to get the Feedback types.
To make a call:
- Start a new flow.
- Click Add New Step.
- Select HTTP.
- Choose GET from the Method dropdown..
- Enter the full URL.
This is the site name + endpoint from swagger. - Paste the access token next to authorization.
- Save and run the flow.