Skip to main content
Answered

API "self" Link returns 400 Error

  • November 19, 2024
  • 2 replies
  • 66 views

Forum|alt.badge.img

Hi There,

I am using the /boards/{boardId}/items endpoint to return all items on a specific board. In the response, I’m getting a number of items returned, and each of those items has a API URL value in the data.links.self field. However, for some of those values, calling the GET endpoint returns a 400 error (code: operationNotSupported).

Example response from /boards/{boardId}/items:

{
  "size": 10,
  "limit": 10,
  "total": 11,
  "data": [
    {
      "id": "3458764607565328883",
      "type": "shape",
      "geometry": {
        "width": 262.06732667592587,
        "height": 131.03366630422926
      },
      "position": {
        "x": -246.9185046725638,
        "y": 395.1632647477584,
        "origin": "center",
        "relativeTo": "canvas_center"
      },
      "links": {
        "self": "https://api.miro.com/v2/boards/uXjVLCuZXck%3D/items/3458764607565328883"
      },
      "createdAt": "2024-11-19T18:44:56Z",
      "createdBy": {
        "id": "3458764584978600694",
        "type": "user"
      },
      "isSupported": false,
      "modifiedAt": "2024-11-19T18:44:56Z",
      "modifiedBy": {
        "id": "3458764584978600694",
        "type": "user"
      }
    }
}

When I make a GET call to the value in the data.links.self field, that’s when I get the 400. Is there something I’m missing?

Thanks!

Best answer by William Bishop

Hey ​@Guru Integrations,

Thanks for reaching out about this. 

Is it possible that the items you’re getting this error for are part of a template or some other sort of unsupported item type (e.g. table, advanced/custom shape, etc)? If the `isSupported` value returned by the API is equal to “false”, you will not be able to perform further GET actions on the item. 

You can find a full list of supported item types here:
https://developers.miro.com/docs/miro-rest-api-introduction#what-can-i-do-with-the-rest-api

Let me know if this might be the case. Thanks!

View original
Was it helpful?

2 replies

William Bishop
Mironeer
Forum|alt.badge.img+4
  • Mironeer
  • 234 replies
  • Answer
  • November 20, 2024

Hey ​@Guru Integrations,

Thanks for reaching out about this. 

Is it possible that the items you’re getting this error for are part of a template or some other sort of unsupported item type (e.g. table, advanced/custom shape, etc)? If the `isSupported` value returned by the API is equal to “false”, you will not be able to perform further GET actions on the item. 

You can find a full list of supported item types here:
https://developers.miro.com/docs/miro-rest-api-introduction#what-can-i-do-with-the-rest-api

Let me know if this might be the case. Thanks!


GodMode9
Forum|alt.badge.img
  • New Here
  • 1 reply
  • January 27, 2025

I ran into a similar issue where the 'self' link in the API was returning a 400 error. After some debugging, I realized it was related to incorrect parameters in the request header. Once I reviewed the request format and ensured all required fields were included, the error disappeared. It’s also worth checking the server-side validation logic as sometimes it expects specific formats. If you’re still stuck, try enabling more detailed logging to pinpoint where the request is going wrong.


Reply