cf-java-client icon indicating copy to clipboard operation
cf-java-client copied to clipboard

Unable to query data between timestamp with cf-java-client

Open sundarsrini opened this issue 6 years ago • 2 comments

Hi,

I am trying to query the /v1/events api using the java client, but there is no provision to query for a particular range with timestamp. Below is the code,

cloudFoundryClient.events()
  .list(ListEventsRequest.builder()
    .timestamp(startDate)
    .build())

Say if startDate is 2017-11-01, then java api gives the response from 2017-11-01 to current date (2017-11-21).

But the range is supported when I try to consume it via REST client.

/v2/events?order-by=timestamp&order-by=id&order-direction=asc&q=timestamp>=2017-11-01&q=timestamp<=2017-11-03

Could you please help on this ?

Thanks Sundar

sundarsrini avatar Nov 21 '17 06:11 sundarsrini

Yeah, we’ve never really had a request for this and so we haven’t yet implemented it. We’ll put it on the list for an upcoming release.

nebhale avatar Nov 27 '17 14:11 nebhale

Thanks @nebhale

sundarsrini avatar Nov 28 '17 04:11 sundarsrini