❖ Heads up! This article is intended for Site Managers.
An Application Programming Interface (API) is software that enables communication between an app, user, or website. In simple terms, it sends and receives information on behalf of these parties.
For example, imagine your great-aunt is visiting and staying in the guest house. You want to know how she makes the best peanut butter fudge, but she’s busy with chores. Instead of interrupting her, you send your child to the guest house to ask for the recipe. Your child returns with the recipe, and you use it to make the best fudge ever.
In this analogy, your child acts as the API—handling the request and response without either you or your great-aunt needing to leave your places.
When to Use an API
An API can help you meet your reporting needs by sending and receiving data between your Get Connected site and other databases. For example, you might use an API if:
You want to sync user accounts between databases, such as a university syncing with a medical center, and vice versa.
You need to generate a weekly report from your Get Connected site data that is emailed to you automatically.
You are building an external website and want to display data from your Get Connected site on it.
An API automates these processes, continuously managing data exchange once it is set up, until you decide to turn it off.
API Capabilities
To see a list of our current API capabilities, please see Get Connected Client API.
API Keys
An API key is used to establish a connection and communicate with another database. When an application reads the API key, it calls the API to identify the program attempting to access the site. Much like a physical key opens a door, an API key opens the connection between sites that want to share and receive data.
Things to keep in mind:
You can reuse the same API key to generate multiple tokens.
Your API key will remain active unless you choose to deactivate it or if the user account associated with the key is deactivated.
Tokens
To set up automated data sharing, you must create an API key to generate tokens. Tokens are used in the API authentication process to establish secure communication.
Key points about tokens:
Tokens are created through API authentication tools such as Postman.
Tokens expire after one year.
A single API key can generate multiple tokens.
Creating an API Key
When you're ready to create an API key:
Go to Settings > API Keys.
Use the Select a Site Manager drop-down to select the site manager for which the API key is being created for.
Click Create API Key to finish.
Copying an API Key
If you want to copy an API key from your Get Connected site:
Go to Settings > API Keys.
Click the Copy API Key under the API Key column. Now you can go to Postman to authenticate your API Key and generate a token.
Deleting an API key
If you need to delete an API key:
Go to Settings > API Keys.
Click the X under the Options column for the API key you wish to delete.
Before deleting an API key, ensure it is not currently in use by any app or program. Deleting an active API key will cause any API calls made by that program to fail, which may trigger error messages or reports indicating an invalid API key is being used.
Authenticating APIs
Here is a quick video walkthrough that explains how to manage and authenticate your APIs: