This discussion has been migrated from our Github Discussion #5925
hello,
is anyone here have experience to fetch data from external api and display it within strapi admin?
and using all the functionality of content-manager to manage it (crud function)?
for example given this extenal api as an example
https://jsonplaceholder.typicode.com/posts
please assist
Responses to the discussion on Github
Maintainer
Hello! Do you have the access of the database?
To create/update/delete data? Not only fetch.
Or you want to map the Strapi admin on an API instead of a database?
Not sure to exactly understand what you are trying to do.
Author
well the use case are assuming that we are given external rest api that enable all create, update, and delete. and want to be able to access and edit that data respectively within strapi admin .
any thought ?
Maintainer
You can create a view in the content manager so here are some thoughts:
- First create a new
<Route />
by extending this file
- Then if you want the link to appear in the left menu you should look at this one in order to inject a link in either the collection type or content type section
Author
i dont think we can achieve that by doing so.
to make it simple, we are given this api
[GET ALL] localhost:3000/api/v1/product/
[GET BY ID] localhost:3000/api/v1/product/:id
[POST] localhost:3000/api/v1/product
[PATCH]localhost:3000/api/v1/product/:id
[DELETE] localhost:3000/api/v1/product/:id
any clue/help ??
hey @dunods maybe you can do a lambda/openfaas function that writes that data into Strapi, no?
Author
thats not what im trying to achieve, where the scenario are the strapi has its own database as a micro services and there are some other external api that we want to manage/manipulate within the strapi admin dashboard. yes we can trigger callback by creating lambda function to create object to strapi, but by doing so we will have lotsa data redundancy.
Hey,
have you found a solution?
@dunods @sawden hope it’s not too late, this is the solution I found External Data - Strapi Developer Documentation
Maintainer
And if you want to display stuff in your admin, you will have to customize your admin by creating a plugin (to have a new custom interface)
Hello, any solution for this. Even I have the same requirement for a project.