Internal API Call
Internal API Call allows users to invoke an internal call based on the settings defined.
Configuring the interceptor
The images and text below present the information that must be informed to configure the interceptor.
-
Variable Name: defines the name of the Internal API Call, unique per flow. The interceptor is retrieved inside the object
$call.contextVariables.get(“Variable Name”)
using the name informed here. -
API: API to be invoked.
-
Revision: revision of the API to be invoked.
-
Resource: resource to be invoked.
-
Operation: operation to be performed.
You can only invoke an API that is deployed to the same environment as the API to whose flow you are adding the interceptor. Going back to the APIs in the example of use above, to call the API "AuthenticateUser", it must be deployed to the same environment as the API "SearchSalesInformation", which is the one that contains the Internal API Call interceptor. If you wish to invoke an API that is not deployed to the same environment, you must first deploy it. Remember that you can deploy an API to multiple environments. You can read more about deploying APIs here. |
-
Preserve Query String: if checked, the query string present in the request will be transferred to the API invoked internally.
-
Query: allows the insertion of a query string.
-
Preserve Path Param: if checked, the path param present in the request will be transferred to the API invoked internally.
-
Path Param: allows the insertion of a path param.
-
Preserve Body: if checked, the body contained in the request will be transferred to the API invoked internally. This field is enabled when the method is different from GET.
-
Body: allows the insertion of a body. The field is enabled when the method is different from GET and the field Preserve Body is unchecked.
-
Preserve Headers: if checked, the headers present in the request will be transferred to the API invoked internally.
-
Headers: allows the insertion of headers.
How it works
The Gateway executes the Internal API Call interceptor, and the result is added to the Gateway object $call.contextVariables
.
To retrieve the result with a custom interceptor, use $call.contextVariables.get(“Variable Name”)
.
The call to $call.contextVariables.get
will return a RestResponse object.
Share your suggestions with us!
Click here and then [+ Submit idea]