How to add property to keying-set in 2.8 with Python

With Python I want to add a keyingset and assign properties of lamp (like light, strength) to it.

The Info-Panel is not much of use this time because it shows only “Property added to Keying Set.”

The property I want to add is the color of:[“Spot_Back”].color.

The only thing I found so far is to add a keying set with Python:

Is it possible to do that with Python?

Ah, I found it.
There is a button to export the keying set to a python file. And there I see enough info I can use:
// Keying Set: KeyingSet
import bpy

scene = bpy.context.scene

// Keying Set Level declarations
ks =“KeyingSet”, name=“rig”)
ks.bl_description = ‘rig’

ks.use_insertkey_needed = False
ks.use_insertkey_visual = False
ks.use_insertkey_xyz_to_rgb = True

//ID’s that are commonly used
id_0 = lights[“Sun”]
id_1 = lights[“Sun.001”]
id_2 = lights[“Sun.002”]
id_3 = lights[“Sun.003”]
id_4 = lights[“Sun.004”]
id_5 = lights[“Sun.005”]
id_6 = lights[“Sun.006”]
id_7 = lights[“Sun.007”]

// Path Definitions
ksp = ks.paths.add(id_0, ‘color’, index=-1)