How does one download files via the SDK? I get a url which I can follow to get a 302, which points me to a url I can download from, but I have to go through all the hassle of generating an application session; I can’t seem to do it directly via the SDK. Am I missing something?
Thank you for the welcome and for answering; do you know if there are there any plans to allow this? It’s a pretty big gap in being able to pull data from the boards programmatically and is going to affect how we build our workflows (and how much we use Monday).
With the API (which you can access using the .api method on the monday sdk client) you can get a public_url. There just isn’t a direct SDK get file method.
Get all assets with public_url for an item.
{
items(ids: 4612078052){
assets {
id
public_url
}
}
}
Get just an asset if you have the asset’s ID already.
This is exactly what I needed. I was able to see the protected_static url but needed to have a way to follow the 302; this just gives me the result of that directly. Thank you so much!
just an important note - the public URL expires after an hour. So, while you can use it to get the file as part of your workflow, do not rely on the URL to provide long term access to the file.