Create a flow for an API by using IBM App Connect Enterprise Designer.
About this task
You can define models, operations, and flows for an API. For more information about APIs, see
Developing integration solutions by using REST APIs.
The procedure for this task describes how to create a new flow.
Alternatively, if you have access to an existing flow, which partially meets your requirements, you
can import the flow as described in Importing a flow and then edit
it in the API editor as described in this topic.
You can also create a new flow by using an IBM App Connect Enterprise Designer template as described in Creating a flow from a template.
Procedure
- Access the API editor by using one of the following methods:
-
- In the sidebar navigation menu, click Home to open the
Home page.
- Click Create flows for an API to open the API
editor.
-
- In the sidebar navigation menu, click Designer to open the
Designer page. Any flows that you created before are
displayed.
- Click New to open the menu.
- Select to open the API
editor.
The API editor opens. The Designer tab and the
OpenAPI tabs are visible.
- Select the Designer tab.
-
In Model name, enter a name for your model; for example,
myModel.
- Click Create model to open the configuration page for
myModel.
The Properties tab and the
Operations tab are visible.
- Select the Properties tab.
- In the section "Add properties to your model", enter a property for your model in
Property name; for example CustomerName.
- Select a type for the property; for example, String.
At step 9, you have the choice of adding more properties
from an application if you select it from the Catalog
page. For any designer connector nodes for which you did not create an account in Creating accounts, you must create an account before you can add the
property by completing step 8.
- Optional: Create an account and configure the
connector by using one of the following methods:
- If there are existing accounts, they are listed in a menu labeled
Accounts:
- Click the down arrow to scroll through the menu and select .
- Enter your credentials.
- Select the action that you want the connector to perform. For example, for the connector Slack, you can select
.
- Enter the required details to configure the connector.
- Click Connect to create your account.
-
For more information about identifying connection details, see How-to guides for apps.
- If there are no existing accounts, create a new account by completing the following steps:
- Click Connect.
- Enter your credentials.
- Click Connect.
- Select the action that you want the connector to perform. For example, for the connector Slack, you can select
.
- Enter the required details to configure the connector.
- Click Connect to add the configured connector to your flow.
- Add more properties by using one of the following methods:
- Add more properties by clicking Add property and entering values for
Property name; for example, OrderNumber and selecting
values for type from the drop-down menu; for example, Number.
- Add more properties by clicking Select properties from applications,
and selecting an application from the list. For example, Callable Flows. Alternatively, you can
connect to additional applications by clicking Applications and selecting an
application from the Catalog page. For example, Slack.
When you finish adding all of your
required properties, click Add property.
- In the model configuration page, select the Operations tab.
- Click Select an operation to add to open the drop-down menu.
- Select an operation. For example, if you entered myModel in
Model name at step 3, then you can select
the menu option .
- Click Implement flow to open the flow in an editor window.
The editor window opens. A Request node and a Response node are displayed.
- Edit the flow as required by clicking the nodes to open a configuration page.
- For the Request node, click Sample data to display the
Context and sample data table. Update the values for
CustomerName and OrderNumber as required. For example "Smith"
and "123."
Close the configuration page by clicking
x.
- For the Response node, update the fields as required. Optionally, click
Sample data, Insert a mapping, or Insert a
function and select the options that you require from the drop-down menus.
Close the configuration page by clicking x to return to the
editing window where the flow is saved automatically.
- Rename the flow by editing the name field.
- Click Done.
The flow is ready to test. The
status is displayed as "Draft (ready to deploy)."
What to do next
Test your API flow as described in Testing a flow for an
API.