Rest API

Overview

The REST API Tool enables the Dataworkz Agent to access any system that exposes a REST API. This can include internal services, SaaS applications, or external systems—with or without authentication.

The tool provides a generic interface to configure HTTPS REST calls so Agents can query, update, or retrieve data programmatically.

When to Use

Use the REST API Tool when you want the Agent to:

  • Connect to internal microservices.

  • Integrate SaaS applications through their REST API.

  • Retrieve or update information from external systems.

Prerequisites

Before creating a REST API Tool, ensure you have:

  • The API endpoint URL.

  • Authentication details, such as API keys or tokens (if required).

  • Knowledge of the HTTP method, headers, payload, and parameters needed for the API call.

Set up:

Creating a REST API Tool

To create a REST API Tool, open the Create Tool page and select REST API from the tool options.

Pick Rest API from the options

About Tool

Every tool should have a clear name and description. This helps the Agent understand the purpose of the tool and when to use it.

Configuration

The configuration defines how the REST API call is made. Most fields can be parameterized using the syntax ${parameter-name} (for example, ${customerId}).

  • URL: Enter the complete API URL, including placeholders for parameters if needed. Example: https://acme.com/api/v1/system/${systemId}/products

  • Method: Choose the HTTP method such as GET, POST, PUT, or DELETE.

  • Body: Provide a request body if the method requires one. Parameters can be included in the template.

  • Headers: Add any headers as key-value pairs, such as Content-Type: application/json.

  • JSON Path: If only a portion of the API response is needed, specify the JSON Path.

Parameters

Parameters are automatically detected from the URL, headers, body, or query string. These can either be input parameters, provided at runtime, or configuration parameters, defined during setup for easier reuse (such as tokens or version numbers).

Output

Define the expected output format. The output should describe how the results of the API call will be presented to the Agent.

Validation

After configuration, test the REST API Tool by providing sample values for the input parameters. The system applies any JSON Path specified and returns the response under the key result.

Last updated