Legacy Dev Forum Posts

 View Only

Sign Up

Error getting analytics conversations details query

  • 1.  Error getting analytics conversations details query

    Posted 06-05-2025 18:16

    Steven_Rodriguez | 2020-02-12 15:33:20 UTC | #1

    Hi everyone, i'm trying to retrieving information about my conversations in a range; I use the "postAnalytic Conversations Details Query(body)" but responses and error:

    // Call conversation API, pass date inputted to extract conversationIds needed try { ConversationQuery body ;//new ConversationQuery().interval(dates); body = new ConversationQuery(); body.setInterval(dates); PagingSpec pagin= new PagingSpec(); pagin.setPageNumber(1); pagin.setPageSize(10); body.paging(pagin);

    System.out.println(body.toString());

    AnalyticsConversationQueryResponse result = _conversationsApi.postAnalyticsConversationsDetailsQuery(body); extractConversationDetails(result); } catch (Exception e) { System.err.println("Exception when calling ConversationsApi#postAnalyticsConversationsDetailsQuery"); e.printStackTrace(); }


    tim.smith | 2020-02-12 15:42:33 UTC | #2

    Can you provide some information about the error?


    Steven_Rodriguez | 2020-02-12 15:53:29 UTC | #3

    ok, i'm new in the purecloud sdk so i'm trying the code to download records from a range. https://developer.mypurecloud.com/api/tutorials/recordings-downloader/index.html?language=java&step=2

    i have exactly this code... but it don't work. I tried to run the post/analytics/details Query in the api developer tools and it bringme the correct response.


    tim.smith | 2020-02-12 15:54:42 UTC | #4

    I need information about the error you're getting to be able to help you resolve it.


    Steven_Rodriguez | 2020-02-12 15:55:57 UTC | #5


    DownloadConversations******* class ConversationQuery { interval: 2020-02-10T00:00:00/2020-02-11T00:00:00 conversationFilters: [] segmentFilters: [] evaluationFilters: [] mediaEndpointStatFilters: [] surveyFilters: [] order: null orderBy: null aggregations: [] paging: class PagingSpec { pageSize: 10 pageNumber: 1 } } Exception when calling ConversationsApi#postAnalyticsConversationsDetailsQuery com.mypurecloud.sdk.v2.ApiException: error at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:554) at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:563) at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:642) at com.mypurecloud.sdk.v2.api.ConversationsApi.postAnalyticsConversationsDetailsQuery(ConversationsApi.java:7960) at com.mypurecloud.sdk.v2.api.ConversationsApi.postAnalyticsConversationsDetailsQuery(ConversationsApi.java:7929) at com.mycompany.testing.Main.downloadConversations(Main.java:102) at com.mycompany.testing.Main.main(Main.java:213) Exception catch!.


    Steven_Rodriguez | 2020-02-12 15:56:33 UTC | #6

    i'm printing the body reques, before the catch exception.


    anon28885283 | 2020-02-13 03:21:49 UTC | #7

    Hi,

    Could you add this inside the catch block so we'd see the actual HTTP response from the server: ` System.out.println(((ApiException)e).getRawBody());`

    Also add this at the top with the imports: import com.mypurecloud.sdk.v2.ApiException;

    I'll update the tutorial with those additions as well.


    Steven_Rodriguez | 2020-02-13 14:46:34 UTC | #8

    Hi @anon28885283, i solved the problem; The problem was in the users permissions in my purecloud account.


    system | 2020-03-15 14:46:36 UTC | #9

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