This one is a little trickier because you have to know the file name ahead of time I think. If you were just printing the same file over and over I could see this being useful. For example to print the file this_one.gcode
that is uploaded to OctoPrint you would use these settings.
and then post a MQTT message to the topic myprinter/print_file
I'm not sure if you could script this with the JSONPath Extract mechanism or not, because I think the person that added that functionality was just doing the substitutions in the REST Parameters
and not necessarily the REST API
settings.