principianteInicio 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.

DecisionRules

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
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).
What You Can Learn from This Template
By utilizing this template, users can learn to implement the following technical patterns:
  1. Perform GET Requests: The flow demonstrates how to query an external endpoint to retrieve broad datasets, such as a full list of global currencies.
  2. 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.
  3. 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.
Check iconA checkmark inside a circle signifying "yes"Minus iconA minus inside a circle signifying "no"PROS IconA plus symbol representing positive aspects or benefits.CONS IconA minus symbol representing negative aspects or drawbacks.

More Templates

See Other Templates

servicios financierossugerido

Pruebas A/B

Descubra una forma sencilla de asignar un grupo de prueba para realizar pruebas A/B en sus decisiones.

Explore
servicios financierossugerido

Precios basados ​​en el riesgo

Descubra una forma sencilla de aplicar una matriz de precios basada en riesgo adecuada en función del tipo de cliente.

Explore
servicios financierossugerido

Normas de elegibilidad y política

Descubra una forma sencilla de definir y ejecutar varios conjuntos de reglas y obtener el resultado de la decisión final.

Explore