Accessing adapters from the /invoke endpoint

JavaScript adapter procedures can be invoked by issuing an HTTP request to the MobileFirst /invoke endpoint.

The URL pattern for accessing the /invoke endpoint is as follows
http(s)://<server>:<port>/<Context>/invoke
Note: The usage of the /invoke endpoint is discouraged. Consider using the /adapters endpoint even when invoking a JavaScript adapter procedure. For more information, see Accessing adapters from the /adapters endpoint.

The following parameters are required:

Table 1. Parameters for adapter invocation
Property Description
adapter The name of the adapter
procedure The name of the procedure
parameters An array of parameter values

The request can be either GET or POST.

Note: The invocation service uses the same authentication framework as described in the MobileFirst security framework section.
The default security test for adapter procedures contains Anti-XSRF protection, but this configuration can be overridden by either:
  • Implementing your own authentication realm (see Authenticators and login modules for more details).

  • Disabling the authentication requirement for a specific procedure. You can do so by adding the securityTest="wl_unprotected" property to the <procedure> element in the adapter XML file.
    Note: Disabling the authentication requirement on a procedure means that this procedure becomes completely unprotected and anyone who knows the adapter and the procedure name can access it.