Creating an API Service
Create API Service
To create,
Give your API a unique name and select the entity you want to map to it.
Next, select the input and output parameters (attributes).
That creates your API.
When you create an API, the services required to perform CRUD (Create, Read, Update, Delete) activities are automatically added to assist you in handling data.
After you create an API service, build a flow for it.
Implement API Logic
Every API comes with a default flow attached to it. Double-clicking the API opens it on the canvas. You can customize it to meet your specific API requirements or create a new flow from scratch. Be sure to include "Start" and "End" nodes in your flow in both cases.
The three methods to build a flow for your API:
Method 1: Building from scratch
Use the flow elements available in the Toolbox to build an API flow.
Begin by adding a Start node. Then, search for the elements required for your API and drag them onto the canvas. After you add all the necessary tools to your flow, complete it with an End node. Then, configure the flow elements as you want them to behave.
Alternatively, you can use the quick access tools to ease your work. These tools include options to configure and change the plugin type. To access the quick-access toolbar, click on an element in the canvas, hover your mouse over the arrow, and you'll find quick actions to add activities and configure them.
While building a flow for your API, you may be required to group the elements, duplicate them, and so on. All such actions that you can take on them are available in the canvas toolbar.
Method 2:
Method 3:
The last method is to import an existing flow for your API. Right-click your API and select Import Flow. Select the “.apiflow” file and import it. You can alter it to suit your needs.
After you finish building a flow for your API, save it.
Configure Flow Plugins
Similarly, configure all the plugins in your flow. Finally, save your flow.
Validate API Flow
Validating the flow helps you ensure there are no errors or faulty connections.
Test API
Best Practices:
Choose the right entity when creating an API, as you cannot change it later.
Rename each element before configuring it when adding one to the flow.
Make sure to configure all the plugins in your flow before validating it.
Now, your API is ready to use within the app. To make it available for other apps to consume, publish it. click here, to refer to the publishing process.
Last updated