Develop shared flows

This pageapplies toApigee andApigee 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 alsoManage folders and files in an Apigee workspace.

Before you begin: Familiarize yourself with the concepts described in the following topics:

Create a shared flow

To create a shared flow using Apigee in Cloud Code:

  1. Perform one of the following steps:

    • Position your cursor over thesharedflows folder in your localworkspace and clickCreate shared flow icon.

    • SelectView > Command Palette to open the Command palette and selectCloud Code: Create Apigee shared flow bundle.

    The Create shared flow wizard opens.

  2. Enter a unique name for the shared flow at the prompt and pressEnter.

After you complete the steps in the wizard, the new shared flow name appearsundersharedflows in the Apigee section. Each shared flow folder is structured as described inShared flow bundle directory structure

Upload a shared flow bundle

To upload a shared flow bundle using Apigee in Cloud Code:

  1. Perform one of the following actions:

    • In your local workspace, position your cursor over thesharedflows folder and clickUpload shared flow bundle icon.

    • SelectView > Command Palette to open the Command palette and selectCloud Code: Import Apigee shared flow bundle.

  2. Navigate to the shared flow bundle that you want to upload and clickImport shared flow.The shared flow bundle must be structured as described inShared flow bundle directory structure.

  3. (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 shared flow folder is added undersharedflows in your Apigee workspace.

Configure shared flows

Configure shared flows as described in the following topics:

Use shared flows

You can call a shared flow using the FlowCallout policy, as described inFlowCallout 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:

Note: Apigee does not validate the dependencies between shared flows and API proxies at deploy time. For example, if the FlowCallout policy in an API proxy references a shared flow that either doesn't exist or isn't deployed, API proxy deployment still succeeds. When Apigee checks the dependency at runtime and validation fails, Apigee throws an API proxy error with a500 HTTP status code.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.