@David Pickles:
So, here is an example of a data-node that can be written back to the inode:
node: "{
"enabled": true,
"disp_title": "SPARKMIG",
"disp_extratext": "SPARKMIG",
"channel": "86b21fd7a09526b72f923611171f2482",
"start": 1597825200,
"stop": 1597825800,
"comment": "SPARKMIG",
"episode_disp": "SPARKMIG",
"start_extra": "666",
"stop_extra": "666",
"pri": 0,
"config_name": "1d576f3623710fd83f2d68e114e3329b",
"owner":" klf",
"creator": "klf",
"removal": 183,
"retention": 0,
"uuid": "0bedeb595e08cc6543f827571b6d5eff"
}
Any or all of the key/value-pairs can be removed, except for the last, uuid, since we must know where to put our data. Also, which is not obvious (at least to me) from the documentation, it MUST be "x-www-form-urlencoded", not JSONed, even though all replies will be JSON-formatted:
I write the headers:
var headers = {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}};
and I use stringify to tranlate the data:
var rawDataEncoded = "node=" + encodeURIComponent(JSON.stringify(rawData));
so, the data in the example will take this form (rawData is the above shown node in an array):
node=%7B%22enabled%22%3Atrue%2C%22disp_title%22%3A%22SPARKMIG%22%2C%22disp_extratext%22%3A%22SPARKMIG%22%2C%22channel%22%3A%2286b21fd7a09526b72f923611171f2482%22%2C%22start%22%3A1597825200%2C%22stop%22%3A1597825800%2C%22comment%22%3A%22SPARKMIG%22%2C%22episode_disp%22%3A%22SPARKMIG%22%2C%22start_extra%22%3A%22666%22%2C%22stop_extra%22%3A%22666%22%2C%22pri%22%3A0%2C%22config_name%22%3A%221d576f3623710fd83f2d68e114e3329b%22%2C%22owner%22%3A%22klf%22%2C%22creator%22%3A%22klf%22%2C%22removal%22%3A183%2C%22retention%22%3A0%2C%22uuid%22%3A%220bedeb595e08cc6543f827571b6d5eff%22%7D
It is quite simple, actually, but it is a BITCH if you don't know it, so I thought perhaps a good thing to get into the Docs...?