URL (Method)

The url method is a function method that is used to act as a 'proxy' for another API.

Unlike the Redirect method, this endpoint hides the URL of the eventual destination.

It's generally used when there is something blocking network traffic between the end user and an existing API endpoint, or when the results from an API endpoint need to be translated/converted before use.

Additional Info.json Parameters

This method requires a url parameter - this is the full url to the 'real' API function. This path can include substitutions.

How It Works

For this method, the user-provided parameters are available as Substitutions.

For example, the following info.json file…

{
    "name": "Testing",
    "method": "redirect",
    "path": "[SERVER]/api/random?message=[msg]",
    "parameters": [{ 
             "name": "Message",
             "type": "string", 
             "tag": "msg",
             "default": "Hello World"
    }].
   "folder": "Testing"
}

…would result in the following steps if it was called with the default parameter values.

Building the Full URL

The full URL would be built up from the available substitutions, from…

[SERVER]/api/random?message=[msg]

to

myardiserver.com/api/random?message=Hello World

Proxying the Function Call

The URL would then be called from the ARDI server. The results would then be delivered back to the caller.