Spryker Backend API to access spryker backoffice.

gajendra_dubey
gajendra_dubey software developer Posts: 1 🧑🏻‍🚀 - Cadet

Hi Team, I want to create backend resource to access backend api and i have created endpoint backend-api.us.spryker.local and defined its entry-point beackendApi. created moduleRestApi and registered. but failed to access http://backend-api.de.spryker.local/moduleendpoint and it is showing error like this

NotFoundHttpExceptionNo route found for "GET http://backend-api.de.spryker.local/"Previous exceptions

  • None of the routers in the chain matched this request GET / HTTP/1.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9 Connection: close Content-Length: Content-Type: Host: backend-api.de.spryker.local Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 X-Php-Ob-Level: 1 X-Real-Ip: 172.18.0.1 (0)

Answers

  • vparannattilcherul
    vparannattilcherul Posts: 16 🧑🏻‍🚀 - Cadet

    You could try clearing the cache of the router. Command to run is;

    console router:cache:warm-up
    

  • profuel
    profuel SSA Sprykee Posts: 78 🪐 - Explorer

    @gajendra_dubey if you're using the latest version of packages, then I suggest you using the command

    console api:router:cache:warm-up

    which you may install adding \Spryker\Glue\GlueApplication\Plugin\Console\RouterCacheWarmUpConsole into \Pyz\Zed\Console\ConsoleDependencyProvider.

    Please let us know how you solved your issue!