Prerequisites:  

  • The Gensolve API functionality must be turned on for your organisation.  Contact the Gensolve Support Team first before trying to compete the below steps.
  • You must have Access rights that allow you to edit Access Roles or have full Administration Access to setup API users.

NOTE: This document is intended as a reference for you, OR a third party developer to generate your own API calls via the Gensolve Public API.  It is NOT intended as a training session to learn what APIs are, and how they work.

If you are looking for specific steps to allow access to the 3rd Party WellNow please see Gensolve API User Configuration for WellNow

A number of third party developers have created calls to our Public API and you may already be able to use their applications to get the API information they have set in their calls, OR you may wish to employ your own developer to generate your specific API calls.

WARNING:  By allowing a third party access via the API to your Gensolve means you are allowing that third party to access your Gensolve to GET, POST and PUT information in your Gensolve and any external place you agree on, it is your responsibility to ensure that you use a trusted developer and that all security and privacy policies in your country are followed.

The below is covered in this document.

What is GPM's API?

The API's documentation

Setup the API Configuration

Allowed WebHook Domains (Non Compulsory)

 

What is GPM's API?

An API (Application Programming Interface) is a very common term used to refer to an application developed so users can obtain information related to the business in a programmatic way. It has become relevant since more and more tasks require information through custom made software with very particular needs of the business in mind. That is why GPM has its own public API, so users can access and use it to start implementing automated tasks.

The API's documentation

The main source of information on how to programmatically access specific resources of the API can be found in its own documentation at https://augpm.gensolve.com/api/. Since this is an application that is meant to be used by developers, it follows developers standards when referring to resources, requests, parameters, etc.

Setup the API Configuration

Contact Gensolve Support Team

  1. Contact Support to have API Access turned on and have your Secret Key generated.  Once you have received confirmation from the support team continue with the steps below.

Create A New API Access Role

  1. Click on Administration >> User Access Roles >> New Access Role.
  2. In the Role field >> Type  API Access.
  3. Enter a description.
  4. On the Windows tab scroll down and tick both API Options as per below
  5. Scroll down further and select the Administration Menu tick box.
  6. Click Save

Create A New User to Access the API

  1. Administration Menu >> System Users >> New System User.
  2. Enter an appropriate Display Name, e.g API User, or maybe the name of the 3rd Party requiring the API Access.
  3. Enter a Password and then re-enter the Password >> Note: You will need to use this login to complete the API Access & to provide these details to your 3rd Party API Developer, so make sure you make a note of the User and Password.
  4. Click Save >> The User Setup screen will close
  5. In the All System Users table find the System User you just created. Click on the first  on the right of the user.
  6. Select the Access Privilege >> Role – API Access (that you created earlier as shown under Create A New API Access Role) >> Save

  1. We will now provide Site level access for the user.  With the API User user selected in the list, click the second to the right of the user to add site/s.
  2. Select the sites that the 3rd Party API Developer will require access to.

  3. Click Save
  4. Logout of Gensolve

Update the API Access Endpoints

  1. Login using the above created  API User and password.
  2. Go to Administration >> User Access Roles >> Edit the API Access User Role created earlier.
  3. Click on the API Endpoint Access tab.
  4. Click on the Endpoint drop down menu >> Select  the Endpoints you require.  The below image shows the selection of all Endpoints.  (You may wish to contact your 3rd Party API Developer to find out what endpoints they require.)  Note: For security reasons we do not recommend providing access to all Endpoints unless absolutely necessary.
  5. Click on the Method drop down menu >> Select the Method required. (The Method refers to what actions the user can execute with your data once they have access.  We recommend consulting with your 3rd Party Developer to ensure you provide the necessary Method for their needs, either GET,POST,PUT, or * (all actions).).  The below image shows the selection for providing access to all Methods.
  6. Click on the Add button once added for each Endpoint.
  7. The Endpoint and the Methods you have selected will appear  >> Click Save.

 

Configure and Test the API User Setup

  1. Click on Administration >> API Configuration (if you do not see this button, you have not correctly followed the steps given in this document)>> Refresh Data
  2. In the Access Roles with API Access,  locate your User Access Role created earlier, Click on it, ensure that it displays the System User you created previously in the Users with this Access Role table.
  3. The Endpoints will also display for the User Access Role.  In the Endpoints this Access Role Allows check that all is correct.

  1. Note: IMPORTANT .  This step MUST be completed.  Failure to do so will stop the API Configuration from being successful.

          Click Add an IP Address >> Enter a specific IP Address or allow all IP Addresses by entering * >> Click on Add IP Address.  The below example shows the * wildcard being used.  

  1. At the pop up, Click on Yes

  1. The IP Addresses table is now updated.  If you see an exclamation mark next to IP Addresses this is simply a notification that you have not limited it to a particular IP Address.

Test your New Users API Connection

1. Next to the New User name click the icon.

2. Enter the Password you setup earlier for your API User >> Test Connection

3. The connection will be tested.  If the above steps have been followed you will see the below >> click Yes and close the Test Connection window

4. You can now provide the API login details you created, Base URL and Secret Key to your developer shown in your API Configuration screen.

Allowed WebHook Domains - (Not Compulsory - discuss with your Developer if required)

GPM's API has some resources that require longer processing time, and when sending a request to one of these EndPoints, part of the response will be an estimated response time. Users will have to provide an EndPoint where the results of the initial request will be posted after the stated response time.

In order to be able to use these resources, users will have to Whitelist the domain of the EndPoints where the results of their requests will be posted later on.

1. To Whitelist a domain, click on the Add Domain button on the Allowed WebHook Domains section >> A window with a simple text box and an Add button allows you to add all the domains that you need.

2.  Click Yes to confirm at the pop up window.

3.  If you wish to remove a domain, just click on the icon next to it.

4.  To confirm that everything was saved properly, click on the Get Data button to see the information that is currently in the database.

 

Examples & Conclusion

Endpoint and Method Examples

A. If you wish to grant full access to all of the resources of the API, you would select the "/*" option on the EndPoint drop-down, and if you want to grant access to every kind of operation (GET: read, POST: create, PUT: update) select the "*" option on the Method drop-down, but if you just want to grant reading permissions, then select the GET option.

B. If you wish to grant access to a group of resources, i.e. all of the EndPoints associated with Appointments, then select the resource group "/clinicians/*".

C. If you want to give access to a specific EndPoint, e.g. "/appointments/by_date", select this option on the EndPoint drop-down. Notice that the Method drop-down no longer provides all of the methods available but only the one that is directly related to this resource, in this case GET.

This topic covered how to set up GPM's API in order to start accessing it. The API Configuration interface is the one place where you can find all the information you might need to authenticate and to provide API Access and specific privileges to a role and to a user. For more information on how to use each resource, please visit the API's documentation site https://augpm.gensolve.com/api/.