Retrieve the name and extension of the image file.

  • 24 January 2023
  • 4 replies

Badge +1

Is there a way to get the image's file name and extension when using the Rest API or Web SDK? We use Miro for ideation and then wanted to load the data into the source system. 

4 replies

Userlevel 5
Badge +3

Hey @saraTom,

Good question. I believe this should be exposed when you make a GET request to the image’s resource URL via the REST API. 

First, make a GET request to the image itself, such as:

This should return a data object that includes an `imageUrl` field. Next, take this imageUrl and make a subsequent GET request (using the same bearer token), and update the `format` query parameter from its default of “preview” to instead be “original”. So it might look something like this:

And the url returned in the response should include the original file name and extension in it’s parameters.

I hope it helps!

Badge +1

Thanks for responding @Will Bishop 

When I give the original format for retrieving the signed url, I still see only two fields: url and type.

But I see the original name in the url. I can extract that info parsing the url. It would have been nice if original file name is an attribute in the request

Badge +1

Also I could not find documentation for API end point  for getting images--  in Rest doc


Userlevel 5
Badge +3

Thanks for the feedback, @saraTom! I agree it could be a bit easier to access these image file details—I’ve shared this feedback with our product team and hopefully we can improve the experience.

As for the docs, this image resource url is documented under the 200 response example, let me know if it helps!