Call Rest API
This handler (com.rierino.handler.RestAPIEventHandler) provides ability to make REST based calls to other internal or external services and return their results for API-based integrations.
Handler Parameters
Actions
CallRest
Field
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "Name of the system to make REST call to (url and auth parameters of this system are used)",
"example": "erp"
},
"inputElement": {
"type": "string",
"description": "Json path for the input in request event payload",
"example": "parameters"
},
"outputElement": {
"type": "string",
"description": "Json path for the output in response event payload",
"example": "$.product"
}
}
}
}
}Parameter
Definition
Example
Default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"properties": {
"inputPattern": {
"type": "string",
"description": "JMESPath pattern to apply on data input",
"example": "{id:parameters.productid}"
},
"outputPattern": {
"type": "string",
"description": "JMESPath pattern to apply on data output, before returning response",
"example": "{id:id, stock:totalUnits}"
},
"url": {
"type": "string",
"description": "Url path on the target system for REST call",
"example": "GetInventory"
},
"urlPath": {
"type": "string",
"description": "Payload element to add to the end of REST call url path",
"example": "parameters.language"
},
"authPath": {
"type": "string",
"description": "Payload element to use for auth.* parameters of REST system",
"example": "parameters.auth"
},
"method": {
"type": "string",
"description": "Call method to use",
"default": "GET",
"example": "POST"
},
"contentType": {
"type": "string",
"description": "Content type for REST calls",
"enum": [
"none",
"query",
"application/json",
"application/xml",
"text/xml",
"text/plain",
"multipart/form-data",
"application/x-www-form-urlencoded"
],
"default": "application/json",
"example": "application/xml"
},
"headers": {
"type": "string",
"description": "Json string defining list of headers to add to the request",
"example": "{\"content-encoding\":\"br\"}"
}
},
"patternProperties": {
"^query\\..+$": {
"type": "string",
"description": "Query parameters to pass on the request URL (use keys like \"query.language\")",
"example": "en-US"
}
}
}
}
}
}
}Format
Process
ProduceRest
Commands
RECONFIGURE
Last updated

