This page applies to Apigee and Apigee hybrid.
View Apigee Edge documentation.
Combine policies and resources into a shared flow that you can consume from multiple API proxies, and even from other shared flows. Although it's like a proxy, a shared flow has no endpoint. It can be used only from an API proxy or shared flow that's in the same organization as the shared flow itself.
Develop your shared flows using Apigee in Cloud Code as described in the following sections. See also Managing folders and files in an Apigee workspace.
Creating a shared flow
To create a shared flow using Apigee in Cloud Code:
Perform one of the following steps:
In the Apigee section, position your cursor over the shareflows folder and click .
Select View > Command Palette to open the Command palette and select Cloud Code: Create Apigee shared flow bundle.
The Create shared flow wizard opens.
Enter a unique name for the shared flow at the prompt and press Enter.
After you complete the steps in the wizard, the new sharedflow-name folder is added under sharedflows
in the Apigee section. Each shared flow folder is structured as described in Shared flow bundle directory structure
Uploading a shared flow bundle
To upload a shared flow bundle using Apigee in Cloud Code:
Perform one of the following actions:
In the Apigee section, position your cursor over the sharedflows folder and click .
Select View > Command Palette to open the Command palette and select Cloud Code: Import Apigee shared flow bundle.
Navigate to the shared flow bundle that you want to upload and click Import shared flow. The shared flow bundle must be structured as described in Shared flow bundle directory structure.
(Optional) By default, the name of the zip file minus its extension is used for the name of the shared flow. If this name is not unique, you are prompted to enter a unique name.
The uploaded sharedflow-name
folder is added under sharedflows
in the Apigee Explorer.
Configuring shared flows
Configure shared flows as described in the following topics:
Using shared flows
You can call a shared flow using the FlowCallout policy, as described in FlowCallout policy.
In addition, by attaching a shared flow to a flow hook you can execute the shared flow before a proxy or target request, or after a proxy or target response. For more information, see:
- Attaching a shared flow using a flow hook (conceptual overview)
- Attaching shared flows using flow hooks (flowhooks.json) (steps using Apigee in Cloud Code