Class AnalyticsAssistantResource
- java.lang.Object
-
- lumis.service.analytics.assistant.AnalyticsAssistantResource
-
@Path("/lumis/service/analytics/assistant/{serviceInstanceId: [a-fA-F0-9]{32}}") public class AnalyticsAssistantResource extends java.lang.Object
REST resource used by the analytics assistant service.- Since:
- 17.0.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description AnalyticsAssistantResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createReport(java.lang.String body)
Creates a new report.java.lang.String
getConfig()
Returns configurations for the virtual assistant.void
prompt(javax.ws.rs.sse.SseEventSink eventSink, javax.ws.rs.sse.Sse sse, lumis.service.analytics.assistant.AnalyticsAssistantResource.PromptRequest request)
Prompts the virtual assistant for a response to a conversation.
-
-
-
Method Detail
-
getConfig
@GET @Path("config") @Produces("application/json") public java.lang.String getConfig() throws PortalException
Returns configurations for the virtual assistant.- Returns:
- a JSON object with the configurations, or an object with an
error
string field if the virtual assistant is not available. - Throws:
PortalException
- Since:
- 17.0.0
-
prompt
@POST @Path("prompt") @Produces("text/event-stream") @Consumes("application/json") public void prompt(@Context javax.ws.rs.sse.SseEventSink eventSink, @Context javax.ws.rs.sse.Sse sse, lumis.service.analytics.assistant.AnalyticsAssistantResource.PromptRequest request) throws PortalException
Prompts the virtual assistant for a response to a conversation.- Parameters:
eventSink
- SSE event sink.sse
- SSE API object.request
- the request data.- Throws:
PortalException
- Since:
- 17.0.0
-
createReport
@Path("/createReport") @POST @Consumes("application/json") public java.lang.String createReport(java.lang.String body) throws PortalException
Creates a new report.This endpoint is used by the analytics assistant to create a new report. It requires both
view_assistant
andmanage_analytics
permissions.- Parameters:
body
- a JSON object containing areportDefinition
attribute with the definition of the report to be created.- Returns:
- the identifier of the created report.
- Throws:
PortalException
- Since:
- 17.0.0
-
-