This quickstart guide helps API publishers configure an API after pushing it to the APIM console. For information on using a published API, see Socialize your API.
The APIM console will open in a new tab after you push your API or resource, or open the console from the Build menu in the Celigo platform. It won't time out at the same time as the Celigo platform, so you can keep the window open without signing in again.
Note: Several paths in this article depend on your API definition version. v4 APIs use the current console layout; v2 APIs use the legacy layout. Learn more about API definitions.
Below is a simple diagram that outlines how to configure your API in the APIM console.
Auto-populated fields
After pushing your API or resource, the APIM console will automatically populate several sections and fields.
General
Name: The name you gave your resource or API in the Celigo platform.
Description: The description of the resource or API you provided in the Celigo platform.
Version: Defaults to version 1.0.0.
For v4 APIs, view and edit these fields at Configuration → General. For v2 APIs, navigate to API → Info.
Endpoints
Invoke URL: Lets users invoke the API via a unique URL. It's available in the Celigo platform in the Advanced section of your resource or the Actions (...) menu of your API. In the APIM console, it's available at Endpoints (v4) or API → Backend services → Endpoint (v2).
API plans
Each endpoint is automatically configured with an API key plan. You can manage plans at Consumers → Plans (v4) or Plans (v2).
Policies
Policies are added to flows to enforce security, reliability, and proper data transfer. Examples of policies include traffic shaping, authentication or authorization, rate limiting, and dynamic routing. There are dozens of policies available. Three auto-populated policies will help your API's performance. To learn more about the available policies, see the APIM Policy Reference Guide.
Three policies are automatically added to your API:
-
Override HTTP Method policy (available for resources only; not an API created in API builder): You can use the
override-http-methodpolicy to override the HTTP method provided by the initial consumer with a newly configured value when the inbound request is sent to the backend API. This policy does not act on messages and only applies to the request phase of API flows. -
Transform headers policy: The Authorization is automatically set to Bearer API token. You can override the HTTP headers by:
- Adding to or updating the list of headers
- Removing headers individually
- Defining a whitelist
- Dynamic routing: The dynamic routing policy dispatches inbound calls to different targets and endpoints or rewrites URIs. This policy is particularly useful for creating API mashups.
Configure gateway timeout
Your gateway timeout settings determine how long your API consumers will wait before a timeout response is sent.
Configure gateway timeout for a v4 API
For v4 APIs, the Connect timeout, Read timeout, and Idle timeout are automatically set to 3,000, 10,000, and 60,000 milliseconds, respectively. Timeouts are configured on the endpoint group and inherited by its endpoints.
- Navigate to Endpoints.
- Select Edit for the endpoint group. To override the group settings for a single endpoint instead, edit that endpoint and turn off Inherit configuration.
-
Select the Configuration tab.
Click to expand - Edit the Connect timeout (ms), Read timeout (ms), and Idle timeout (ms). All settings are in milliseconds.
Configure gateway timeout for a v2 API
For v2 APIs, the Connect timeout, Read timeout, and Idle timeout are automatically set to 5,000, 10,000, and 60,000 milliseconds, respectively.
- Navigate to API → Backend services → Endpoint.
- Select Edit (
) to edit your endpoint.
- Select the Configuration menu.
- Turn off the Inherit configuration toggle.
-
Edit the Connect timeout, Read timeout, and Idle timeout. All settings are in milliseconds.
Manage your API policies
You can configure policies to determine how consumers interact with the API, including which API features they can access and which governance policies are enforced. For more on the concept of a policy, see Learn more about API management features. For a comprehensive list of all the available policies, see the APIM Policy Reference Guide.
Important:
- An APIM flow relates to the different phases of creating, managing, publishing, and subscribing to an API in APIM. This is not the same as a Celigo integrator.io flow.
- You do not have to create a flow to add a policy to the API. However, adding a flow allows you to better control which phases a policy is added to.
For v4 APIs, manage your policies in the Policies section. Flows are grouped under each plan (for example, the auto-created API key plan) and under Common flows, which apply at the API level. Select a flow to see its details — the path, path operator, and HTTP methods it applies to — and its Request phase and Response phase policy chains. Message APIs also have Publish and Subscribe phases.
To change how flows are selected for a v4 API, select the gear icon on the Flows panel to open Flow execution. The Default flow mode setting determines flow selection: Default executes each flow independently based on the operator defined in the flow, while Best match selects the single flow closest to the request path (a plain text part of the path takes precedence over a path parameter). You can also turn on Fail on flow mismatch to respond with an error when requests don't match any defined flow.
For v2 APIs, manage your policies in the Policy Studio, a no-code drag-and-drop tool. Design your flow and add policies in the Design tab. The Configure tab has two flow modes: Default and Best Match. If you keep the flow mode as default, each flow's execution is determined independently based on the operator defined in the flow itself. Default mode allows for the execution of multiple flows. However, if you select Best match, the gateway will choose a single flow with the closest match to the path of the API request. A plain text part of the path will take precedence over a path parameter. The Debug tab allows you to debug your flows by running the API.
Create an API flow (optional)
Note: Creating a flow is optional because a flow is automatically created when you push a resource to the APIM console.
The ALL /** flow is a catch-all flow that applies the settings to every endpoint in your API. Learn more about API flows.
To create a flow for a v4 proxy API (the type created when you push a resource from integrator.io):
- In Policies, select + next to a plan or Common flows.
- Enter a Flow name, or leave it blank to generate a name automatically from the path and method.
- Configure the Operator (Equals or Starts with) and the Path the flow applies to.
- In Methods for your flow, select the HTTP methods the flow applies to. The default is ALL.
- Optionally, define a Condition that triggers flow execution using Expression Language (EL).
- Select Create, then select Save and redeploy the API.
For v4 message APIs, the flow configuration also includes:
- Channel: Define the path to use with the Operator to determine if this flow should be applied.
-
Entrypoints: Select the entrypoints for which you want the flow to be executed. If none are selected, the flow will be executed for all possible entrypoints, assuming the conditions are met. Available entrypoints are
HTTP GET,HTTP POST, Websocket, Server-Sent Events, and Webhook. - Entrypoints supported operations: Select Publish or Subscribe as the operations supported by the entrypoints. If none are selected, both will be supported.
To create a flow for a v2 API, select + Design new one in the Policy Studio and configure the same fields.
Add policies
To add a policy to a flow in a v4 API:
- Select the flow.
-
In the Request phase or Response phase, select +.
- Search for a policy or filter by category: Performance, Security, Shared Policy Group, Transformation, or Others.
- Find the policy you want, select Select, and configure the policy.
- Select Save and redeploy the API.
To add a policy to a flow in a v2 API, drag and drop the desired policies into the Request / Response interface. You can sort your policies by request or response, and filter by or search for a specific policy.
Configure and publish your API documentation (recommended)
You should configure and publish your API documentation before publishing your API.
Start and deploy your API
After you've created your API and configured it as needed, select Start the API in the Danger Zone at Configuration → General (v4) or API → Info (v2).
Select Deploy your API in the top banner. This doesn't automatically publish your API to the Developer Portal, but ensures the latest updates you've made are available. After you publish the API, it will be deployed and updated in the Developer Portal with your latest changes.
Publish your API
You must publish your API to make it available in the Developer Portal. If you don't publish your API, your customers cannot create an application or subscribe to your plans. To publish your API, open the Danger Zone at Configuration → General (v4) or API (v2), and select Publish. You must individually configure and publish your OpenAPI specifications.
Finally, you should provide your APIM Developer Portal link to your API consumers. To access your link:
- In integrator.io, navigate to Account → Company → API management.
- In the APIM console, navigate to Settings → Settings and find the Portal URL under the Portal heading.
Next steps
After publishing your API, you can configure more settings, including:
- Analytics, logging, and notifications
- Documentation
- Create plans and manage subscriptions and applications
- Update your APIM Developer Portal theme