An illustration of Akana at the center of API creation.
February 7, 2023

How to Easily Create an API With Akana

API Lifecycle Management

Creating APIs doesn’t need to be difficult. In this blog, we walk through how to create an API the easy way using the Akana API management platform.

To make you familiar with the steps, we will describe the process of API creation from a UI perspective, where a developer uses the Akana Portal GUI to create the API product. Note, however, that these steps can also be executed in a fully automated fashion, for example driven by CI/CD.

Back to top

First, What Is API Creation?

API creation is the process of creating and publishing APIs to make them available to prospective consumers. It is a critical step to allow client applications to connect to other applications, both within your enterprise architecture and in its wider ecosystem.

There are two key aspects of API creation to consider. First, there’s the back-end resources that your API will be exposing. What we mean by ‘resource’ is a service, or implementation of some business capability, as it is offered by your enterprise applications. Such a resource can be available as a RESTful service, a SOAP-based webservice, or even an AMQP-conformant message broker. Such resources can also be referred to as unmanaged APIs. Although they offer an interface that would allow clients to gain access to data or functions created around these data, they lack the capabilities that allow you to manage that interaction properly, which obstructs optimized usage and can even introduce unnecessary risk.

Which brings us to the second, and arguably more important aspect. A properly designed API is consumer-oriented, which means that it has been designed with the needs from developers utilizing the API in mind - without compromising the systems that the API gives access to, and the data handled by these systems.

To address the first need, APIs are published as API products, preferably in a catalogue that allows for effective search and, once found, an easy understanding of the functionality that is offered and any constraints that may apply to usage. Developers that decide to use an API should be given clear means to request consumption. Furthermore, the API product should provide all information to help developers effectively implement consumption of the API in their client code.

The second need is addressed by capabilities offered by an API management solution. For example, Akana provides powerful policies that can be associated with an API to ensure API security, compliance with any SLA and additional protection of back-end systems and data.

API Lifecycle Overview

API creation is an important part of the API lifecycle — and one of the API basics you need to know. But do you know everything there is to know about controlling and consuming APIs? Explore the hubs and become an expert today. 

👉 API LIFECYCLE HUB 👉 API BASICS HUB

In this blog, we will mainly focus on the creation of API products, as a means to effectively engage developers which, in turn, helps to ensure the success of your API program. 

Back to top

How Is an API Product Made?

The process of creating an API product is like creating any other software product. Unlike software in general, though, the actual development work should be largely declarative. The process in summary: determine your requirements first. Then design and develop your API. Test it to make sure it works. Once ok, deploy and publish the API. And monitor its performance.

It can take anywhere from minutes to months to create an API, depending on the complexity of your API and the tools you use to create it. With Akana, it’s minutes rather than months.

Watch the API challenge below to see how Akana makes it easy:

 

Take the API challenge. Try Akana >>

Back to top

How to Create an API

The process for creating APIs is straightforward. Here’s a quick walkthrough of how to create APIs — and what you’ll need to consider.

1. Determine Your Requirements

First, you’ll need to determine your API requirements. These will be a mix of functional requirements and nonfunctional requirements.

Your functional requirements represent what it is that you like your API to do. In other words, what business capabilities does the API expose to its consuming clients; what data and functions around these data does it make accessible?

Your non-functional requirements will typically be a mix of security and service level concerns. This includes controlled access, expected (or agreed) API performance and response time, among others. It also includes concerns with regard to data protection and downstream systems integrity.

To help you gather requirements, consider the following questions:

  • Who is your audience — internal developers, external consumers, or both? 
  • How can you incorporate their needs into the API?
  • What concerns need to be addressed from an API security perspective? 
  • What are the expectations in terms of API performance, availability, response time?

Once you’ve gathered requirements, you can move on to the next step: design.

2. Design Your API

Next, you’ll need to consider API design. How will you design your API? Are any internal rulebooks available to help guide your design? Will you design your API interface first, and then build the backend resources to connect to? Or do you want to publish an existing resource as an API product?

With Akana, you can take either approach.

3. Develop Your API

Now, it’s time to start developing your API product. 

The essentials you’ll need to cover when developing your API product are:

  • Give your API product a meaningful name and useful description.
  • Define operations for what your API will do.
  • Specify the data models that describe the request and response messages.

And, as example of non-functionals:

  • Implement applicable security constraints (security policies).
  • Ensure proper caching, rate limiting, and other types of behavior.

The API interface will be captured using a service description language. To describe RESTful APIs, you can use OAS, Swagger or RAML. To describe SOAP APIs, you can use WSDL.

The easiest way to develop your API product is to use a tool. For instance, you can build your API using Akana. With Akana, you have two ways to develop your API:

  • Create an API product that exposes (‘proxies’) an existing resource.
  • Create an API product from scratch (and connect it to applicable resources later). 

You can also use an existing resource as a building block to create your API product.

Regardless of the approach selected, eventually your API will need to be connected to its downstream resource(s). Initially, it will point to these resources in a test environment.

4. Test Your API

After you’ve developed your API, it’s time to test it. Testing is ultimately done in a test environment. But there are some testing considerations as you create your API product.

The goal of testing is to make sure your API works as it should under different conditions. You should also test your API’s security and validate any other critical non-functional requirements.

In order to properly test it, your API should be connected to a resource that mimicks the eventual production resource. Alternatively, the API can be configured to return a mock-response, which is a convenient solution if downstream resources are not yet available.

A highly recommended approach to API testing is to pair your API management platform, like Akana, with a comprehensive API testing solution, like Blazemeter. The two combined offer a compelling complementary API testing solution. Akana provides an intelligent Test Client (as part of its API Portal) that allows both functional testing as well as validating whether applied security policies are satisfied. Blazemeter, on the other hand, offers a wide range of testing capabilities, from comprehensive API functional testing through automatically generated test cases to dynamic load and performance testing. Blazemeter also provides a powerful mock service capability to have APIs return a production-like response when no actual back-end target yet exists. Last but not least, it can easily generate a vast collection of test data.

5. Publish/Deploy Your API

Once your API has been tested and reviewed, it can be deployed in production. Enterprise APIs, including cloud APIs, are typically hosted on API gateways that ensure the expected performance, security, and scalability requirements are met.

To facilitate adoption of the API, publish it in an API developer portal. You can enhance API adoption significantly by offering clear documentation that describes API functions and applicable use cases. In addition, it should clearly explain any API security constraints that may apply. Furthermore, it should clearly indicate which ‘consumption plans’ are offered, if any. An advanced API developer portal like the one offered by Akana will provide authorized access to API product information and reflect actual API details at all times.

An interactive testing tool will surely help developers to gain proper understanding of the API and all its relevant features — both functional and from an API security perspective. Ideally, the testing tool presents the API in a sandbox environment. This allows for testing without connecting to production systems or using actual production data.

☁️Become an Expert. Explore the Cloud APIs Hub >>

 

6. Monitor Your API

After you’ve tested and deployed/published your API product, your work isn’t done. You now need to monitor your API to understand how it’s being used and how it performs. 

Some metrics you want to monitor include:

  • Operational metrics, like availability, response time and throughput;
  • API metrics, like developer engagement and consumption overview;
  • Business metrics, to validate whether the API is adding business value as expected.

There clearly is a lot to API monitoring. Choosing a platform with built-in analytics, like Akana, makes monitoring APIs much easier. Runtime traffic is scrutinized continuously, with any deviant result reported immediately. Suspicious requests can be further inspected in detail.

With Blazemeter added, API monitoring can already be started in your non-production environments, to continuously assert correct API behaviour from a security perspective, for example. API products will themselves be subject to regular updates; Blazemeter scheduled API monitoring helps you validate that everything remains up to par.

Back to top

How to Create APIs The Easy Way — With Akana

Akana gives you two easy ways to create an API.

  1. Create an API from an existing resource. Best for publishing existing resources as APIs.
  2. Create an API from scratch. Best for API-first design.

Watch the video below to see how it works — or keep reading for a full recap.

 

1.  Create an API From an Existing Resource

Do you want to publish an existing resource as an API product? Is a service description document (like OAS, Swagger, RAML, WSDL) available for the resource? Then the easiest way to create an API in Akana is to use this document.

Simply import the OAS/Swagger/RAML/WSDL document. You can either upload a file or import it from a URL:

This screenshot shows how to create APIs by importing an API definition document.

Then hit save.

Your API will be automatically deployed to the Akana API gateway. In just a few seconds, you’ve created an API that can be found in your Akana developer portal — and used by app developers.

2. Create an API From Scratch

If you’re doing API-first design and you don’t have a backend resource or endpoint yet, it’s best to create your API from scratch in Akana first.

In this example, we’ll assume that your back-end API implementation will correspond with your API product interface.

To get started, you’ll click the APIs dropdown in the top navigation bar and select “Add API”.

This screenshot shows how to create an API from scratch in Akana, starting with the API name.

In the resulting page, give your API a name and add the target endpoint. This can be an endpoint to eventually test against, or a mock service endpoint. If you don’t know the endpoint, you can always add it later. 

Click save.

You can then either use the GUI editor to define your operations or you can use the JSON editor to work with the source directly.

The example below shows operations in the GUI editor:

This screenshot shows how to define operations when creating an API in Akana.

Save your design and that’s it! Your API will now be ready for review and test.

Get Started With Akana Today

See for yourself how easy it is to create APIs with Akana.

Select organizations can try Akana free for 30 days. Put it to the test creating APIs and see how Akana’s unique developer portal makes it easy to promote and consume APIs, too.

Create APIs With Akana ️ Watch a Demo First

Back to top