EndpointResponse response = phaseContext.getEndpointResponse();
EntityPlugin plugin = phaseContext.getEntityPlugin();
List<Serializable> ids = plugin.getKeyConverter().covertKeys(phaseContext.getId());
if(ids.size() != 1)
throw new BadRequestException("A single ID must be provided.");
Integer start = getIntegerParameter("start",request);
Integer limit = getIntegerParameter("limit",request);
if(start != null && start < 1)
throw new BadRequestException("The start parameter must be greater than zero.");
if(limit != null && limit < 1)
throw new BadRequestException("The limit parameter must be greater than zero.");
PersistenceContext persistenceContext = buildPersistenceContext(phaseContext);
PersistenceOperations operations = persistenceContext.getEntityPlugin().getPersistenceOperations();
QueryResult<HistoryEntry> entries = operations.getHistory(ids.get(0),start,limit,persistenceContext);