Can I connect to another WiX site's data collection that I control?

Can I connect to another WiX site’s data collection that I control?

I am currently managing a site.
I would like to use the data in that site’s data collection for a new sister site I am creating.
Is it possible to use Velo to connect the new site to the original site’s data collection?

I would appreciate it if you could give me the specific code or the URL of the API page.

Hello, take a look at how to expose an API from your site Wix HTTP functions API

Thanks AmandaM!
I’ll give it a try😍

@amandam
I have tried the HTTP functions API and was able to display the data collection on our sister site! Thank you very much.

But is it impossible to achieve something like “Dynamic Pages” with this method?

Can you elaborate? You should be able to create dynamic pages on either site and connect them to the available data but perhaps I am not understanding the problem.

Glad the http functions are working out!

Aren’t Dynamic Pages generated in conjunction with the data collection for that site?
What I want to achieve is to create Dynamic Pages based on another site’s data collection.

Maybe I can do this by using GET parameters on each item page?

  1. pass the id to the item page as a GET parameter in the link from the list on the ALL page.
    The item page will use the id as a key and output the item information from the data collection.

(I may be writing this completely wrong :flushed:)

I see what you mean and I have not tested this myself yet, but i did a little googling and it does seem to be possible. See this forum post for example.

I will ask around and if I am able to find more specific information I will share it here when I know.

Thanks for the info!
Both of my sites are within the WiX service, so I wish I could access them directly using the wix-data module instead of JSON…

@mikihiro-fujii Yes, they are all independent websites with their own data but that is an interesting use case you bring up - to have a singular collection backend that can be integrated with the APIs and routed to all sites you own easily. You do have one other option, but this may not be ideal if site A will be always updating the data that site B is receiving and that would be to export the collection all at once and then import it into the new site. This would only work if you don’t need the 2 sites to be connected moving forward.

External Databases is what you need: https://www.wix.com/velo/reference/spis/external-database-collections

Yes, that is the way to do it if you have the data in a database outside of Wix. Also an option if you want to move your data out. Thanks for bringing this up as well!

@amandam
“to have a singular collection backend that can be integrated with the APIs and routed to all sites you own easily”.
This is a good reason for users to stick with WiX, isn’t it?
Currently, I’m also considering using Webflow.

And thanks for the idea of an additional way!
I can’t use that method because the two sites need to stay in sync, but I might be able to use zapier or Integromat to sync them…:thinking: (I’ve never done those things, though.)

@shantanukumar847
Thanks!
I’ll check it out.

@amandam
Do you mean that this method will not work for databases in WiX?

@mikihiro-fujii It will work, its a way to pull in data to a wix site’s database from any data source provided you know how to expose the data source on the other side. In your case the data source can be exposed using wix http functions.

@mikihiro-fujii Apologies for not answering. I think I missed this notification. And yes, what Shan has said will work. I meant it was another option that I had not mentioned yet that you can connect to Wix sites from external data sources for example if you had a database hosted on AWS or Google Cloud.

In. your case, to reiterate what Shan has said - your data is already stored in WiX so it would be easiest to expose the data through HTTP functions. Let us know if you need more!

@shantanukumar847 @amandam

Thank you, both of you!
Let me try to achieve this with HTTP functions first, and if it’s too difficult for me, I’ll ask here.