{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • General
    • Edge/API Management
    • Developer Portal
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
This question was closed Sep 21, 2016 at 08:07 AM by archana.
avatar image
0
Question by archana · Sep 21, 2016 at 07:19 AM · 464 Views extractvariablesroute rules

How to extract path from the uri

i have used extract variable policy ,to extract the path suffix and route rule to direct to a specified target basing on the path.

<URIPath name="path"> <Pattern ignoreCase="false">{request.proxy.pathsuffix}</Pattern> </URIPath>

<RouteRule name="Target1"> <Condition>{request.proxy.pathsuffix == "/Facebook/**"}</Condition> <TargetEndpoint>Target1</TargetEndpoint> </RouteRule>

What am i doing wrong ,because it is alwasy calling th default target instead of specified one. @Anilsagar

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0

Answer by davissean   · Sep 21, 2016 at 07:25 AM

instead of request.proxy.pathsuffix, try proxy.pathsuffix in your Condition in the RouteRule.

You don't need to explicitly extract this, as proxy.pathsuffix is already populated in a variable.

See the full list here: docs.apigee.com/api-services/reference/variables-reference

Thanks, Sean

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image archana · Sep 21, 2016 at 07:41 AM 0
Link

<Condition>{proxy.pathsuffix == "/Facebook"}</Condition> I tried this did not work

avatar image hanselm ♦ archana   · Sep 21, 2016 at 09:08 PM 0
Link

Make sure the Conditional RouteRule is specified first, before the Default route rule, as they are evaluated top-to-bottom. Also, instead of using the == operator in the Condition, use the MatchesPath operator.

Follow this Question

Answers Answers and Comments

44 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Extracting an Array from JSON and Build SOAP Request according to number of entities i receive in JSON Request 1 Answer

Extract variable content from an input request Json body using JsonPath is not working as expected 2 Answers

Extract Variables Policy with JSON payload type string but cannot manipulate in node 1 Answer

Extract variable with filter expression on array not working 1 Answer

Unable to extract value from AccessEntity policy resulting XML 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • General
  • Edge/API Management
  • Developer Portal
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges