Shared flow bundle configuration reference

This page applies to Apigee and Apigee hybrid.

View Apigee Edge documentation.

A shared flow is reusable functionality similar to an API proxy. For more information, see Creating reusable shared flows.

Shared flow bundle directory structure

The shared flow bundle directory structure, shown below, is similar to the API proxy configuration directory structure.

Shared flow bundle directory structure

A shared flow bundle configuration consists of the following contents:

Base configurationPrimary configuration settings.
PoliciesXML-formatted configuration files that conform to the Apigee policy schemas.
ResourcesScripts, JAR files, and XSLT files referenced by policies to execute custom logic.
Shared flowsShared flows included in this bundle.

Base configuration

The base configuration file is located at the bundle's root directory. Its name is the name of the bundle.

/sharedflowbundle/traffic-management-shared.xml

The base configuration defines the contents of the shared flow bundle, along with information for tracking the bundle's revision history.

<SharedFlowBundlerevision="2"name="traffic-management-shared"> <ConfigurationVersionmajorVersion="4"minorVersion="0"/> <CreatedAt>1478637529218</CreatedAt> <CreatedBy>gladys@example.com</CreatedBy> <Description>SharedflowtomoderateAPItraffic</Description> <DisplayName>traffic-management-shared</DisplayName> <LastModifiedAt>1481573374023</LastModifiedAt> <LastModifiedBy>gladys@example.com</LastModifiedBy> <Policies> <Policy>Auth-Flow-Callout</Policy> <Policy>Extract-Token</Policy> <Policy>Spike-Arrest</Policy> </Policies> <Resources> <Resource>jsc://extract-token.js</Resource> </Resources> <SharedFlows> <SharedFlow>default</SharedFlow> </SharedFlows> </SharedFlowBundle>

Base configuration attributes

NameDescriptionDefaultRequired?
SharedFlowBundle
nameName of the shared flow bundle, which must be unique within an organization. Valid characters include: A-Za-z0-9_-N/AYes
revisionRevision number of the shared flow bundle configuration. You do not need to explicitly set the revision number since Apigee automatically tracks the current revision of the shared flow.N/ANo

Base configuration elements

NameDescriptionDefaultRequired?
SharedFlowBundle
ConfigurationVersionVersion of the shared flow bundle configuration schema to which this shared flow conforms. The only supported value currently is majorVersion 4 and minorVersion 0. This setting may be used in the future to enable evolution of the shared flow bundle format.4.0No
CreatedAt and CreatedByDate/time (in epoch time) that the shared flow bundle was created, and the email of the user who created it.
DescriptionTextual description of the shared flow. If provided, the description will display in the Apigee UI.N/ANo
DisplayNameUser-friendly name that may be different from the name attribute of the shared flow configuration.N/ANo
LastModifiedAt and LastModifiedByDate/time (in epoch time) that the shared flow bundle was last modified, along with the email of the user who modified it.
PoliciesList of policies in the /policies directory of this shared flow. You will normally only see this element when the shared flow was created using the Edge management UI. This is simply a 'manifest' setting, designed to provide visibility into the contents of the shared flow.N/ANo
ResourcesList of resources (JavaScript, Python, Java, XSLT) in the /resources directory of this shared flow. You will normally only see this element when the shared flow was created using the Apigee UI. This is simply a manifest setting, designed to provide visibility into the contents of the shared flow.N/ANo
SharedFlows Shared flow that this bundle contains. N/AYes

Policies

/sharedflowbundle/policies

As in an API proxy, in a shared flow bundle the /policies directory contains configuration XML for all policies available to be attached to the shared flow in the bundle. Policies share a subset of elements, though this subset is augmented with elements that are specific to the policy. For more about how to configure a policy, Policy reference overview.

Resources

/sharedflowbundle/resources

Resources are scripts, code, and XSL transformations that can be attached to shared flows using policies. These appear in the Scripts section of the shared flow editor in the management UI.

See Managing resources for the supported resource types.

Shared flows

/sharedflowbundle/sharedflows/default.xml

The SharedFlow configuration defines the sequence in which flow elements should be executed. The <SharedFlow> element's <Step> child elements each specify a part of the sequence, such as a call to a policy.

The following SharedFlow configuration specifies three policies to be executed in a top-to-bottom sequence (left to right in the management console), with the SpikeArrest policy first and a FlowCallout policy last.

<SharedFlow name="default"> <Step> <Name>Spike-Arrest</Name> </Step> <Step> <Name>Extract-Token</Name> </Step> <Step> <Name>Auth-Flow-Callout</Name> </Step> </SharedFlow>

Shared flow configuration attributes

NameDescriptionDefaultRequired?
SharedFlow
nameThe name of the shared flow, which must be unique within an organization. Valid characters include: A-Za-z0-9_-N/AYes
revisionRevision number of the shared flow configuration. You do not need to explicitly set the revision number since Apigee automatically tracks the current revision of the shared flow.N/ANo

Shared flow configuration elements

NameDescriptionDefaultRequired?
SharedFlowSequence of policies in the shared flow.N/AYes
StepStage in the flow's sequence.N/AYes
NameName of the item referenced by the step. This element's value should be the same as the item's unique identifier, such as a policy's name attribute value.N/AYes