Multiple API Problems

  • 13 January 2022
  • 4 replies
  • 103 views

Hi,

I am using the REST API, not creating a Miro App. I am using the API to build a board programmatically and although it is mostly working, I have hit a number of issues.

  1. The API exploration works, but the code samples do not - something is broken on the OpenAPI Schema (missing fields) that prevents it from working, I’ve had to make calls directly instead.
  2. Changing lineEndType does not seem to do anything.
  3. backgroundOpacity does not match what is in the application - I would like 10%.
  4. There is no ability to “send to back” or in any way adjust the z-index. Would it be so hard to add z-index to the style?
  5. It is not possible to adjust the opacity of a line.

4 replies

Userlevel 5
Badge +1

Hi @Andrew Spode,

Thanks for raising these points.

  1. Are you referring to the code sample on the right of the API reference? 
  2. You are right, we have a bug open for this, it impacts the REST API not the Web SDK( this post).
  3. This has been raised to the team already, in the mid-term the idea it that the API get closer to the experience of the product. I don’t know when this will be update for backgroundOpacity but this is the general approach for all API updates that are coming.
  4. As of today this is only available on the Web SDK.
  5. By opacity do you mean the thickness of the line? “lineThickness” is not supported on the REST API for the moment.

Hi Anthony - thanks for getting back to me :)

1. Yes, I spent a long time diving into it and the API Schema you are providing is invalid. OpenAPI simply complains things are missing. I ended up just doing REST requests directly.
2. Awesome, I did notice that maybe 10% of the lines being made *did* have the arrow. I wondered if it was a race condition so I made all my shapes and then made the lines afterwards but it made no difference.
3. Okay, great and agree with the concept.
4. I realise this, but I don’t understand why - it’s surely a simple thing to give? It makes many things impossible. 
5. No, I mean opacity. Because of issue 4, I have lines going over the top of things and I have no ability to send it to back, so I want to make it, say 50% transparent but the option is not exposed.

If we are giving feedback overall with the API BTW - the rate limiting makes it really hard to build and test more complex boards. It would be great if you could make multiple shapes at the same time (like a batch mode). This would likely result in less load on your servers anyway (which is the point of the rate limit, right?).
 

Userlevel 5
Badge +1
  1. Got it, and yes you are totally right the OAS file is not up to date, we will publish a new version soon.
  1. I don’t know all the detail but technically it is not as easy as just exposing it in the API. This is part of the backlog but the team has not prioritized it for the moment. It will come but we don’t know when.
  2. This is not available on the Miro board right? Or maybe I am not aware about it.

 

Really fair feedback, we are conscious that the rate limiting can make some implementations tricky. We are exploring different ways to improve this (higher rate limiting, bulk requests, etc.). 

 

Thanks for the valuable feedback!

Awesome. It’s odd actually - that one of the repos linked to as an example for using the REST API also doesn’t use it - they implemented they own API class for handling the API.

Okay - I know at least one other person has requested it. It is available on your Web SDK, so it would really be nice.

Agreed - it’s not available, but there’s nothing stopping it from being as it’s set as a border and borderOpacity is available on shapes.

For reference - right now it takes 6 minutes for me to do a test-run each time I make any changes :(

Reply