API: List all items that is created past 30 days

Hello,
I have a flow in Postman where I get data from our Economic system and create a item in monday for each post. Now I’m doing in blinde, don’t know if the post is in monday or not.

My next version I like to list all items and check if the post ID in Economic system is in monday.

My ide was to get a list of all items created past 30 days ones and then check eatch time I’m going to create a new item in Monday.

Can’t find a way to list items and get the column data

Hello there @DanielSoderlund!

You could list all of your items from a board and their creation date with a query like this one and using cursor-based pagination as explained here:

{
  boards(ids: 1234567890) {
    items_page(limit: 500) {
      cursor
      items {
        name
        id
        created_at
      }
    }
  }
}

You can also use the activity logs like this and look for the “create_item” event:

{
  boards(ids:1234567890){
    activity_logs(limit:10000, from:"2024-01-01", to:"2024-02-01" ){
      data
      event
      id
      created_at
    }
  }
}

Note: The activity logs will give you up to 10k records. Anything older than that will not be retrieved.

Cheers,
Matias

Hmm, what I want is list all items that created the last 30 days and give the column with the ID text03

Hello again @DanielSoderlund,

Both of the approaches I explained can work for that.

In the first one, you would need to add the column values for that column in the query:

{
  boards(ids: 1234567890) {
    items_page(limit: 500) {
      cursor
      items {
        name
        id
        created_at
        column_values(ids:"text03"){
          text
        }
      }
    }
  }
}

With the second approach, you would get the IDs of those items, and then you can query for the column values for that text column as explained here :smile:

In both cases you will need to do some work on your end as the data does not come filtered as you mention.