I have a GraphQL query that I’m running to get access to files uploaded to my board for a certain item. I’m using the following assets query:
query {
boards (ids:<board_id>) {
items (ids: <item_id>) {
assets {
id
name
url
file_extension
}
}
}
}
but it’s only returning a single file that is actually in one of the columns. It’s not returning the other files that are uploaded with and associated with that item (I can see the files on the UI, just not through API)
When I click on the Files tab there, I see a bunch of files that I can’t access from the API using the assests query above. Am I doing something wrong?
A. You have no assets in the updates for that item.
or
B. The API being used does not have access to those assets (because of some permissions in place).
If none of those is the case, you should send an email to appsupport@monday.com with a screen recording of the situation and writing down:
Your account ID (or account name)
Board ID of the board you are using
Item ID of the item you are using
Timestamp of when you tried the query (date, hour, minute and location)
With the screen recording and that information, our team can take a closer look into it.
The files are not in the updates tab, they’re in the files tab (see screenshot). They’re also not in the columns, only on the Files tab. Any way to access that?
@davidenergy oh, you uploaded the assets directly in the gallery.
In that case there is only one way to access them. You would need to manually open the file using the UI, check the ID of the asset at the end of the URL in your browser’s address bar and then use that ID in a query like this one:
{
assets (ids:1234567890){
name
}
}
There is no other way of accessing files that were uploaded directly to the gallery as of today.
Very helpful - thank you. Hopefully providing an ability to query the ids of these assets in the future will be feasible. I can see that using the assets query with the id that I get from the UI, I can get at the file itself. But this doesn’t help me much since I need a list of ids programmatically.