Constructor and Description |
---|
UserSegmentationRestAPI() |
Modifier and Type | Method and Description |
---|---|
Response |
downloadSegmentationCSV(String jsonData,
List<String> fields,
Character columnSeparator)
Returns a CSV file containing the users in a given segmentation list.
|
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.
|
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 reqData)
Update monitor user attributes.
|
@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}/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
@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") @POST @Consumes(value="application/json") public Response updateMonitorUserAttributes(@NotNull @PathParam(value="visitorId") long visitorId, @NotNull String reqData) throws Exception
MonitorV1Resource.updateMonitorUser(String, String)
.visitorId
- the monitor user visitor identifierreqData
- the requested dataException
LumisXP 12.1.0.191010 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.