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.
|
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 userId)
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.
|
@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/{userId:[\\w\\-]{32}}") @GET @Produces(value="application/json") public Response getUserDetails(@PathParam(value="userId") String userId) throws PortalException
jsonData
- the JSON data of applied filters.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.Lumisportal 11.1.0.181218 - Copyright © 2006–2018 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.