The way developers talk about them, APIs can sound like the solution to all our troubles. “You could do that a lot faster if you used the API.” “You know, if you want EnergyCAP to talk to the Asset Management Platform, we can use their API.” “If that’s something you need to do every day, we should just code something up in the API.”
But what exactly is an API? What is it for, and how and when should it be used?
An API is an application programming interface. Over the course of your workday, you probably interact with many APIs without ever knowing it. Websites and software running on your laptop use APIs for anything from providing directions to your favorite park, to buying running shoes, to simply functioning on your computer’s operating system. Websites and software run so seamlessly thanks to APIs shared among developers. APIs provide a blueprint and tools to tell software components how they should interact with a given program. A capable and well-documented API should allow developers to accomplish anything a user could via a program’s user interface, and perhaps more. This is the case with EnergyCAP’s API.
The aim of EnergyCAP’s APIs is to provide unobstructed access to create, retrieve, update, or remove data from our users’ EnergyCAP databases. Through the EnergyCAP interface, there is a series of steps required to authenticate, locate, manipulate, filter, select, edit, import, and/or export data. In practice, for a user who needs to act on the database to, say, enter a bill, there is a certain path that he or she should follow to find the right spot to place the bill in the database. The user might click the Create (“+”) button, select “Enter a bill,” type the account to which the bill belongs in a search bar, enter bill values in a set of fields, and click “Save.” The user follows a logical, scripted path and his or her bill ends up on the right account record.
But what happens if we need to repeat a task ten thousand times…before lunch? You’re probably already thinking automation, and you’re right. And, in order to automate processes, we need to strip away the overhead. This is where the APIs come in.
To further illustrate the power of our APIs, let’s look at an example…
Your boss returns from a meeting where the head of the fire department just learned that the fire service has been errantly paying the police department’s electricity bill for the barracks for the last three years.
You’re asked to retrieve bills for five accounts in the Police Services division from 2017 through 2019. The boss hands you a sticky note with three account numbers and tells you to find the problem.
To complete this task via the EnergyCAP user interface, assuming you are already logged in, you’d…
1. Select bills module
8. Set between 1/1/2017 and 12/31/2019
/api/v3/bill?filter=topmostPlaceCode equals 'Fire services' and vendorInfo equals 'Smith Energy' and billingPeriod between '20170101'|'20191231' and accountId one of '12345'|'22345'|'32345'
That’s all! Thirteen manual steps can be reduced to a single API call.
As you may have already guessed, interaction with the EnergyCAP (or any) APIs requires some know-how. Any development language can be used to access our APIs, but you’ll need to be familiar with at least one of them or know someone who is. Out-of-the-box, EnergyCAP’s APIs provide software development kits (SDK) for C#, Python, and Angular/Typescript. The SDKs provide an even easier way to interact with the EnergyCAP API!
With this power enabled through the use of the APIs, you may be worried about the security and integrity of your data. Don’t worry, all API requests must be authenticated. Users need to obtain a token (a code provided by EnergyCAP’s servers that provide temporary access to the API user), and to do so, he or she must first have a valid username and password. Once authenticated, a user’s permissions, as configured in the EnergyCAP application, apply to his or her API use.
Now that you have some background, we hope this article helps you discover ways that the EnergyCAP APIs can support or improve your organization’s workflow. If you’d like to take a deeper dive into API functionality, please visit developer.energycap.com. If you have a vision for how EnergyCAP’s APIs might support your efforts but don’t have a programming background or resources, we can help. We use our APIs every day to support EnergyCAP’s integrations with dozens of software platforms—accounting systems, BAS, asset management systems, etc. We even use the power of API to drive Version 7. Every interaction with Version 7 is built on top of and utilizes the same API that can power your organization’s utility bill workflow.
Bring your ideas, and we can do the rest.