Class 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$
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnalyticsAssistantResource

        public AnalyticsAssistantResource()
    • 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 and manage_analytics permissions.

        Parameters:
        body - a JSON object containing a reportDefinition attribute with the definition of the report to be created.
        Returns:
        the identifier of the created report.
        Throws:
        PortalException
        Since:
        17.0.0