Working with API’s… for low-code dummies

linxsoftware

Linx Software

Posted on April 23, 2020

Working with API’s… for low-code dummies

Build an API in minutes with Linx - a low-code tool for IT pros

There are different ways to integrate one system or application with another. Using an API (Application Programming Interface) is one such way. This allows different systems to communicate with one another based upon a set of predefined rules and methods.

A low-code development platform like Linx can lighten your load and deal with most of the complexity for you, leaving you with only needing a basic understanding of how API’s work.

So how do API’s work?

There are a couple of basic, but important concepts that form the basis of an understanding of API’s. To get us started, let’s look at these:

  • Endpoints
  • Authentication
  • Requests
  • Responses

In a nutshell, it all comes together like this;

To work with (“consume”) an API, an application (also referred to as ‘client’) must send a request message that indicates what the application wants to do (e.g. GET or POST specific details) to an API endpoint. The application will be authenticated before a successful connection can be established. Once the connection is established, and the request message is processed, the application will receive a response message.


Do the following:

Before you even start, determine why you want to integrate with the other system:

  • your business requirements will determine which operations you will perform on the other system:
    • you may for example want to read (GET), create (POST), update (PUT), or delete data

Most API’s have an extensive API Reference published, which you need to go through in order to use the API. Look for the API Reference and understand how the specific API handles authentication and data.

When you know why you want to integrate, and how to use the API, do this:

1. Connect…

  • by providing connection details for the API endpoint

2. Be authenticated…

  • by providing your user authentication details, if required

3. Send request…

  • by using a specific method, e.g. GET (to retrieve data), POST (to add or create new data), PUT (to update data), or DELETE (to delete data)
  • to a specific URL and path
  • by including relevant input data via e.g. Query parameters, header or body details

4. Handle response…

  • by receiving the requested data, as well as success or failure responses
  • by processing the response data in your application (e.g. in your Linx solution) to achieve your solution’s overall goal. Linx supports responses in both JSON and XML formats and makes it easy to handle the response data in any of the more than 35 pre-packaged Linx plugins that contain literally hundreds of functions, types and services.

API specifications: SOAP and REST

Let’s now expand on our basic understanding of endpoints, authentication, requests and responses, by looking at API specifications.

The goal of API specifications is to standardize the exchange of data. Standardization makes it possible for diverse systems, written in different programming languages and potentially running on different operating systems, or using different technologies, to seamlessly communicate with each other.

The implication of this is that when you consume an API, the specification will determine the nature of how you will connect, authenticate, send a request and receive a response.

Linx supports both SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) API specifications to both guide you through the process of consuming API’s in your process flows, and to decrease the amount of code you would normally require for an API integration project.


Using Linx for your API integrations

In Linx you can integrate to API’s by using the functions of one of these plugins:

  1. The SOAP or REST plugins, specifically the CallSOAPWebService or CallRESTEndpoint functions.
  2. The Linx plugins that were developed to simplify the integration to specific systems, e.g. various Amazon Web Services plugins (including S3, EC2, SNS, SQS, CloudTrail), Google Drive, Google Sheets, Azure Storage, Xero and QuickBooks.

How to use CallSOAPWebService

You will need the details of:

  • The WSDL of the Service you want to call
  • The method to call in the web service
  • The Service URL to use when making the SOAP call
  • Authentication details

Go here for more details on the CallSOAPWebService properties and usage.


How to use CallRESTEndpoint

You will need the details of:

  • Full URL for the request
  • Method type to use in the request (e.g. GET, POST, PUT, DELETE)
  • Authentication details
  • Request details (how to send request data and what data to send)
    • Query string (parameters to send with request)
    • Header details
    • Body details
  • Response output type

Go here for more details on CallRESTEndpoint properties and usage.


How to use API-specific plugins

3rd party API’s require you to register accounts with them, set up specific app details, and create authentication or connection details for use when making a call to that API. When these prerequisite steps have been performed, using Linx to programmatically integrate to the 3rd party API becomes a breeze.

As an example, let’s look at the steps for integrating to Google Drive :

  1. Add the Google Drive plugin to your Solution (it’s literally a click of a button).
  2. From the Google Drive plugin, drag & drop your required Function (e.g. DeleteFile) onto your solution’s design canvas.
  3. Provide your Google API connection details.
  4. Set the properties for the selected Function (e.g. in the case of DeleteFile, set the FileID property).

Have a look at these guides to see how Linx works with 3rd party API’s: AWS, Azure, Google API’s, QuickBooks, Xero

Working with API’s is made less complicated and faster by using tools that are built for increasing developer efficiency. Let Linx be your API integration partner of choice.


Watch: Build and deploy an API in under 10 minutes

Build and host an API
https://www.youtube.com/watch?v=z2m62h5CBpQ

The post Working with API’s… for low-code dummies (and how Linx can help you) appeared first on Linx.

💖 💪 🙅 🚩
linxsoftware
Linx Software

Posted on April 23, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related