Creating flows for an API from scratch
You can create flows for an API (also known as an API flow) in App Connect. The defined configuration provides an API that exposes one or more operations. You can use these operations to call out to an endpoint and pass data between that endpoint and applications in the flow.
Before you begin
- If you know which applications or imported APIs you need, create accounts on the App Connect Applications and APIs page for the connectors that run API operations against the target applications or APIs. You can also create accounts when you create a flow. For more information, see Connecting to accounts.
- To use unified authoring
to create API flows that you can manage in IBM® API Connect, ensure that you
meet the following requirements.
- You must have an instance of IBM API Connect Enterprise as a Service in the same region as your IBM App Connect Enterprise as a Service instance. If you have an existing trial instance of App Connect, you can provision an API Connect trial instance in the same region. To provision a trial instance of API Connect Enterprise as a Service from the App Connect home page, click Manage API flows by using IBM API Connect.
- Your API Connect instance must be configured with at least one registered DataPower API Gateway service.
- Your API Connect instance must contain at least one provider organization that you are authorized to access. The provider organization must include a catalog that contains an application with an owning consumer organization and a client ID.
- You must enable unified authoring for your instance. On the Designer tab of
the API flow editor, click the Change API gateway settings icon
, enable unified authoring, then click Save. 
About this task
When you create flows for an API, each individual flow is the implementation for an API operation that is typically called from mobile and web applications. (Examples of operations are 'GET order' and 'POST order'.) The flow for each operation contains a request, actions for one or more applications or imported APIs, and a response for the API operation. The flow might also contain toolbox nodes for specialized data processing. The request uses a model that you define to request the creation, retrieval, or replacement of data objects in your applications. When the request is submitted, each target application or API completes its action. The flow then returns a response that either confirms that the actions were successful, or returns the data that was requested.
- You create one or more models that define the structure of the objects that you want to create or retrieve. You can create up to 10 models.
- You choose the built-in create, retrieve, or replace or update operations to complete against each model, or you define your own custom operations.
- You configure a flow to implement each operation and add actions for one or more target applications or APIs. You might also add toolbox utilities to the flow to process the input or output data from these applications.
If you have an instance of API Connect in the same environment or region as your App Connect instance, you can expose your API in both App Connect and API Connect. This feature is known as unified authoring. Unified authoring is disabled by default.
With unified authoring, when you create and start an API flow in App Connect, the API is added automatically to a Product. That Product is then published in a catalog that is provided for a provider organization in API Connect. The Product also becomes visible on the API Connect Developer Portal if a site is enabled for the catalog. The publishing preferences are based on the user who is logged in. App Connect automatically discovers the provider organizations in API Connect that the user has access to in the same environment or region as the App Connect instance. You can specify settings for publishing the API to a preferred API Connect instance and provider organization. You can also choose catalog and Gateway targets, the containing Product and Plan for the published API, and a consuming application.
You can work with the API in API Connect independently of the API in App Connect. You can also browse the Product (and API) in the Developer Portal. When you stop the API in App Connect, the Product (and API) in the API Manager user interface and the Developer Portal site are deleted automatically. (A user who doesn't have access to API Connect can stop the flow in App Connect. However, the API remains published in API Connect.)
If you have access to an instance of IBM API Connect Enterprise as a Service in the same region as your IBM App Connect Enterprise as a Service instance, you can enable unified authoring. When unified authoring is enabled, and you create and start an API flow, the flow is published automatically to API Connect. If you start an API flow without specifying publishing preferences, the API is published to the Default Plan in an auto-generated Product in a sandbox catalog in any of your discovered API Connect instances.
You can use the API editor in App Connect to create an API flow and to define models and implement operations for your API. You can also configure policy, gateway, and portal settings to control the behavior of the API when it is published to API Connect after you start the flow. The following tasks describe how to create your API flow, configure publishing preferences, and access the published API in API Connect.
Creating the API flow in App Connect
Procedure
To create an API flow, complete the following steps.
Results
What to do next
- If you're on the VPC hours plan, you
can test the behavior of your API before you deploy it. For
more information, see Testing an API (VPC hours plan).Note: If unified authoring is enabled, and you start your flow before you set publishing preferences for that flow, the last set of user preferences that were saved for a flow are used. If no preferences were previously set, the API is published to the Default Plan in an auto-generated Product in a sandbox catalog in any of your discovered API Connect instances. Therefore, to control where your API is published, you must ensure that you specify your preferred settings before you start the API.When you test an API, a Test tab is available in the API editor.
The OpenAPI 3.0 YAML definition for the running API flow in App Connect is used to publish the API automatically to a Product and Plan in the specified catalog and provider organization in your API Connect instance. If you configured a Developer Portal, the API Product also becomes visible there.Note: If unified authoring is enabled, the API is added either to an auto-generated Product or to a stand-alone version of the existing Product that you selected, according to your preferences. The published Product contains only your API. - When you're ready to run your flow in a production environment, deploy it. For more information, see Deploying integrations.
Accessing the published API in API Connect
About this task
Procedure
To access the API in API Connect, complete the following steps.
and click












, which is similar to the view
where you edit APIs in 




.
This view is also read only, and the YAML source conforms to the OpenAPI 3.0 specification. 









