Hi, I am trying to connect to this API: https://api.mypurecloud.de/api/v2/analytics/conversations/aggregates/query
using PowerBI but I'm getting an error.
My query is:
let
Content= "{
""query"": [
{
{
""interval"": ""2022-04-18T08:00:00.000Z/2022-04-18T08:30:00.000Z"",
""groupBy"": [
""userId""
],
""metrics"": [
""tTalk""
],
""filter"": {
""type"": ""and"",
""predicates"": [
{
""dimension"": ""mediaType"",
""value"": ""voice""
}
]
},
""paging"": {
""pageSize"": 25,
""pageNumber"": 1
}
}
],
""response"": {
""format"": ""json""
}
}",
Source = Json.Document(Web.Contents("https://api.mypurecloud.de/api/v2/analytics/conversations/aggregates/query", [Headers=[Authorization="Bearer -------------------", Accept="application/json", #"Content-Type"="application/json"]]))
in
Source
and I'm getting this error :
Can't figure out what's missing, I'd love help