I am looking for accessing archived items from an active board (not archived board) via Monday API (not via UI). How do I do that?
I see that on the manual Item has a field called “state” which provides the state of the board. So it is always active in this scenario as I have only archived single item. Any help is greatly appreciated.
https://monday.com/developers/v2#queries-section-items
Hi @spb,
There is no value for state in the argument to query items which means you can’t filter based on the item state.
You would need to collect all items, and then filter by state in your application logic.
Hey @mitchell.hudson ,
Thanks for helping out here! We really appreciate your assistance throughout the community.
-Alex
Hi @mitchell.hudson/@AlexSavchuk,
Correct. But what I am saying is, let’s say I archive an item like this:
Now those items can be seen here on UI
But when I query on API to get all the items:
{ "query": "{boards(ids:xxxxxx){ items() { id name group { title} state } } }" }
I cant see those archived data.
I also tried to do this:
{ "query": "{boards(ids:xxxxxx,state:all){ items() { id name group { title} state } } }" }
I know this is query is to include archived and deleted boards as well (not archived items in an active board). But I still went ahead and tried. But I still cant find the archived items.
What should be the correct query?
I have just done a bit of testing, and it seems you are correct. The boards
query does not return archived items. I don’t see a way to alter the default behaviour of this as this stage.
I have found two other workarounds, however they do both have limitations.
The first is using the `items_by_column_values’ query.
{
items_by_column_values(state: archived, board_id: BOARD_ID, column_id:"COLUMN_ID", column_value:"COLUMN_VALUE") {
id
state
board {
id
}
}
}
This does require a column_id
and column_value
field in the query. You could potentially have a hidden column on the board and then query this value, you would set a default value or just make it null and query this. This option is probably better as you can filter by board.
The other option is to use the items
query.
This would essentially return all items in your monday account, and then you would need to filter them by state and board in your application logic, this would be pretty expensive as you would need to make multiple API calls and loop over every item just to filter the results.
@AlexSavchuk Do you have any other ideas on how to achieve this?
As there is an option for a state argument on the boards query, this may be something that is implemented at a later date.
I am having the same issues with not being able to query archived groups as well. Boosting the signal for Monday.com support.
Hey @mitchell.hudson / @arnold_wikey - my apologies for the delay on getting back on this.
As you’ve seen this isn’t something that is possible right now. The ‘boards’ query does have an argument for the state of the items, but at this time it is not able to pull archived items. It’s something we’ve passed along to our developers internally as feedback, as we too would like to see the ability to query archived items in the future. That being said, I can’t really offer an ETA on this at the moment.
The closest workaround at the moment would be something like what Mitchell listed above using either the column values or items query, although both do have limitations.
Let me know if I can assist with anything else.
-Daniel
So I want to preface this by saying in general, I’m a huge Monday fan, and have generally enjoyed it both from the UI and API side.
That said, this is an absolute dealbreaker for me, and singlehandedly would make me push pretty hard to move off of the platform. Here’s an example workflow:
- We organize teams by board – eg. “Article Production Team” has a board, so on, so forth.
- Within boards, we use groups to represent sprints. Sprints last two weeks.
- After a sprint is complete, we keep it active on the board for a month, and then archive it.
- We still want to be able to calculate metrics on previous sprints, so in the absence of any built in reporting on the UI side, I go to try to pull a list of all issues within a board… and I can’t.
This means things like mean time to triage, mean time to resolve, distribution of issues between teams – all of these things are actually impossible for me to get any data on, simply because I can’t tell the API to include items from archived groups. I understand we might be operating at the fringes of what Monday is supposed to handle as a platform, but without being able to even get the basics (how many pulses with type Bug did we open this year?), I’m basically flying totally blind without having to materialize the data myself on some cadence and then hope that archived items don’t change.
Honestly, like I said, I generally genuinely enjoy the platform, but without this getting fixed, I pretty much have to move elsewhere, because I can’t in good faith tell stakeholders throughout the company “I think we fix these things pretty fast, and I think these initiatives cut down on these type of issues being submitted, but really no way to tell, sorry!” @dsilva I know you mentioned there’s no ETA, but I need to throw my voice into the ring here that without this being available as part of the API, there’s almost certainly no way we end up using Monday to the depth that we do today.
Please let us know if there’s anything I can do to help clarify, as it’s in my best interest to see this one get fixed. Thanks.
+1 for this feature please. I need to triage archived/deleted items so I can also archive/delete them in FreshDesk.
Any update on this? Needing this as well.
@youcandanch @zlanich @cwhittle
Thank you so much for providing your feedback on this feature, and I definitely understand how tihs would be helpful in your workflows!
Currently, I do not have any news to share on this. My best recommendation would be adapting @mitchell.hudson’s idea to your workflows. You could create a Status column in your board, and set up an automation to archive items once the Status is set to Archived. Then, you could use the items_by_column_values query, paired with that column, in order to retrieve your archived items.
I’ve made sure our records are updated with your use cases and how helpful this feature would be to your implementation of monday.com. That said, it would really help us prioritize this suggestion better if you could add your voice to the feature request as a Vote:
Thank you for understanding and patience, as well as your input towards making the monday.com API better.
-Alex
Thanks for you prompt response, unfortunately their work around will not work for us as we have around 100 boards with new ones being created all the time across the company.
I am working on code way but the API needs to have this option.
Just ran into this myself. Actually, my main issue was the opposite problem, I implemented code on the backend to filter out archived items. It’s only after I decided to include them that I found I didn’t have any in the data returned.
Eventually I would need these. Any possibility of fixing this?
Hello @ULSF!
I will add your vote to this feature request
Thank you for the feedback!
Cheers,
Matias
@Matias.Monday, I will appreciate if you can add my vote, too. If we can’t have access to our own company data thru API (archived or not, deleted within the 30 days undo period or not) then it is pretty bad.
Hello @EyalSeagull,
Your vote was added towards this request
Thank you for the feedback!
Cheers,
Matias
Hi @Matias.Monday , any news? This is a basic need. We can not query our own data! Using automation and a hidden column seems like a way to force users to move to a higher plan in order to have more automations actions available.
Hello @EyalSeagull,
I do not have any updates about this. I will share anything I hear back from the team
Cheers,
Matias
It’s distressing to search for a problem we’re having, find this issue which fits our use case exactly, and find zero movement in two and a half years. I don’t understand how the Monday team prioritizes working on things. So many quality of life issues remain unaddressed while other – to my eyes – much lower priority items are implemented.