I am currently getting into scripting by writing a script that can do the equivalent of "Sync Layer Channels to Original" to all reference layers (because it's time consuming to do it one layer at a time manually). There's a property that animation channels have inside the project file's JSON data called "ref" which allows this to happen when set to True. The problem is that the scripting API cannot access this for some reason (even though its right next to ones that can be user accessed).
"transforms": {
"translation": {
"type": "Vec3",
"ref": false, <<< ----- Would be cool if we can set this value in the Lua API.
"mute": false, <<< ---- we can already set this in the API currently.