What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi Guys, I am trying to add a new Ressource for the Zed api but it seems like the route is not corre
Hi Guys,
I am trying to add a new Ressource for the Zed api but it seems like the route is not correctly resolved. When I access /api/rest/my-ressource it tries to access the myRessourceAction of the RestController instead of the index action. What am I missing?
Comments
-
@UKJSE6T47 can you suggest anything as you worked with and extended Zed API?
0 -
Sure!
Hey Dirk, when did you update Spryker last time, or when did you start the project?0 -
Hi Andriy,
I'm quite new to the project. I think single packages were updated as new features were needed. A general update was not done for quite some time (~2 years), but it is currently work in progress! spryker/kernel is quite current (3.55.0).
I managed to get the route resolving to work by adding the ApiRoutingServiceProvider before other RoutingServiceProvider in the ApplicationDependencyProvider.
What still confuses me is that I have to add the route to the $config[AclConstants::ACL_DEFAULT_RULES] and the AuthConfig otherwise it will redirect me to the backend login page. Is this the correct behavior? As the documentation states that no authorization is yet implemented.
Thank you for your help!0 -
Hey Dirk,
Glad to hear you’ve solved the issue with routing. Please make sure that all the endpoints (customers, products) that we have ootb are available.The Zed API itself doesn’t have it’s own authorization yet, this is true. Since Zed API is also part of the Zed’s infrastructure, you experience a “backend login page redirect” behaviour.
0 -
If you want to introduce the authorization to the Zed API, I can give you couple of hints/advises, based on my own experience - just let me know
0 -
As we will probably need some form of authorization in the future, I am very interested in your experience! I was thinking about adding a new user to the
$config[AclConstants::ACL_DEFAULT_CREDENTIALS]
array.
0 -
@U01A1HDSVS8 I’ll prepare an overview for you and send it to PM, a bit later (most likely tomorrow) 👍
0 -
Thank you very much!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random