Gramps 5.2.2
Windows 11 docker with LetsEncrypt.
Site is up and running fine in Single Tree Mode. Running on a machine behind my modem with a Type A record pointing to it and port forwarding to the machine.
One admin account only, no users yet and no data imported.
currently logged in as admin.
Now, I’m trying to create a multi-tree setup as my Gramps Desktop have two trees in it I ultimately want to sync. I have a JSON file named ‘tree.json’ like so:
{
"name": "family_1"
}
and trying to create the first tree via the RESTful API like so:
curl -X POST "https://family-site.org/api/trees/" -H "accept: application/json" -H "Authorization: Bearer %GRAMPS_JWT%" -d @tree.json
and getting the following error messages:
{"error":{"code":422,"message":"json: name: Missing data for required field.","messages":{"json":{"name":["Missing data for required field."]}}}}
and I can’t format the json in any config that works. I’ve tried the json structure on the command line before trying this external file method. I’ve also tried:
{
"json": {"name": ["family_1"]}
}
{
"name": ["family_1"]
}
I will keep experimenting, I’ve been to the REST API reference site, as has chatGPT and I just can’t seem to make any progress and would appreciate any insight that someone may have.
On a side note, I first tried to set TREE: * in the yaml file and when I did, I could not sign into the instance any longer with my admin credentials. So it is my assumption that I need to sign in as an admin (site up), then create the multiple trees via REST, and then create owners for those tree, then set the TREE “*” config option and THEN I can sign in somehow with the owner credentials? and in that case, what/how are the admin credentials used for?
I’m SO close to getting this up and running and my family is all waiting to submit stuff, quite exciting. Thx in advance for any insights / help.