This applies to Jenkins 1.402 and later
As such, this is an useful building block for AJAX.
Then from Jelly scripts, use
In the example below, we are pretending that the JEXL expression evaluates to some instance of
As you can see above, one can invoke methods on the proxy created by the
If the Java method returns an object value (such as
JSONObject, etc.), you can use the
StaplerResponse or returning an
Ajax.Response methods to access the full HTTP response.
The method call uses
XmlHttpRequest underneath, and it gets eventually routed to the corresponding method call on the exact instance that was exported.
Parameters of the server Java method
StaplerRequest.bindJSON, so aside from primitive Java data types and typeless
JSONArray, you can use Stapler databinding to accept typed structured data.
value attribute of a
<bind> tag evaluates to