Hello,
A path variable is extracted and assigned to a variable est_id succesfully. When it is used in the middle of a HTTPTargetConnection URL it is appended to the end.
<HTTPTargetConnection>
<URL>https://anyhost/api/Est/{est_id}/Employees</URL>
</HTTPTargetConnection>
est_id is 324324
I see this call in Postman debug session as below
<URL removed by staff> but it should be <URL removed by staff>
How can i fix that?
Hi @gungorr - Thank you for your question! We noticed it hasn’t received any replies yet, but we’ll keep an eye on this conversation. In the meantime, we encourage other community members to share their insights if they’ve encountered a similar situation.
If you’d like to share more details, feel free to add them here—it might help others provide more targeted suggestions. Also, we invite you to look at our recent articles by expert Googlers. 😊
Hi @gungorr !
Unfortunately the example url's are not displayed in your message, it says "url removed by staff".
If I get it right, your expected url is
https://anyhost/api/Est/324324/Employees
But what is the actual result of your configuration?
I suspect that it might be related to the automatic path-suffix copying mechanism.
Here's an earlier discusson in the topic, I hope it would help:
https://www.googlecloudcommunity.com/gc/Apigee/How-do-I-modify-a-path-before-chaining-to-a-second-pr...
So I would suggest to try the followings:
(A)
1. use a named TargetServer, that contains the hostname only.
2. in the targetRequest flow, set the target.copy.pathsuffix to false (with AssignMessage(AM) / JavaScript(JS) policy)
3. set your custom path to the required value
it's important to do these steps in the target request flow, not 'earlier'!
(B)
1. set the variabletarget.url , the value must be the full url, with protocol+host+path etc..
it's important to do it in the target request flow, not 'earlier'!
you can use javascript, or an AM policy.
general best practice
set the required PATH / target.url value first as a custom variable (in JS, or AM policy).
and then use your custom variable to set the apigee variable.
Even if it means an additional step/polciy, it gives you the opportunity to track the process more precisedly, and see where the things went wrong - which I hope won't happen in your case.
I hope I could help, but if not, pls feel free to ask for more assistance.
I'm waiting for your response,
Cheers,
Marcelo
Hey @MarciSoos, we truly appreciate the time and effort you put into such a detailed and insightful reply. It’s incredibly valuable to the community, and we’re grateful for your engagement in helping.
@gungorr, we hope Marcelo’s suggestions provide the clarity and guidance you were looking for. If you find his reply resolves your question, we encourage you to mark it as an accepted solution. Doing so helps other community members facing similar issues quickly find the right answers.
We’re excited to see this kind of collaboration in the community and look forward to your continued participation as we grow! 🙂