Automating Lab Processes with API
[Guide with Examples]
9 min read
Lab automation comes with many benefits and requires an integrated lab where software and equipment work together. APIs (short for Application Programming Interfaces) can help bridge different components within the lab and your digital landscape to automate many lab processes, thus improving the efficiency within the lab and reducing human errors. But how do you get started? What are some API-related considerations when it comes to choosing software or equipment? Follow this guide to learn the benefits of using APIs in the lab, and how you can start taking advantage of APIs.
Automate your lab processes
When we think of lab automation, we typically think of robotic arms for liquid handling and dedicated high throughput equipment in a clean room devoid of humans. However, with increasing digitalization in scientific laboratories, the face of lab automation is changing. Now, there are many options available to automate the processing and analysis of data, as well as various tasks within the lab. This means that regardless of the size of the lab or how affluent the lab is, steps can be taken to automate lab processes to significantly improve lab management. Examples of this include data collection, report generation, inventory tracking and ordering, managing samples and specimens, billing and accounting, and creating documentation such as certificate of analysis or bill of materials.
Automation and digitalization come hand in hand. Astrix, a lab digital transformation company, found the most cited motivation for digital transformation by their clients is to automate and manage lab processes, with 55% of the survey respondents identifying this as a priority. Digitalization opens the door for us to control software and equipment through digital means. Using an everyday example here, you can now use an app on your phone to set up the robotic vacuum cleaner at home to turn on at a specific time, without personally having to create the settings and encode it into the vacuum cleaner. Taking this to the lab environment, one can now interact with lab equipment and software through a digital interface (which, by the way, is done through APIs).
To go one step further, digitalization also paves the way for different software and equipment to communicate to each other. This means you can set up an integrated lab where lab components are connected to each other digitally, allowing information to be shared among them so you can automate various lab processes mentioned previously. An example of this would be to connect an assay system to feed data into an electronic lab notebook, and for the electronic lab notebook to then create a Word document report that can be shared with stakeholders. Another example would be an inventory system of supplies and reagents to be connected to an online purchasing platform, so that an order can be placed when the inventory system is showing low stock for an item.
In practice, though, how does this work? Well, that’s when an API comes into play.
What is an API?
“APIs enable these synergies by letting developers easily access and combine digital assets in different systems, even if those systems were never intended to interoperate. “
Booking your next flight using an online travel platform. Checking the weather on your smartphone before heading out. Or using Google Maps to see when the next bus will arrive.
What’s one common component shared by all three activities?
The answer is “Application Programming Interface”, most commonly known as “API”. It is probably not an overstatement to say that APIs are everywhere. It serves as a digital bridge between different platforms, software, and equipment, allowing you to create an integrated environment to retrieve information without needing to manually connecting and checking each source.
Using the travel example above, an API helps the travel platform integrate with information on the airline websites, and allows you to find various flight options on the travel platform without checking each airline website for this information. You can learn more about how APIs work with this video : What is an API? Connections and principles explained
In addition to APIs, a related concept is “webhooks” (sometimes referred to as reversed APIs). Webhooks are a newer concept. While APIs require you to request information (I.e., entering dates and lengths of your travel on the online platform for your flight), a webhook returns information automatically when certain events happen or conditions are met. For example, if the price of the flight drops to a certain amount, the system sends you an email automatically. This eliminates the need to be constantly checking for updates on the travel platform.
Can APIs make it easier to connect different devices, lab instructions, and analytics software?
APIs in the lab (examples)
Now that you are familiar with the technical side of things, let’s look at using APIs in the lab environment.
Simply put, APIs allow things in the lab to interact with each other digitally, thus creating an integrated lab environment for automation to happen. With an API, it is possible to bring a new piece of software or equipment into the lab to work with an existing lab environment, instead of revamping the whole lab for automation. Lastly, you can use APIs to utilize cloud-based tools for remote monitoring or controlling, and bring the Internet of Things (IoT) into research labs to create Smart Labs.
Here are two specific examples of SciNote Electronic Lab Notebook (ELN) users using APIs to improve their processes for lab management.
- Automate data upload from Google spreadsheet into SciNote inventory, and attach additional documentations to chemicals in the inventory. “I use API command for inventory management stuff… We gather info first in Google sheet…I could use [an] API to automate these data uploads [into SciNote] for specific [inventory] columns. Or MSDS and Safety data sheets to all the chemicals.” – Tamási János, Engineer and Quantum Optics Researcher, Wigner Research Centre for Physics
- Generate a list of billable items for clients. ‘I… use the API for client inventory exports, so we provide a snapshot of billed items for a client on regular intervals or on request. We have global inventories that have a “Client” column, so I can use this tool to quickly export them in the right format without trying to export to excel manually.’ – Shyam Ajudia, Program Leader, Advanced Cellular Dynamics.
Other SciNote users use APIs to create new projects and tasks within SciNote automatically, feed analytics and data from smart lab instruments or software into SciNote, export information from SciNote into a database or equipment (like the FLUICS label printer), synchronize local databases of samples and reagents into SciNote, and connecting SciNote to other software systems such as Laboratory information management systems (LIMS) and Enterprise resource planning (ERP) systems.
Keep in mind that these are just examples of API uses with SciNote ELN – there are actually a lot more possibilities depending on the set-up in the lab, the software and hardware used, and what processes need to be automated.
How to take advantage of APIs in the lab (list)
If you want to take the first step in automating some processes in your lab, or want to prepare for lab automation in the future, here are a few API-related considerations:
1. Research software/hardware with API capacities
Not all APIs are created equal. Make sure you do your research on the API offerings when purchasing a new piece of software or hardware for the lab. API documentation is extremely important, as well as ongoing maintenance of the API especially when new features are released. Request vendor documentation before making a purchase. Better yet, chat with the supplier to see how well the API is maintained, and whether the API will be sufficient for your needs. Software/hardware without an API will be much more demanding for integration with any system, including ELNs, and will often require non-standard tailored solutions.
As mentioned before, webhooks are another option that could further simplify the implementation of your automation. Look out for this option as well when doing your research.
Research SciNote API documentation
SciNote offers both APIs and webhooks, learn more:
2. Invest in having someone taking care of the process
While modern APIs have become much easier to implement, it still requires some level of IT expertise. The best is if you have someone on staff who can support this process; consider providing additional incentives for the staff member to look after adopting APIs in your lab. If not, consider investing in short-term contract services to help with the implementation and troubleshooting. This will also speed up the process and prevent significant delays.
If this is really not possible, consider looking for products that come with out-of-the-box integration already set up.
3. Stick with the standard
There are two main API styles on the market: REST and SOAP. The most commonly used API is the RESTful API. According to Cloud Elements’ 2017 State of API Integration report, 83% of the API on the market is RESTful API (vs 15% of APIs using SOAP). So consider staying with RESTful APIs to ensure easy integration with most of the other software and equipment on the market.
4. Plan ahead for your data management
APIs are designed to support many different use cases; any two systems can be connected in a verity of different ways and directions via APIs. Therefore, your use case will define how the integration should be executed. Hence, it is vital that you plan the integration ahead, document your use case, map the data in both systems, and define the direction of data flow. Let’s take connecting an ELN with a billing system to automatically generate a client invoice as an example. To automate, you must first define the direction the data will flow (from ELN to the billing system in this case), understand how the different experiment and inventory fields inside the ELN can be charged to the client, and map those fields with appropriate billable expenses fields in the billing system, and decide how frequently the billing system should pull the data from ELN, eventually leading to the billing system will generate a client invoice.
To say it in another way, you need to ensure you have a good understanding of the use case of your integration and a good understanding of the data structure of both systems so to allow for proper data mapping. If the ELN stores data in an unstructured way that you can’t pull out experiment fields relevant to billable expenses easily, then it will be much more challenging to automate the process even if an API is available.
To this end, a few standards and principles to note are the FAIR data principles, the lab automation standard set by Standardization in Lab Automation (SiLA), data standard Analytical Information Markup Language (AniML), and a metadata standard called the Investigation/Study/Assay tab-delimited format (ISA-Tab). Having a very general understanding of these could benefit you in the long run.
So, know how your data is stored, and plan ahead for automation possibilities.
5. Know the limitations of APIs
Keep these limitations in mind when planning to use APIs to automate lab processes:
- If the software or equipment doesn’t come with APIs, then you can’t take advantage of APIs. In this case, custom coding will be required to integrate the particular software or equipment into your lab environment.
- Given that an API is a digital interface, if the device is analog, then you can’t create the connection (so, paper notebooks are out…). There are, of course, ways to turn analog signals into digital, but this will require significant work and custom coding.
- With each feature release and new types of data collected, the API will need to be updated to prevent errors in translating the data from one application to another. Therefore, API providers will need to properly maintain the API integrations to ensure they stay relevant.
- Some API providers impose limits on the use of their APIs (e.g. the number of API calls you can make in a certain time window). You should plan for those limitations in your integration project.
- Remember, APIs are just doorways; they don’t do much by themselves. Even if each and every one of your tools has an API, you will need some resources that will implement syncing and data flow mechanisms. Consider whether you have available people with software development skills, or look into hiring a contractor.
- APIs can (and will!) change. Once your perfect data flow is developed and implemented, it WILL need maintenance. Keep this in mind when selecting a contractor or employing a new person. Implementation of the API is a process rather than a project.
Now equipped with the knowledge of how APIs can work in the lab environment, you are ready to take the next step to start automating your lab processes.
Looking for a partner in your digitalization journey?
Talk to our team & get the top-rated customer service in the ELN industry.