Skip to main content

I have a requirement where I am using Miro to create a Mind map. I want to extract the Json from this Mind Map and use the information in that Json to trigger further steps. I am fetching the JSON on my board via REST api.

The problem I see is that the hierarchy which I created in the Mind map on my Miro board is not maintained in the fetched Json (through REST Api).

All the nodes are given individually. There is a property of “parent” with links but looks like that it is representing a root parent and not the immediate parent of that particular node.

I need to derive relationship between a Node and its immediate parent Node and Child Nodes through this JSON.

 

Q1.  How can I do this ? Am i missing something in generated JSON which helps to get information of the immediate parent and child nodes of a particular node ?

Q2.  Is there a support of the Gantt Chart in Miro ?

Q3. Also, is there a way to get all the information of a MindMap rather than requesting again and again for 50 nodes ?

 

Thanks in advance.

Hi @AdityaMiroAether,

I guess you use REST API method https://api.miro.com/v2-experimental/boards/{board_id}/mindmap_nodes, right? Indeed, the method returns all mind map nodes with their parent nodes in the property parent. For example, for the following mind map it returns 7 nodes:

Where for the node “ddd” parent node will be “ccc”:

const response = {
"size": 7,
"limit": 10,
"total": 7,
"data": "
{
"id": "3458764593246011403", // node "aaa"
...
},
{
"id": "3458764593246011444", // node "ccc"
...
},
{
"id": "3458764593246011517", // node "ddd"
...
"parent": {
...
"id": "3458764593246011444"
},
...
},
...
],
...
}

As you can see, the parent property refers to an immediate parent of a particular node.

Below let me answer on your questions one by one:

Q1.  How can I do this ? Am i missing something in generated JSON which helps to get information of the immediate parent and child nodes of a particular node ?

The method must return an ID of the immediate parent, which doesn’t work in your case. It looks like a bug for me and I’ll be happy to report it to the responsible team, but I need more context to reproduce it. It would be very helpful if you can prepare an example which I can reproduce and attach to the bug report.

Q2.  Is there a support of the Gantt Chart in Miro ?

Unfortunately, we don’t have Gantt Chart as a separate primitive on a board, so we don’t API for it. However, we offer Gantt chart as a template built from primitives like rectangles. You can explore Miro template for a suitable Gantt chart template https://miro.com/templates/gantt-chart/.

Q3. Also, is there a way to get all the information of a MindMap rather than requesting again and again for 50 nodes ?

No, there is no way to request all nodes in one request. Allowing it might create huge workload on our servers and network. So that’s why we stick with pagination approach.


Hope this helps. Please let me know if you would like to proceed with the bug report regarding the wrong parent property value. 


Thanks for replying. Appreciate it.

Taking this image as an example, which is part of my actual mind map.

Here, the node “Start of Round 1” should be a child of “End of Day 2” according to what you said.

The json for these two nodes are here below :-

 

End of Day 2 :

    {
"id": "3458764593008411455",
"type": "mindmap_node",
"data": {
"isRoot": true,
"nodeView": {
"type": "text",
"data": {
"content": "<p><strong>End of Day 2</strong></p>"
},
"style": {
"fillOpacity": "0.0",
"fontSize": "14",
"color": "#1a1a1a"
}
},
"orientation": "vertical"
},
"style": {
"nodeColor": "#7a28ff",
"fontSize": "14",
"shape": "rounded_rectangle"
},
"geometry": {
"width": 126.89999999999999,
"height": 64
},
"parent": {
"links": {
"self": "https://api.miro.com/v2/boards/uXjVK8yH1w0%3D/items/3458764592844074249"
},
"id": "3458764592844074249"
},
"position": {
"x": 3257.8062370849602,
"y": 3049.823863475569,
"origin": "center",
"relativeTo": "parent_top_left"
},
"links": {
"self": "https://api.miro.com/v2/boards/uXjVK8yH1w0%3D/mindmap_nodes/3458764593008411455",
"related": "https://api.miro.com/v2/boards/uXjVK8yH1w0%3D/items?parent_item_id=3458764593008411455&limit=10&cursor="
},
"createdAt": "2024-06-24T08:51:24Z",
"createdBy": {
"id": "3458764592010232182",
"type": "user"
},
"modifiedAt": "2024-06-24T08:51:47Z",
"modifiedBy": {
"id": "3458764592010232182",
"type": "user"
}
}

As you can see here that the node Id is - 3458764593008411455

Which means that parent id of node “Start of Round 1” should be “3458764593008411455” as per our discussion.

Below is the Json for “Start of Round 1” :-

 

Start of Round 1 :-

    {
"id": "3458764593002609266",
"type": "mindmap_node",
"data": {
"isRoot": true,
"nodeView": {
"type": "text",
"data": {
"content": "<p><strong>Start of Round 1</strong></p>"
},
"style": {
"fillOpacity": "0.0",
"fontSize": "14",
"color": "#1a1a1a"
}
},
"orientation": "vertical"
},
"style": {
"nodeColor": "#7a28ff",
"fontSize": "14",
"shape": "rounded_rectangle"
},
"geometry": {
"width": 152.28,
"height": 64
},
"parent": {
"links": {
"self": "https://api.miro.com/v2/boards/uXjVK8yH1w0%3D/items/3458764592844074249"
},
"id": "3458764592844074249"
},
"position": {
"x": 3623.4397025832673,
"y": 2903.9578195336535,
"origin": "center",
"relativeTo": "parent_top_left"
},
"links": {
"self": "https://api.miro.com/v2/boards/uXjVK8yH1w0%3D/mindmap_nodes/3458764593002609266",
"related": "https://api.miro.com/v2/boards/uXjVK8yH1w0%3D/items?parent_item_id=3458764593002609266&limit=10&cursor="
},
"createdAt": "2024-06-24T07:59:30Z",
"createdBy": {
"id": "3458764592010232182",
"type": "user"
},
"modifiedAt": "2024-06-24T08:38:52Z",
"modifiedBy": {
"id": "3458764592010232182",
"type": "user"
}
}

Here, we can clearly see that the parent does not have the expected parent id.

In fact, if you notice, the parent Id in this node is the same as the one in the node above. Similarly, the parent Id in every node is the same.

I do not happen to find the node which has this id - 3458764592844074249 in the retrieved json of 120 nodes.


Let me know if you need any other info on this.


Hi @Kirill Sudarushkin,

 

Did you get a chance to look at my response ? 

If this looks fine, then a bug needs to be raised for the same, as you mentioned before.

If that is the case, could you please help me with that, how and by when this bug will be created and how much time does it take for a bug to get resolved.

This is important for us to make a decision on using Miro. Hence asking.

 

Thanks in advance.

Awaiting your response.


Hey @AdityaMiroAether,

Sorry! It seems this thread has been lost in our internal communication. I will ping a team member that also knows about this endpoint and pick up this conversation. 

Cheers,
Mettin

 


Hey @AdityaMiroAether,

I got a response from the team and they have some follow-up questions:

  1. How was your initial mind map created?
  2. What REST API endpoint is being used to retrieve the mind map? Was it this one?

Cheers,
Mettin


Reply