Skip to content
AlexSchwank edited this page Mar 10, 2013 · 6 revisions

Mindmap As Json

Method
GET

Routes
/map/json/:id
/map/json/:id/nodeCount/:nodeCount

Request Parameter
String id Map Id (= mmIdOnServer)
optinal: int nodeCount weak definition of node count in response (default: -1 = all Nodes)

Response
String jsonString Map as JSON

{
	"id":"135602876213936955604606025812499.mm",
	"isReadonly":"false",
	"root":{
		"id":"ID_1723255651",
		"nodeText":"New Mindmap",
		"isHtml":"false",
		"folded":"false",
		"leftChildren":{...},
		"rightChildren":[...]}
}

Get Node

Method
POST

Routes
/map/getNode

Body
String mapId Map Id
String nodeId Node Id
int nodeCount weak definition of node count in response (-1 = all Nodes)

{
    "mapId": "5", 
    "nodeId": "ID_1",
	"nodeCount": "-1"
}

Response
String nodeAsJson Node as JSON

{
	"id":"ID_87205452",
	"nodeText":"",
	...
}

Add Node

Method
POST

Routes
/map/addNode

Body
String mapId Map Id
String parentNodeId Node Id of parent

{
    "mapId": "5", 
    "parentNodeId": "ID_1"
}

Response
String nodeAsJson Added node as JSON

{
	"id":"ID_87205452",
	"nodeText":""
}

RemoveNode

Method
POST

Routes
/map/deleteNode

Body
String mapId Map Id
String nodeId Node Id

{
    "mapId": "5", 
    "nodeId": "ID_1"
}

Response
No response.

Change Node

Method
POST

Route
/map/{mapId}/changeNode

Body

Only 'id' is required!

{
    "id": "ID_1", 
    "nodeText": "This is a new nodeText",
    "isHtml": false,
    "folded": true,
    "icons": [
        "yes"
    ],
    "image": NOT_HANDLED,
    "link": "http://www.google.de",
    "locked": null,
    "hGap": 10,
    "shiftY": 10,
    "attributes": {
        "key": "value"
    },
}

Get map list from DB

Method
GET

Routes
/maps

Response
JSON list of mindmap informations

{
	[{2", "2", "Dec 02, 2012 6:38:31 PM", "/not/available", "2.mm"},
	{"3", "3", "Dec 03, 2012 1:25:14 PM", "/not/available", "3.mm"}]
}

Clone this wiki locally