Class UserSegmentationRestAPI


  • @Path("/lumis/service/analytics/usersegmentation/{si:[a-fA-F0-9]{32}}/rest")
    public class UserSegmentationRestAPI
    extends AbstractMonitorResource
    User segmentation resource.
    Since:
    11.0.0
    Version:
    $Revision: 24981 $ $Date: 2022-05-02 16:58:29 -0300 (Mon, 02 May 2022) $
    • Constructor Detail

      • UserSegmentationRestAPI

        public UserSegmentationRestAPI()
    • Method Detail

      • getUsers

        @Path("/users")
        @POST
        @Produces("application/json")
        public Response getUsers​(@FormParam("filters")
                                 String jsonData,
                                 @FormParam("maxSize") @DefaultValue("50") @Min(1L) @Max(50L)
                                 @javax.validation.constraints.Min(1L),@javax.validation.constraints.Max(50L) int maxSize,
                                 @FormParam("startAt") @Min(1L) @DefaultValue("1")
                                 @javax.validation.constraints.Min(1L) int startAt)
                          throws PortalException
        Returns the users list based on the given filters.
        Parameters:
        jsonData - the JSON data of applied filters.
        maxSize - the maximum number of hits of the query.
        startAt - the number of first hit of the query.
        serviceInstanceId - the service instance identifier.
        Returns:
        the users list based on the given filters.
        Throws:
        PortalException
        Since:
        11.0.0
      • getNextActivities

        @Path("/user/{visitorId}/activities/{page}")
        @POST
        @Produces("application/json")
        @Consumes("application/json")
        public Response getNextActivities​(@PathParam("visitorId")
                                          String visitorId,
                                          @PathParam("page")
                                          Integer page,
                                          @QueryParam("firstEventDateMilliseconds")
                                          Long firstEventDateMilli,
                                          lumis.service.analytics.usersegmentation.rest.UserSegmentationRestAPI.NextActivitiesRequest bodyRequest)
                                   throws PortalException
        Returns only activities of user for be appended in the activities of user.
        Parameters:
        visitorId - the visitor user identifier.
        page - the page of pagination.
        firstEventDateMilli - the oldest event date time in the top of event activities list. It avoids to newest events mess up the pagination.
        Returns:
        the next block of activities.
        Throws:
        PortalException
        Since:
        12.1.0
      • saveSegmentation

        @Path("/segmentation/{id:[a-fA-F0-9]{32}}")
        @PUT
        @Consumes("application/json")
        @Produces("application/json")
        public Response saveSegmentation​(String body,
                                         @PathParam("id") @NotBlank
                                         @NotBlank String id)
        Quick save operation for segmentation.
        Parameters:
        segmentationFilter - the segmentation filter.
        id - the segmentation identifier.
        Returns:
        the response.
        Throws:
        PortalException
        Since:
        11.1.0
      • getSegmentation

        @Path("/segmentation/{id:[a-fA-F0-9]{32}}")
        @GET
        @Consumes("application/json")
        @Produces("application/json")
        public Response getSegmentation​(@PathParam("id") @NotBlank
                                        @NotBlank String id)
        Return segmentation by id.
        Parameters:
        id - the segmentation identifier.
        Returns:
        the response.
        Since:
        11.1.0
      • parseToJsonObject

        public static org.json.JSONObject parseToJsonObject​(UserSegmentation userSegmentation)
        Receives a entity and returns a json client format.
        Parameters:
        userSegmentation - the entity.
        Returns:
        the json object.
        Since:
        11.1.0
      • deleteMonitorUser

        @Path("/user/{visitorId}")
        @DELETE
        public void deleteMonitorUser​(@NotNull @PathParam("visitorId")
                                      @NotNull String visitorId)
                               throws Exception
        Delete the monitor user with the given visitorId.
        Parameters:
        visitorId - the visitor identifier of the monitor user.
        Throws:
        Exception
        Since:
        12.3.0
      • anonymizeMonitorUser

        @Path("/user/{visitorId}/anonymize")
        @POST
        public void anonymizeMonitorUser​(@NotNull @PathParam("visitorId")
                                         @NotNull String visitorId)
                                  throws Exception
        Anonymize the monitor user with the given visitorId.
        Parameters:
        visitorId - the visitor identifier of the monitor user.
        Throws:
        Exception
        Since:
        12.3.0
      • deleteMonitorUserActivities

        @Path("/user/{visitorId}/activities")
        @DELETE
        public void deleteMonitorUserActivities​(@NotNull @PathParam("visitorId")
                                                @NotNull String visitorId)
                                         throws Exception
        Delete the activities of the monitor user with the given visitorId.
        Parameters:
        visitorId - the visitor identifier of the monitor user.
        Throws:
        Exception
        Since:
        12.3.0