Arbitrary API Calls
Arbitrarily call APIs from within Gatelang and incorporate offchain data in monitors.
use Fetch from hexagate;
struct Result {
count: integer,
name: string,
age: integer
};
source result: Result = Fetch<Result> {
url: "https://api.agify.io?name=michael",
method: "GET",
interval: 10
};
source name: string = result.name;
rule {
description: "Fetch only a string",
condition: name == ""
};Last updated