Skip to main content

Hi,


I’m trying to build and incremental API to be run every 2h


however as I can see the query that I’m using is not considering datetime but only date:


    query { complexity { before query after reset_in_x_seconds}
boards(ids:123456) {id
groups(ids:"XYZ")
{items_page(limit:10 query_params: {rules: e{column_id: “last_updated”, compare_value: _“EXACT”, “2024-07-21 11:00?00”], operator:greater_than_or_equals,compare_attribute:“UPDATED_AT”}]}) {cursor items
{name column_values {id text}
}
}
}
}}

what I’m trying to do is to get only the data that got updated between 2 datetimes, in the example between “EXACT” and “2024-07-21 11:00?00”. As far as I understood, the query is wrong but I couldn’t find a way to do it right 😦


Could you help me out with it?

Just to avoid questions it should be “2024-07-21 11:00:00” instead of “2024-07-21 11:00?00”


I am glad you found the source of the issue @Nicholas_ma !


Welcome to the community 😀



haha actually I didn’t find the answer for the main problem. I just replied because I wrote the time wrong while writing for post.


The main problem is that I want to user datetime instead of date to retrieve data, to always retrieve from the API new and updated items only.


I’m running the code every 2 hours and by the way it is now, all the time I’m getting all the rows from today and yesterday…


sorry if it was not clear


Hello again @Nicholas_ma,


My bad! I misunderstood you.


I believe you might not be able to use the time in the query. I am double-checking here and will let you know as soon as I have an update!


Cheers,

Matias


Hello again,


I can now confirm that you can only use dates (and not time) here @Nicholas_ma.


Let me know if you have any other questions 😀


Cheers,

Matias


Hey @Matias.Monday thanks for the reply


yes, it only accepts date but not date time. Would be better if we could but I found a way to work around on my python code using insert and on conflict update.


Once again, thanks 🙂!!


I am glad you found a workaround from your script 😀


Reply