Although this related to partial bitstream but I think it still holdup:
As I had investigate this months ago, which the only way to make it work easiest way is first store the bitstream file name before you load it and store the info & status to a file via Python script and make that only access restricted to i.e. “USER” and so it will be unique and no accident overwrite problem.
If you had concert about accident power cycle introduce a boot status check before the load. So first update that unique file and all should work beautifully in such restricted environment.
That API I think it is just similar to what I had tried to manually add lines in the script. But what actual bitstream info it had loaded are only depends on the load file but not after loading and retread from the loaded file. There is a different between the above cases.