@Path(value="/lumis/service/analytics/usersegmentation/{si:[a-fA-F0-9]{32}}/rest") public class UserSegmentationRestAPI extends AbstractMonitorResource
Constructor and Description |
---|
UserSegmentationRestAPI() |
Modifier and Type | Method and Description |
---|---|
static void |
addUsersActivityFilters(List<ISearchQueryFilter> filters)
Put filter for user activity list.
|
void |
anonymizeMonitorUser(String visitorId)
Anonymize the monitor user with the given visitorId.
|
void |
deleteMonitorUser(String visitorId)
Delete the monitor user with the given visitorId.
|
void |
deleteMonitorUserActivities(String visitorId)
Delete the activities of the monitor user with the given visitorId.
|
Response |
downloadSegmentationCSV(String jsonData,
List<String> fields,
Character columnSeparator)
Returns a CSV file containing the users in a given segmentation list.
|
static org.json.JSONObject |
getEventProperties(SessionConfig sessionConfig,
ITransaction transaction,
Map<String,IMonitorField> fields,
Map<String,Object> lum_monitor,
IMonitorEvent event,
boolean removeUser)
Returns the event fields values.
|
Response |
getNextActivities(String visitorId,
Integer page,
Long firstEventDateMilli,
lumis.service.analytics.usersegmentation.rest.UserSegmentationRestAPI.NextActivitiesRequest bodyRequest)
Returns only activities of user for be appended in the activities of user.
|
static List<FieldReportCSV> |
getOrderedFieldsReportCSV(List<String> requestFieldCodes)
Receive a list of request fields like "_userAttribue_:
|
Response |
getSegmentation(String id)
Return segmentation by id.
|
Response |
getSegmentations(String name)
Returns the segmentations list.
|
Response |
getUserDetails(String visitorId)
Returns the user details.
|
void |
getUserInfoTXT(String visitorId,
String activities,
HttpServletResponse response)
Returns the user details.
|
Response |
getUsers(String jsonData,
int maxSize,
int startAt)
Returns the users list based on the given filters.
|
static org.json.JSONObject |
parseToJsonObject(UserSegmentation userSegmentation)
Receives a entity and returns a json client format.
|
Response |
saveSegmentation(String body,
String id)
Quick save operation for segmentation.
|
Response |
updateMonitorUserAttributes(long visitorId,
String saveType,
String reqData)
Update monitor user attributes.
|
checkModeManagePermission, checkModeManagePermission, checkModeViewPermission, checkModeViewPermission, checkViewServiceInstancePermission
@Path(value="/users") @POST @Produces(value="application/json") public Response getUsers(@FormParam(value="filters") String jsonData, @FormParam(value="maxSize") @DefaultValue(value="50") @Min(value=1L) @Max(value=50L) int maxSize, @FormParam(value="startAt") @Min(value=1L) @DefaultValue(value="1") int startAt) throws PortalException
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.PortalException
@Path(value="/users/csv") @POST @Produces(value="text/csv") public Response downloadSegmentationCSV(@FormParam(value="filters") String jsonData, @FormParam(value="field") List<String> fields, @FormParam(value="columnSeparator") @DefaultValue(value=";") Character columnSeparator) throws PortalException
jsonData
- the JSON data of applied filters in the segmentation.fields
- the service instance identifier.PortalException
@Path(value="/user/{visitorId}") @GET @Produces(value="application/json") public Response getUserDetails(@PathParam(value="visitorId") String visitorId) throws PortalException
jsonData
- the JSON data of applied filters.PortalException
@Path(value="/user/{visitorId}/user.txt") @GET @Produces(value="text/plain") public void getUserInfoTXT(@PathParam(value="visitorId") String visitorId, @QueryParam(value="activities") String activities, @Context HttpServletResponse response)
jsonData
- the JSON data of applied filters.@Path(value="/user/{visitorId}/activities/{page}") @POST @Produces(value="application/json") @Consumes(value="application/json") public Response getNextActivities(@PathParam(value="visitorId") String visitorId, @PathParam(value="page") Integer page, @QueryParam(value="firstEventDateMilliseconds") Long firstEventDateMilli, lumis.service.analytics.usersegmentation.rest.UserSegmentationRestAPI.NextActivitiesRequest bodyRequest) throws PortalException
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.PortalException
public static void addUsersActivityFilters(List<ISearchQueryFilter> filters) throws PortalObjectNotFoundException
filters
- the filter list to receive more filters.PortalObjectNotFoundException
public static org.json.JSONObject getEventProperties(SessionConfig sessionConfig, ITransaction transaction, Map<String,IMonitorField> fields, Map<String,Object> lum_monitor, IMonitorEvent event, boolean removeUser) throws PortalException, ManagerException
sessionConfig
- the current session.transaction
- the transaction.fields
- the fields.lum_monitor
- the map with values.event
- the events.removeUser
- choose if will remove lum_user from properties list.PortalException
ManagerException
@Path(value="/segmentation/{id:[a-fA-F0-9]{32}}") @PUT @Consumes(value="application/json") @Produces(value="application/json") public Response saveSegmentation(String body, @PathParam(value="id") @NotBlank String id)
segmentationFilter
- the segmentation filter.id
- the segmentation identifier.PortalException
@Path(value="/segmentation/{id:[a-fA-F0-9]{32}}") @GET @Consumes(value="application/json") @Produces(value="application/json") public Response getSegmentation(@PathParam(value="id") @NotBlank String id)
id
- the segmentation identifier.public static org.json.JSONObject parseToJsonObject(UserSegmentation userSegmentation)
userSegmentation
- the entity.@Path(value="/segmentations") @GET @Produces(value="application/json") public Response getSegmentations(@QueryParam(value="name") String name) throws PortalException
PortalException
public static List<FieldReportCSV> getOrderedFieldsReportCSV(List<String> requestFieldCodes)
requestFieldCodes
- code for each column field.@Path(value="/user/{visitorId:\\d+}/attributes/{saveType:(un)?trusted}") @POST @Consumes(value="application/json") public Response updateMonitorUserAttributes(@NotNull @PathParam(value="visitorId") long visitorId, @PathParam(value="saveType") String saveType, @NotNull String reqData) throws PortalException
MonitorV1Resource.updateMonitorUser(String, String)
.visitorId
- the monitor user visitor identifierreqData
- the requested dataPortalException
@Path(value="/user/{visitorId}") @DELETE public void deleteMonitorUser(@NotNull @PathParam(value="visitorId") String visitorId) throws Exception
visitorId
- the visitor identifier of the monitor user.Exception
@Path(value="/user/{visitorId}/anonymize") @POST public void anonymizeMonitorUser(@NotNull @PathParam(value="visitorId") String visitorId) throws Exception
visitorId
- the visitor identifier of the monitor user.Exception
@Path(value="/user/{visitorId}/activities") @DELETE public void deleteMonitorUserActivities(@NotNull @PathParam(value="visitorId") String visitorId) throws Exception
visitorId
- the visitor identifier of the monitor user.Exception
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.