Troubleshooting unified authoring in IBM App Connect or IBM API Connect

With unified authoring, when you create an API flow in IBM® App Connect Enterprise as a Service, the flow is published automatically to a Product in IBM API Connect Enterprise as a Service. When you try to start or stop an API in App Connect Designer, you might encounter an error in App Connect Designer or API Connect.

Before you begin

  • Read about how to enable and use unified authoring to create and start an API flow in Creating flows for an API from scratch.
  • 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 Designer 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. To enable unified authoring, first provision an instance of API Connect Enterprise as a Service in the same region as your App Connect Enterprise as a Service instance. Then, on the Designer tab of the API editor, click the Change API gateway settings icon Change API gateway settings icon, enable unified authoring, then click Save.
      Screenshot that shows hat

About this task

The following sections describe how to resolve errors that you might find when you start or stop an API in App Connect Designer.

Resolving errors when you start an API in App Connect Designer

About this task

When you create and start an API flow in your Designer instance, 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.

App Connect automatically discovers the provider organizations in API Connect that the user has access to in the same 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.
Note:
  • The publishing preferences are based on the user who is logged in.
  • 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.
When you try to start an API flow in your App Connect Designer instance, the API might fail to start. You might see a message that the API can't be published to API Connect.
Example of a 'Your API wasn't started' error
Example of a 'Your API wasn't started' error
Your API might not be started for the following reasons.
  • One or more of the target applications in the flow in App Connect Designer might have issues.
  • The API can't be published to API Connect because one or more of your specified publishing targets were not discovered.

Procedure

To resolve the issue, complete the following steps.

  1. Try to restart the API from your App Connect Designer instance.
  2. If the problem persists, try one or more of the following steps.
    • Check whether the logs contain any applicable error messages, and try to resolve those errors.

      To access your logs, see Viewing log messages in the log viewer.

    • Check that your API flow has no validation errors.

      For more information, see Validating that your flow is ready to run.

    • Verify that your API Connect instance is still available and running.

      If the instance is no longer running, restart it, and then restart the API flow. If the API Connect instance no longer exists, you can publish to a Product in another API Connect instance by updating the API gateway settings for the flow and then restarting the flow. The instance of API Connect Enterprise as a Service must be in the same region as your App Connect Enterprise as a Service instance.

    • Verify that your preferences for a Catalog, Space, Gateway service, Product, Plan, and application, are still available in your API Connect instance. You set these preferences in the API gateway settings panel in Designer. If necessary, update the API gateway settings for the flow and then restart it.
    • Verify that you have the necessary permissions to publish APIs to the selected Catalog in the provider organization of which you are the owner or a member. If you're a member, verify that you are assigned the Developer role at the provider organization level. For more information, see Creating a provider organization and API Connect user roles in the API Connect documentation.
    • Check that integration authoring is still enabled for your App Connect instance. On the Designer tab of the API editor, click the Change API gateway settings icon Change API gateway settings icon, and if unified authoring is disabled, enable it, then click Save. If you enabled integrated authoring some time ago, try disabling it, save your changes, then re-enable it.

Resolving errors when you stop an API in App Connect Designer

About this task

When you stop the API in App Connect Designer, the Product (and API) in the API Manager user interface and the Developer Portal site are deleted automatically.
Note: 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.
When you try to stop an API flow in your App Connect Designer instance, you might see a message that states that the API was stopped in Designer, but other errors occurred. Or the message might indicate that the API can't be stopped.
Example of a message indicating that an API was stopped with errors
Errors might occur for the following reasons.
  • Your login session might be expired.
  • The API can't be unpublished (deleted) from your API Connect instance because one or more of your specified publishing targets were not discovered.

Procedure

To resolve the issue, complete the following steps.

  1. Try to stop the API again from your App Connect Designer instance. Refresh the browser window or tab to verify that your login session is not expired.
  2. If the problem persists, try one or more of the following steps.
    • Check whether the logs contain any applicable error messages, and try to resolve those errors.

      To access your logs, see Viewing log messages in the log viewer.

    • Check whether your API Connect instance is still available and running.
      If the instance is no longer running, restart it, and then check for the published API. You can delete the API manually from the API Manager UI in API Connect by completing these steps.
      1. From the navigation pane, click the Manage icon Manage icon.
      2. Open the Catalog and locate the published Product that contains the API. On the Products tab, the Product title is shown either as API_flow_name (Created by App Connect Designer) or Product name - API_flow_name (Created by App Connect Designer).
      3. Click the options icon Options icon that is associated with the Product, and then use the Retire and Delete menu options to remove the Product and API from the Catalog (and Developer Portal).

      If the API Connect instance no longer exists, no further action is needed.

    • Verify that you have the necessary permissions to retire and delete APIs in the selected Catalog in the provider organization. For more information, see API Connect user roles in the API Connect documentation.
    • Check whether your preferences for a Catalog, Space, Gateway service, Product, Plan, and application are still available in your API Connect instance. For example, perhaps the Product or Catalog in which the API was published was deleted independently from API Connect. You set preferences in the API gateway settings panel in Designer.

      To restart the API in Designer later, check and update the API gateway settings for the flow before you restart it. For example, if the previously selected Product (or Product version) in the API gateway settings panel is no longer available, choose another available version of the Product, or a different Product.