viewing Apigee X documentation.
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.
A shared flow bundle configuration consists of the following contents:
|Base configuration||Primary configuration settings.|
|Policies||XML-formatted configuration files that conform to the Apigee policy schemas.|
|Resources||Scripts, JAR files, and XSLT files referenced by policies to execute custom logic.|
|Shared flows||Shared flows included in this bundle.|
The base configuration file is located at the bundle's root directory. Its name is the name of the bundle.
The base configuration defines the contents of the shared flow bundle, along with information for tracking the bundle's revision history.
<SharedFlowBundle revision="2" name="traffic-management-shared"> <ConfigurationVersion majorVersion="4" minorVersion="0"/> <CreatedAt>1478637529218</CreatedAt> <CreatedBy>firstname.lastname@example.org</CreatedBy> <Description>Shared flow to moderate API traffic</Description> <DisplayName>traffic-management-shared</DisplayName> <LastModifiedAt>1481573374023</LastModifiedAt> <LastModifiedBy>email@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
||Name of the shared flow bundle, which must be unique within an organization. Valid
||Revision 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/A||No|
Base configuration elements
||Version of the shared flow bundle configuration schema to which this shared flow
conforms. The only supported value currently is
||Date/time (in epoch time) that the shared flow bundle was created, and the email of the user who created it.|
||Textual description of the shared flow. If provided, the description will display in the Apigee UI.||N/A||No|
||User-friendly name that may be different from the
||Date/time (in epoch time) that the shared flow bundle was last modified, along with the email of the user who modified it.|
||List of policies in the
||Shared flow that this bundle contains.||N/A||Yes|
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 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.
The SharedFlow configuration defines the sequence in which flow elements should be executed.
<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
||The name of the shared flow, which must be unique within an organization. Valid characters include:
||Revision 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/A||No|
Shared flow configuration elements
||Sequence of policies in the shared flow.||N/A||Yes|
||Stage in the flow's sequence.||N/A||Yes|
||Name 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/A||Yes|