I'm making a request to an API through a service callout but it keeps returning 404.
Target url : https://{target_endpoint}/api/v1/test
where target_endpoint : usdevelopment.xyz.abc.com (dev environment)
The same request when made via POSTMAN or CURL returns the expected response.
Also, the above service callout works fine for stage and prod environments where target_endpoint : stage.abc.com and prod.abc.com
Provide your Service Callout policy XML and Trace requests if possible.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceCallout async="false" continueOnError="false" enabled="true" name="Callout-Auth-Server"> <DisplayName>Callout-Auth-Server</DisplayName> <Properties/> <Request clearPayload="true" variable="ServiceRequest"> <Set> <Headers> <Header name="Authorization">Bearer {request.header.AUTH_TOKEN}</Header> </Headers> </Set> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> </Request> <Response>ServiceResponse</Response> <HTTPTargetConnection> <URL>https://{target_endpoint}/api/v1/test</URL> </HTTPTargetConnection> </ServiceCallout>
Did you find anything in Trace Session?
Answer by Siddharth Barahalikar
·
Jan 08 at 06:09 AM
Since you are getting this in only one environment, have a look at this doc,
https://community.apigee.com/questions/57372/we-are-getting-404-response-for-all-the-apis-in-a.html
If this is an APigee ENterprise CLoud, maybe raise a ticket in,
https://apigee.com/about/support/portal
If it is on-prem then check the files yourself or get in touch with your operations team.