viewing Apigee X documentation.
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 VS 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 VS Code:
Perform one of the following steps:
In the Apigee Explorer, position your cursor over the shareflows folder and click .
Select View > Command Palette to open the Command palette and select Apigee: Create shared flow.
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 Explorer. 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 VS Code:
Perform one of the following actions:
In the Apigee Explorer, position your cursor over the sharedflows folder and click .
Select View > Command Palette to open the Command palette and select Apigee: Import 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.
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 VS Code)