#martinkolev_56140_99385

1 messages · Page 1 of 1 (latest)

tight groveBOT
oblique crystal
#

hi there!

#

can you share an event ID (evt_xxx) that don't show up?

coral venture
#

evt_3OlrOoFOdyVgfM2D1Qyoyw4C

oblique crystal
#

and can you share the request ID (req_xxx) of the LIST /events that doesn't contain that event?

coral venture
#

stripe events list --created="1708393333" --starting-after="evt_1OliLZFOdyVgfM2DqSjyKxez"

#

one moment

#

req_HE2Cx85RMeNN4a

oblique crystal
#

thanks! give me a few minutes to look into this.

coral venture
#

I appreciate you

tight groveBOT
coral venture
#

Hi, anything?

hazy garnet
#

👋 taking over for my colleague. Let me catch up.

coral venture
#

ok thank you!

hazy garnet
#

I guess the problem is with the created time

coral venture
#

Created time I am passing evaluates to ( Tuesday, February 20, 2024 1:42:13 AM ) and the Event created time evaluates to (February 20, 2024 11:23:00 AM) or am I confused

hazy garnet
#

oh yeah! my bad I read it as 11:42 🤦

coral venture
#

lol no problem

hazy garnet
#

there is no created filter

#

try removing that

coral venture
#

then how will I only check for events I haven't stored/processed already?

hazy garnet
#

yeah you're right, sorry there's actually an undocumented created param (which it shouldn't be undocumented) that through me off for a sec

#

could you try stripe events list --created[gte]="1708393333" --starting-after="evt_1OliLZFOdyVgfM2DqSjyKxez"

#

and share the request ID

coral venture
#

req_MeLgBBdPewNspu

hazy garnet
#

did you get the results?

#

I can see that the parameter is passed correctlyb this time

coral venture
#

i did not get the results

#

I will log the output of the API and paste it here

#

{"object":"list","data":[],"has_more":false,"url":"/v1/events"}

hazy garnet
#

let's start simple

#

remove starting-after

#

try just with the created[gte] to see if it's working as expected

#

thanks to @west orchid we figured it out

coral venture
#

so

#

I removed the created and am using different logic and now the issue is resolved

hazy garnet
#

so basically all lists are ordered by created time descending meaning that the event you are passing in --starting-after is actually before the

coral venture
#

you are probably correct that -created is not valid

#

for events at least

hazy garnet
#

so you need to pass in --created[gte] and --ending-before

coral venture
#

yes im relying on something like that

hazy garnet
#

the created[gte] should work fine

#

the problem is more in the --starting-after that should be replaced by --ending-before

#

that's it

#

and you're logic would be good to go

coral venture
#

so the regular created will not work, i have to use created[gte] with --ending-before

hazy garnet
#

yes

#

the regular created would return an exact match of the created timestamp

coral venture
#

that makes sense

#

ok thank you I appreciate your help!

hazy garnet
#

let me know if you need any more help

#

so just fyi, you have the possibility to use lt,lte,gt,gte,eq

#

but eq is the same as not passing anything

coral venture
#

good to know

#

why is this not documented or is it and i am just not seeing it?

hazy garnet
#

they were documented, that's why I was also surprised not to see the created parameter when I checked the docs, and I thought they removed it or it's only accessible now in the Search API, but apparently it's not, and we have flagged it to the internal team who are looking into it

#

thanks for your understanding

coral venture
#

absolutely, thanks for your help again, have a good one!