Expected to find an object with property ['data'] in path $['results'] but found 'java.util.ArrayList'

I'm trying to set up an action that gets the number of calls waiting in a queue. I'm struggling to understand the following error: "Failed while processing the translation map. Could not resolve value for the key: 'stats_count' and no default value was configured. Additional details: Expected to find an object with property ['data'] in path $['results'] but found 'java.util.ArrayList'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'."

URL Template: /api/v2/analytics/queues/observations/query

Request Body Template:

{
  "filter": {
    "type": "and",
    "clauses": [
      {
        "type": "and",
        "predicates": [
          {
            "type": "dimension",
            "dimension": "queueId",
            "operator": "matches",
            "value": "6d4d1261-d51c-46de-a486-9f93f11065b9"
          }
        ]
      }
    ],
    "predicates": [
      {
        "type": "dimension",
        "dimension": "mediaType",
        "operator": "matches",
        "value": "voice"
      }
    ]
  },
  "metrics": [
    "oWaiting"
  ]
}

Raw Output:

{
  "results.group.mediaType": [
    "voice"
  ],
  "results.data.metric": [
    [
      "oWaiting"
    ]
  ],
  "results.data.stats.count": [
    [
      0
    ]
  ],
  "results.group.queueId": [
    "6d4d1261-d51c-46de-a486-9f93f11065b9"
  ]
}

Any help would be very much appreciated

Hello,

You can have a look at this post - it is also about a Data Action on /api/v2/analytics/queues/observations/query. Contract and configuration is described there.

Regards,

1 Like

If you are not able to get this figured out with the link that Jerome posted, please include the output from the "Execute" step of test mode and your translation map configuration.

--Jason

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.