Bug related to Items endpoint


Badge +1

Hi all, I found such a pattern, which in my opinion is a bug, unless of course it is caused by the impossibility of development.

Main: uploaded on the board item's "title" does not appear in the response until it is edited.

Steps to reproduce:
1) I create a board and with the help of "Drag & Drop" I throw several png files with predefined names onto it. For example, "Test_Image_1.png", "Test_Image_2.png", etc. (I think it works with other file types too, but I haven't checked)
2) I make a request to extract all Items. For example, 'https://api.miro.com/v2/boards/<board_id>/items?limit=50' or 'https://api.miro.com/v2/boards/<board_id>/items?limit =50&type=image'
3) I get the result with the correct number of elements, but in "data" the elements have only "imageUrl" and no "title", although it is there.
Example:
{
...
"createdBy" : {
       "id" : "item_id",
       "type" : "user"
     },
"data" : {
       "imageUrl" : "https://api.miro.com/v2/boards/.....",
   },
....
}
4) If I somehow edit the name (title) of a certain item (png image), then its "title" will begin to be displayed in the response. For example, I change "Test_Image_1.png" to "Test_Image_1_edited.png", then the result will be
{
...
"createdBy" : {
       "id" : "item_id",
       "type" : "user"
     },
"data" : {
       "imageUrl" : "https://api.miro.com/v2/boards/.....",
       "title" : "Test_Image_1_edited.png"
   },
....
}


14 replies

Userlevel 6
Badge +4

Hey @Dmytro Koziuberda,

Thanks a lot for raising this! I agree, this behavior seems unintended. Let me raise it with our engineering team and get back to you shortly. :) 

Best,
Will

Badge +1

Hello @Will Bishop,

Just wanted to follow up on the bug we discussed earlier in the thread. I understand you're busy, but I wanted to check if there have been any updates on that matter. I currently have a task that depends on this bug, and having the latest information would greatly help me. If there's anything I can do to assist or provide additional details, please let me know. Could you please let me know if there's been any progress or if there's any new information regarding this bug?

Thank you so much. 

Best regards,
Dmytro

Userlevel 6
Badge +4

Hi @Dmytro Koziuberda,

Thanks for following up on this! I’ve just checked back with our engineering team and can confirm that this is indeed a bug as suspected. 

We are working on prioritizing the fix for this, and I hope to have a more concrete timeline to share shortly. Apologies again for the trouble here, and we will follow up as soon as possible!

Thanks,
Will

Badge

Hello @Will Bishop me and my Team encounter same issue which prevents us from automating an important part of our ops. Any planed date for this resolution? Thanks. 

 

Userlevel 6
Badge +4

Thanks for letting us know @AntoineOne — this is with our engineering team and we’re hoping to get a fix into one of our next releases. I’ll follow up here with more details as soon as I have them.

Apologies for the inconvenience, and will follow up shortly!

Userlevel 6
Badge +4

Hi @AntoineOne and @Dmytro Koziuberda , just wanted to provide another quick update.

Our Product and Engineering teams are still exploring the best solution for addressing this behavior and we will keep you updated on this. But in the meantime, I did want to share that if you’re using the REST API, if you specify a value for the title field when you original create an image programmatically, then it should be returned without needing to subsequently update the content. 

That said, we are still working on enhancing this experience, and I’ll follow up on this thread as this evolves.

Thanks,
Will

Badge +1

Hello @Will Bishop,

I wanted to express my appreciation for keeping me posted!

Thanks for your suggestion, but the fact is that in my case, the images will be uploaded to the board manually, and subsequent manipulations are performed using the REST API. The inclusion of the "title" field is crucial for accurately identifying the image. Images are not created programmatically, and as a result, resolving this bug is of great importance to me.

So possibly you have an approximate time frame for when this fix is scheduled to be released? However, if that information is not available at the moment, I completely understand and will eagerly await your updates.

Once again, thank you for your diligent attention to this matter.

Regards,
Dima

Badge

Hi @Will Bishop, any news? This is starting to be a real blocker.

Thanks. AY.

Userlevel 6
Badge +4

Hi @AntoineOne,

Thanks for following up on this. At the moment, we don’t have a concrete ETA for when we might be able to enhance the behavior for returning a default title field for images via API/SDK. Currently, you will need to explicitly specify a title field when creating an image item via API or SDK in order to have the title property on the image when it’s created.

Having said this, I do understand the issue that this presents for image items that were already created without an explicit title field specified originally/programmatically. This is something I’ve raised with our team here, and I will continue to advocate for improving this experience.

In the meantime, one other workaround you could consider would be to retrieve the image filename directly from the source, for images for which you don’t have a title field. This can be done via the REST API, and you can find a more detailed explanation of this here.

Thanks again for raising this, and I’ll be happy to keep you updated as this experience evolves.

Best,
Will

Userlevel 2
Badge +1

Hi @Dmytro Koziuberda and @AntoineOne ,

The title field of the image item corresponds to the alt attribute of the img HTML element.

By default, the title  field is an empty string: ''.
If the title  field is empty, the image file name is used as a value for the field.
In this case, the title  field is not returned with the payload when sending a REST API request to fetch images from a board.

To have the title  field as part of the image JSON payload when it's being returned in a REST API response, you can do one of the following:

 

 

Either of these alternatives sets a persistent value for the title field of the image item.
Would this work for your use cases?

Badge +1

Hello @Marco Spinello,

Thanks for sharing these features.

However, this does not solve the problem for me. In my case, the user uploads images to the board manually already with the correct names and it is displayed in the image context menu, but according to your words, it is not returned in the JSON payload. This forces the user to edit the title of the image 2 times or upload an image with the wrong title and change it in Miro, which is very inconvenient.

My problem would be solved if, after drag-and-drop uploading of the image, its name would be assigned to the title field and it would be returned with the JSON payload.

Thanks,
Dima

Userlevel 2
Badge +1

Hi @Dmytro Koziuberda,

 

Thank you for your reply and for the additional context you shared.
The workaround for users is indeed a nuisance for them.

It would be great if you submitted your suggestion as a feature request, so that other users and developers can upvote it. To submit an idea for a new feature, go to https://developers.miro.com/page/roadmap, and click + Submit idea in the top-right corner of the page.

 

Best,

marco

Badge

Hello @Will Bishop, we tried the workaround suggested : KO. 

Impact : lots of manual tasks to rename the images uploaded to MIRO resulting in time spent on non-added value tasks. 

Do you have an ETA to improve the behaviour for returning a default title field for images via API/SDK?

We can contribute to the effort.  

Thank you, 

Best. 

Antoine. 

Userlevel 6
Badge +4

Hey @AntoineOne,

We don’t have an ETA for this at the moment, but I can appreciate how this would be helpful. I’ve shared this feedback internally, and will continue to advocate for this improvement.

Thanks,
Will

Reply