Execute form code from URL (POST) without navigating to it


I apologize in advance if this is a dumb question.

I understand that you can have RESTful calls in xWiki but unfortunately I am a complete dummy concerning that kind of coding. I have read the documentation but it is understandably written with the assumption that the reader has experience with rest calls.

Here is what I am trying to do:

I have an AppWithinMinutes app that I have altered to perform certain actions by clicking a custom button e.g.

Everything on the form works great. However, I would like to have another page cycle through all of the documents in the AppwithinMinutes application and trigger the same code, as a sort of “batch processing mode:” meaning the URL would be something like http://myhost:myport/xwiki/…?fBatchAction=Analyze+Import+Data

But I do not want the browser to navigate to those documents, I just want it to perform the actions already resident in the document’s script. I thought I could use a method from the $xwiki object, but nothing appears to trigger it.

I then looked into the REST documentation but couldn’t figure out how to invoke curl calls in xWiki.

Can some kind soul give me an example of how to make a call to an appwithinminutes document with the URL appended with the actions I need?