API Creator Overview

Get an overview of API Creator.
Layer7 Live API Creator
is a low-code solution to creating APIs and microservices. You can create APIs and services that are secure, cost efficient, and easy to maintain through iterative development. You can use
Layer7 Live API Creator
to integrate data across disparate cloud-based or on-premise data sources. For example, these data sources can be SQL databases, NoSQL databases, cloud APIs, and software components.
Layer7 Live API Creator
offers ease and efficiency of modernizing application architectures by way of APIs and microservices.
Layer7 Live API Creator
provides declarative definition of the following services:
  • API.
    Create the default API by connecting to your database. Access tables using GET, POST, PUT, and DELETE. Access views and stored procedures using GET and POST. You can create nested document RESTful resources, or endpoints.
    For more information about how to create and customize your API, see Creating APIs.
  • Data integration.
    Combine data from multiple sources (SQL, Mongo, and RESTful), including updates between them, by defining resources.
    For more information about how to define resources, see Customize your API.
  • Security.
    Enforcement of endpoint access and row/column security.
    For more information about how to define security, see Securing APIs.
  • Logic.
    Enforcement of database integrity on updates, with a combination of spreadsheet-like rules and server-side JavaScript. Rules automate multi-table chaining and SQL handling, and are 40 times more concise than conventional code.
    For more information about how to define rules, see Logic.
In this article:
Overview of Creating APIs
API Creator provides more than a simple interface. The interface is only the tip of the iceberg. It provides a fully functional application backend, as illustrated in the following image:
CA Technologies.png
The Service Map
As you explore and use API Creator, the service map illustrates your location within the context of the
Layer7 Live API Creator
service components. The service map also illustrates the interfaces that are available for you to use to interact with those service components.
ServiceMap4.0.png
You can view the service map on the
Use Cases
tab that is in the Learning Center in API Creator. To view this tab, with your API open, click
Learning Center
, and then click the
Use Cases
tab.
Use Cases
The following use cases apply to using
Layer7 Live API Creator
:
As a new user to
Layer7 Live API Creator
, you can get an understanding of how you can address these use cases using API Creator by following the steps that are outlined in the Quick Start in API Creator.
For more information about how to access the Quick Start in API Creator, see Quick Start.
Use Case Category
Area
Approach
Integrate Multiple Data Sources
Integrate multiple databases
Example:
Integrate and expose data from multiple databases as APIs.
Follow these steps:
  1. Create an API by connecting to an existing database (the Database-first approach to creating APIs).
  2. Add a new data source to your API to connect to another database.
  3. Create virtual relationships between related tables from the databases.
    For more information, see Database Relationships.
  4. Provide a database abstraction layer for database access by defining resources explicitly in API Creator.
  5. Declare business logic for integrity and security.
Create Application Backends
Web/Mobile Backends
When designing web/mobile/IoT applications, it is a good practice to separate your business logic and data access layers from the presentation layer. This separation speeds up your development by factoring logic out of client applications and parallelizing client and server development.
Follow these steps:
  1. Create an API for a database.
  2. Provide a database abstraction layer for database access by defining resources explicitly in API Creator.
  3. Declare business logic for data integrity and security.
IoT Backends
IoT solutions often communicate through MQTT messaging. As the front devices serve as data collection points, backend services must allow you to store, view, and/or perform computation on your data.
Layer7 Live API Creator
uses this messaging in analytics and data processing.
Follow these steps:
  1. Create your API.
  2. Define resources explicitly in API Creator. These resource provide a database abstraction layer.
  3. Create MQTT listeners to subscribe to MQTT messages. Write JavaScript code in your listener to parse these messages. You can call PUT and POST requests to the resources that you explicitly defined in API Creator based on your processing needs.
  4. Declare business logic for integrity and security.
Data Processing Systems
Back-office data maintenance
Usually, you create custom user interface (UI) applications that are based on your API. You might also have back-office data processing systems where the UI requirements match Data Explorer, which
Layer7 Live API Creator
includes. Data Explorer offers automatic creation of a web application, which you can customize. This approach can avoid the higher costs for custom UI development.
Follow these steps:
  1. Create your API.
  2. Declare business logic for integrity and security.
  3. In Data Explorer (in Author Mode), define the look-and-feel of your UI.
  4. Use Data Explorer for data inquiry/maintenance.
Systems Integration
Catch and throw webhooks
This use case is separately listed because stakeholders often imagine the system as intended for integration. In fact, the
Create Application Backends
and the
Data Processing Systems
use cases typically involve integration.
When you do not have direct access to systems, you can define APIs that perform the mapping and transformation that is required for integration, while minimizing the impact or changes to the systems involved. In situations where your data is coming from disparate cloud-based or on-premise data sources, you can provision these data quickly with APIs customized and security that is configured to the requirements of the applications that are built.
Example:
Persist the request data and process a webhook that accepts changes from System-A and updates System-B by creating an integration database.
Follow these steps:
  1. Create a database to store the requests.
    When you do not manage the target system, it is often beneficial to create an extra integration database to persist the request data. This database can ease debugging and can facilitate problem diagnosis. This additional database enables you to support more APIs and extend the set of database tables (in or outside the original schema).
    If you do not require persistence, you can create functions or custom endpoints.
  2. Define a resource to catch the webhook (an incoming POST).
    This resource provides the mapping and transformation to adapt external API agreements to your database and, if needed, comma-separated value (CSV) and XML conversion to JSON.
    For more information about exploring an example, see the Business to Business (B2B)
    PartnerOrder
    resource.
  3. Create a pipeline event for the resource to address lookups, for example, to look up a ProductID given a ProductName.
  4. Define the business logic using an event rule on the table that is used to persist the request to throw webhooks that update the target system.
    For more information about exploring the basic approach to using events to throw webhooks, see the B2B
    Process Shipper
    webhook commit event in the B2B API Sample.
Publish and subscribe to messages
Example:
Facilitate systems integration by message routing. Microservices architectures recommend autonomous operation. If a service is unavailable, then the other service can operate.
Follow these steps:
  1. Create an API using the Database-first approach to creating APIs.
  2. Publish messages from event rules that are based on your defined business logic.
  3. Subscribe to messages from another system or subscribe to messages by creating listeners in your API.
    For more information, see Creating Listeners.
  4. Process the incoming message that the listener receives.
Data monitoring
Example:
Data monitoring and post data to other systems.
Follow these steps:
  1. Create an API by completing one of the following options:
    • Connect to an existing database (use the Database-first approach to creating APIs).
    • Use the Code-first approach to creating APIs.
  2. Monitor data such as changes to files within a directory or changes to data in the database (for example, due date checking, row changes last run) by creating a timer.
    For more information about how to create a timer, see Creating Timers.
  3. Define your business logic to post data to other systems or alert users (for example, send emails, messages, and start business processes).
Service Orchestration
Service orchestration is the process of integrating two or more services together to automate a process or synchronize data in real time. This process is a contained approach to address costly point-to-point integration which is tightly integrated while enabling quicker turnaround services orchestration and execution.
Example:
Calling multiple APIs from external systems.
Follow these steps:
  1. Create an API using the Code-first approach to creating APIs.
  2. Create a resource and write custom JavaScript code to call the API. This resource handles the mapping or transformation of data before providing the response.