Error 404 when running basic check on base path of sep

hassan
New Member

I am getting error after trying to access symantec sepm api. Error:


Response received from target server404 Not Found. Seems the base path which is

(/sepm/api/v1/) is not being sent to target correctly. Please assist.

0 7 238
7 REPLIES 7

Hi @Hassan Mbatch, we need more info.

Provide some sample code/screenshots

hassan
New Member

I am not able to deploy your proxy.

I have manually extracted it and see that, it is a basic passthrough reverse proxy.

when you hit the endpoint it should append the proxy suffix to targetendpoint.

Can you make a call & share the Trace screenshot?

7679-screen-shot-2018-11-08-at-15753-pm.pngHere is the screenshot. Thanks!

Also the full trace session. trace-1541703426203xml.zip

Ok, I think the issue is with basepath,, Check about basePath here,

https://docs.apigee.com/api-platform/reference/api-proxy-configuration-reference#proxyendpoint-proxy...

Whatever we give in basepath will not be appended to target endpoint. So modify your base path like below and make calls, http://xxxx-test.apigee.net/base-path/sepm/api/v1/

 <HTTPProxyConnection>
        <BasePath>/base-path</BasePath>
        <Properties/>
        <VirtualHost>default</VirtualHost>
 </HTTPProxyConnection>

Or if you want to add some policies use below flow to add policies, and make calls as,

http://xxxx-test.apigee.net/base-path/sepm/api/v1/version

<Flows>
        <Flow name="get_version">
            <Description/>
            <Request/>
            <Response/>
            <Condition>(proxy.pathsuffix MatchesPath "/sepm/api/v1/*") and (request.verb = "GET")</Condition>
        </Flow>
    </Flows>
    <HTTPProxyConnection>
        <BasePath>/base-path</BasePath>
        <Properties/>
        <VirtualHost>default</VirtualHost>
    </HTTPProxyConnection>

..

This was your existing code(which IMO is not an Ideal base path), and if you don't want to make changes, make a call like this,

http://xxxx-test.apigee.net/sepm/api/v1/sepm/api/v1/

 <Flows>
        <Flow name="get_version">
            <Description/>
            <Request/>
            <Response/>
            <Condition>(proxy.pathsuffix MatchesPath "/sepm/api/v1/") and (request.verb = "GET")</Condition>
        </Flow>
    </Flows>
    <HTTPProxyConnection>
        <BasePath>/sepm/api/v1/</BasePath>
        <Properties/>
        <VirtualHost>default</VirtualHost>
        <VirtualHost>secure</VirtualHost>
    </HTTPProxyConnection>

7681-trace.jpg

Yes, that does seem to fix it. It seems the language of base_path in the proxy creation wizard is confusing to me. Thanks for all your help on this one.