React Framework #8286
Closed
Kamlesh-62
started this conversation in
General
React Framework
#8286
Replies: 1 comment
-
I found a solution from Discord with the help of Conard. I changed the 'route' => env('STATAMIC_API_ROUTE', 'api') in api.php and I was triggering the wrong endpoint. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am considering utilizing React as the frontend framework for my Statamic project. I would like to inquire about the most effective approach to obtain all collections, taxonomies, assets, and globals within the React project. Is it feasible to use the REST API to retrieve all this data? If so, could you please guide me on how to test the API and confirm that I am successfully receiving the desired data?
Currently, my project is running on port 8000, and I initiated it using "php artisan serve." To test the API, I attempted to use Postman by sending a request to http://127.0.0.1:8000/api/collections/pages/tree in order to retrieve all the collection entries. However, I encountered a 404 "page not found" error.
I would greatly appreciate your assistance in resolving this issue and any recommendations you may have regarding the best approach to retrieve the desired data from Statamic using React as the frontend framework.
Thank you in advance for your support.
Beta Was this translation helpful? Give feedback.
All reactions