Get Conversation History

get

/ai/applications/{applicationName}/databases/{databaseName}/conversationHistory

Gets full query/response sequence for a conversation.

Request

Path Parameters
Query Parameters
Back to Top

Response

200 Response

OK

Conversation history retrieved successfully.

400 Response

Bad Request

Failed to retrieve conversation history.

Back to Top

Examples

The following example shows how to fetch full query/response sequence for a conversation.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

Script with cURL Command

call properties.bat
curl -X 'GET' \ 
'http://myserver.example.com:9000/essbase/rest/v1/ai/applications/Sample/databases/Basic/conversationHistory?profileName=SAMPLE_BASIC__CHAT_PROFILE_1784114662000' \  
-H 'accept: */*' \
-u %User%:%Password%

Example of Response Body

The response includes the full query/response for the conversation in JSON format:

{  
   "query1": "get me sales for diet-cola",
   "response1": "WITH\nSET [SQSET0] AS 'DISTINCT({[100-20]})'\nSET [SQSET1] AS 'DISTINCT({[Sales]})'\nSET [SQSET2] AS
                'DISTINCT({[SQSET1]})'\nSELECT\n{[SQSET2]} ON ROWS,\n{[SQSET0]} ON COLUMNS\nFROM [Sample].[Basic]",  
   "info1": "The query requests sales data for the product 'diet-cola'. The dimensions involved are 'Measures' and
            'Product', with the members 'sales' and 'diet-cola' respectively.",  
   "memberMap1": "{\"Sales\":\"sales\",\"100-20\":\"diet-cola\"}",  
   "feedback1": "",
   "feedback0": "Instead of \"100-20\", it should be \"Diet\".\n",  

   "query2": "add profit and sales",  
   "response2": "WITH\nSET [SQSET0] AS 'DISTINCT({[Diet]})'\nSET [SQSET1] AS 'DISTINCT({[Profit], [Sales]})'\nSET [SQSET2] AS 
                'DISTINCT({[SQSET1]})'\nSELECT\n{[SQSET2]} ON ROWS,\n{[SQSET0]} ON COLUMNS\nFROM [Sample].[Basic]",  
   "info2": "The query now includes both 'sales' and 'profit' measures for the product 'diet-cola'. The dimensions in
             focus are 'Measures' and 'Product'.",  
   "memberMap2": "{\"Sales\":\"sales\",\"Profit\":\"profit\",\"Diet\":\"diet-cola\"}",  
   "feedback2": ""
}
Back to Top