INVALID_FUNCTION error in CXone Studio Snippet using GetRESTProxy

What is the standard approach to call GetRESTProxy in a CXone Studio Snippet without triggering an INVALID_FUNCTION error? I am building a simple flow that needs to fetch external data via REST. I have tried multiple syntax variations based on the documentation, but the snippet editor throws a compile-time error every time.

Here is my current snippet code:

ASSIGN result = GetRESTProxy().Execute("https://api.example.com/data", "GET", "", "")

The error message displayed is INVALID_FUNCTION: GetRESTProxy is not a recognized function. I have verified that the Studio version is up to date. I also tried GetRestProxy and RestProxy, but those fail with the same error. I am confused because the documentation suggests this is a built-in function for making outbound calls from Studio.

I have attempted the following troubleshooting steps:

  • Checked the Studio Help docs for ‘Outbound REST’.
  • Verified that the target URL is HTTPS and not blocked by firewall.
  • Ensured no typos in the function name.
  • Tried passing headers as a JSON string in the third parameter.

Despite these attempts, the function remains unrecognized. Is there a specific library import required? Or is the syntax different for the current Studio release? I am using the .NET SDK for other parts of the project, but this specific call is inside the Studio flow logic, so I assume it uses the internal scripting engine. Any working example of the exact ASSIGN statement would be appreciated.