Correct method for taking screenshots via API?



Hi,

Im working on a update of my KodiKontroller web app and currently looking at retrieving screenshots of Kodi.
I have it working with this JSON packet;

Code:
{
        "jsonrpc": "2.0",
        "method": "Input.ExecuteAction",
        "params": {"action": "screenshot"},
        "id": 5
    }

which i stole from Chorus – is this the only method available?

I see in Doxygen that the underlying function can take a URL param for where to save the image, can this be accessed from the API in anyway?
https://xbmc.github.io/docs.kodi.tv/mast…unctions_5 TakeScreenshot(url[,sync)

Or is it possible to set the screenshot location programmatically?