Invoke
Calls an external backend service and processes the response.
Use the Invoke policy to call an external backend service and route the response back into the assembly for further processing.
For more information on the policy parameter descriptions, see DataPower Nano Gateway documentation.
Example of an Invoke policy in code view.
kind: Invoke
apiVersion: apim.ibm.com/v1
metadata:
name: invoke_1
version: 1.0
namespace: sample
spec:
# Input and Output elements below are used to set the request and response context that will be used when involving the backend.
# Default request and response context will be used, if none is specified. Different contexts can be set by specifying the context name.
# Any modifications to the context (changing the header, payload etc) are done using the transformation policies
input : request # optional to set the request for the invoke
output : response # optional to store response for the invoke
cache:
expire:
static: # fromMessageHeader , fromVariable
seconds : 60
scope:
narrowScope : {} # wideScope
endpoint:
http:
verb: GET
statusException:
- pattern: '500'
target:
tlsClientProfile: some_tls_profile
url: 'https://server1:3000'
urlType: 'plain'
version: HTTP/1.0 # HTTP/1.1, HTTP/2
timeout: 60
compression: false
chunkedUploads: false
persistentConnection: true