Exporting and importing the whole schema

Hello,
I’m looking for a way to export all the fields in a given schema, so they can be translated and then hopefully the translation imported. I found the bit about exporting to a CSV file, but it says “You have to specify the fields to export.” I have over a hundred fields in my schema. Do I really need to write a list of all of them? Could you please elaborate on the topic a bit? The documentation is a bit terse.

Thank you.

The problem with CSV is that there is no one-to-one mapping from and to JSON. Therefore you have to specify it. Of course I could improve the CLI to make some defaults.

But in your case it might make sense to write a custom tool. It is not that much effort to just use the API for that.

Thank you for the clarification. I have decided to go with JSON for now. I was able to export the contents of my schema like this:
sq content export myschema --format=JSON

Then I edited the content of a single field in the json, just to test it. Then I tried to import:

sq content import myschema myschema_2020-05-20-09-14-34.json --format=JSON

This is what I got back:
’ImportArguments’ is invalid
’Fields’ should not be empty.
followed by the help page on content import.
The documentation has led me to believe that if I’m importing a JSON file, I don’t have to provide the list of fields. It’s also what I’d expect, considering the format of the JSON file is identical to what’s on the server. What am I missing?

Thank you.

The importer supports other json formats. therefore you have to specify the fields from now…

Is there an example on how to do it? Can I provide a file with the format, or do I have to type all 150 of my field definitions in the console?

I am worried that you have to do it manually :frowning: … I see if I can extend the CLI … or your provide a PR? :wink:

I certainly don’t have the time to contribute to Squidex development, unfortunately.

Are you using the cloud version?

No, we have local servers.

Then your only option is to add all 150 fields for now …sorry. :frowning: