I’m trying to instrument a specific API call within a CXone Studio flow to capture latency metrics in New Relic. I need to hit an internal endpoint that returns JSON, parse the response, and assign a value to a session variable.
I’ve configured the REST Proxy in Studio settings with the base URL and required headers. The proxy ID is proxy_internal_metrics. Here is the snippet code I’m using:
{
"action": "GetRESTProxy",
"input": {
"proxyId": "proxy_internal_metrics",
"method": "GET",
"path": "/api/v2/analytics/interactions/summary"
}
}
When the flow reaches this action, it fails immediately with INVALID_FUNCTION. The error log says the function signature doesn’t match. I’ve checked the proxy ID spelling multiple times. It’s definitely correct. I also tried passing the full URL in the path field, but that didn’t help either.
The documentation mentions that GetRESTProxy requires the proxy to be active and associated with the current skill group or flow. Both conditions are met. Is there a specific way to format the input object for GET requests? Or do I need to handle the response parsing in a separate ASSIGN action? I’ve been stuck on this for two hours. The proxy works fine when I test it via the UI preview, but the snippet execution fails.
Any ideas on what’s missing in the JSON structure? I’m using the latest Studio version.