Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Connecting with power bi

    Posted 06-05-2025 19:22

    yael | 2022-04-19 12:42:08 UTC | #1

    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 :slight_smile:


    Jerome.Saint-Marc | 2022-04-19 13:07:57 UTC | #2

    Hello,

    I don't know anything about Power BI but doing a Google Search and seeing the query you have posted above, are you sure you are sending an HTTP POST with a body?

    I don't see you passing Content to your request (the request body). And in this case, according to this PowerQuery article, if no Content (body) is set, it will trigger an HTTP GET. Which would explain why the request is rejected by Genesys Cloud with 405 Method Not Allowed - as this API endpoint is supported via HTTP POST only.

    Regards,


    system | 2022-05-20 13:08:07 UTC | #3

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


    This post was migrated from the old Developer Forum.

    ref: 14366