inicianteInício fácil
REST API Client
Flow provides an overview of the REST API Client workflow, designed to demonstrate seamless integration between DecisionRules and external REST services.
David Škarka
Template author
The primary goal of this rule flow is to demonstrate how to use the REST API Client node to communicate with external services. It specifically illustrates how to handle GET and POST requests, including the management of request parameters and the retrieval of HTTP responses.
Solution Components
Solution Components
The workflow is composed of several specialized nodes that sequence the logic for external API interaction:
- HTTP Client Nodes: These act as the primary operators for external communication:
- apiPOSTCountryCurrency: Executes a POST request to retrieve the specific name and currency for a country based on a provided ISO 2-character country code.
- apiGETAllCountriesCurrencies: Executes a GET request to retrieve a comprehensive list of all countries and their respective currencies.
- Node assign: Structures the varied results from the HTTP calls into the final workflow output paths (responseGet and responsePost).
By utilizing this template, users can learn to implement the following technical patterns:
- Perform GET Requests: The flow demonstrates how to query an external endpoint to retrieve broad datasets, such as a full list of global currencies.
- Perform POST Requests with Parameters: The workflow shows how to send a JSON body to an external service. For example, it takes an input variable
{input.country}(e.g., "US" or "SG") and passes it within a POST request body to filter specific API results. - Response Mapping: The template illustrates how to capture the raw HTTP response from external services and map that data back into the DecisionRules environment for further logic or final output.
More Templates
See Other Templates
serviços financeirossugerido
Teste A/B
Descubra uma maneira simples de atribuir um grupo de teste para realizar testes A/B em suas decisões.
serviços financeirossugerido
Precificação baseada em risco
Descubra uma maneira simples de aplicar uma matriz de precificação baseada em risco adequada ao tipo de cliente.
serviços financeirossugerido
Critérios de Elegibilidade e Regras da Política
Descubra uma maneira simples de definir e executar vários conjuntos de regras e obter o resultado da decisão final.