Fetch information from "site-editor" and modify by API

Good afternoon.

I took a task where I have two identical sites. But one of them has the editor site configured and my task would be to get the information from one site and pass it to another.
But doing it manually is pretty tedious.

Is there any way to look up how the publisher site of a site is configured and get this information and move to another site. Using a get/query and then a put/mutation.

1 Like

Hey @1marlonpassos, could you please clarify the following:

  • Are both sites owned by the same VTEX customer?
  • Do both sites use the same store theme (including app name and version)?
  • Do you have access to their admin panel?

I looked around quite a bit and didn’t find a straightforward way to do what you want. But if something like that is possible, it will probably be done through the GraphQL APIs for vtex.pages-graphql@2.x.

Unfortunately, we don’t have any public documentation about those APIs. To check out the queries and mutations available, you can:

  1. Install vtex.admin-graphql-ide in your VTEX account
  2. Open your admin at https://{{accountName}}.myvtex.com/admin/graphql-ide
  3. Select vtex.pages-graphql@2.x in the dropdown
  4. Click on the Docs button in the top-right corner of GraphiQL to open the Documentation Explorer

@georgebrindeiro

  • Are both sites owned by the same VTEX customer?
    yes, what changes are the accounts here
    image
  • Do both sites use the same store theme (including app name and version)?
    no, the account name is different

  • Do you have access to their admin panel?
    yes, i have full acess