Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to handle dynamic path variable checks and conditional flows?

It may be a simple thing but not sure how to implement it.

Case is I have three resources:

  • /{customerId}
  • /{customerId}/contacts
  • /{customerId}/language
  • unknownresource -- flow without a condition for handling unknown resource requests.

Now I want to put a check if customerId is passed in for all the three resources, so I'm using ExtractVariable for extracting customerId.

If I have a request like /12345 customerId will be "12345", but If I'm doing //contacts APIGEE is removing // and populating customerId with "contacts" and executing /{customerId} flow.

I want to either raise a fault where customerId is null/empty or it should go for a unknown resource flow.

Is there any way we can achieve this for 2nd and 3rd resource?

2 6 1,611
6 REPLIES 6