Skip to main content
POST
/
source
/
generateMindMap
/
{sourceId}
{
  "userId": "user-123"
}
{
  "mindmap": {
    "mindmap_name": "Algebra Concepts Map",
    "nodes": [
      {
        "id": "node1",
        "label": "Algebra",
        "positionX": "0",
        "positionY": "0",
        "definition": "Branch of mathematics dealing with symbols and rules",
        "isHighlyImportant": true
      },
      {
        "id": "node2",
        "label": "Variables",
        "positionX": "100",
        "positionY": "50",
        "definition": "Symbols representing unknown values",
        "isHighlyImportant": true
      }
    ],
    "edges": [
      {
        "id": "edge1",
        "source": "node1",
        "target": "node2"
      }
    ],
    "mindmap_id": "65f5..."
  }
}

Description

This endpoint generates a mind map based on a previously ingested learning source. By providing the sourceId of the ingested material, you can create a visual representation of the key concepts and their relationships, making it easier to understand and review complex topics.

Endpoint Details

  • Method: POST
  • Path: /source/generateMindMap/{sourceId}
  • Authentication: Required
  • Response Status: 200 OK

Request Parameters

  • Path:
    • sourceId: The ID of the source to generate mind map from
  • Headers:
    • api-key: <your-api-key>
  • Body:
    {
      "userId": "user-123"
    }
    

Example Request

curl -X POST \
  'https://b2b-api-backend-95487.ondigitalocean.app/source/generateMindMap/{sourceId}' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'api-key: <your-api-key>' \
  -d '{
    "userId": "user-123"
  }'

Example Value (Response)

{
  "mindmap": {
    "mindmap_name": "Algebra Concepts Map",
    "nodes": [
      {
        "id": "node1",
        "label": "Algebra",
        "positionX": "0",
        "positionY": "0",
        "definition": "Branch of mathematics dealing with symbols and rules",
        "isHighlyImportant": true
      },
      {
        "id": "node2",
        "label": "Variables",
        "positionX": "100",
        "positionY": "50",
        "definition": "Symbols representing unknown values",
        "isHighlyImportant": true
      }
    ],
    "edges": [
      {
        "id": "edge1",
        "source": "node1",
        "target": "node2"
      }
    ],
    "mindmap_id": "65f5..."
  }
}

Response Fields

  • mindmap.mindmap_name: Name of the mind map
  • mindmap.nodes: Array of mind map nodes
    • id: Unique node identifier
    • label: Node label/title
    • positionX: X position coordinate
    • positionY: Y position coordinate
    • definition: Node description/definition
    • isHighlyImportant: Whether this node is marked as important
  • mindmap.edges: Array of connections between nodes
    • id: Unique edge identifier
    • source: Source node ID
    • target: Target node ID
  • mindmap.mindmap_id: ID of the created mind map

Authentication

api-key
string
required
Your organisation’s API key

Path Parameters

sourceId
string
required
The ID of the source to generate mind map from

Request Body

userId
string
required
User identifier

Response

mindmap
object
{
  "userId": "user-123"
}
{
  "mindmap": {
    "mindmap_name": "Algebra Concepts Map",
    "nodes": [
      {
        "id": "node1",
        "label": "Algebra",
        "positionX": "0",
        "positionY": "0",
        "definition": "Branch of mathematics dealing with symbols and rules",
        "isHighlyImportant": true
      },
      {
        "id": "node2",
        "label": "Variables",
        "positionX": "100",
        "positionY": "50",
        "definition": "Symbols representing unknown values",
        "isHighlyImportant": true
      }
    ],
    "edges": [
      {
        "id": "edge1",
        "source": "node1",
        "target": "node2"
      }
    ],
    "mindmap_id": "65f5..."
  }
}

Further Explanation

  • The response contains the generated mind map, including all nodes and their relationships.