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

Mindmap As Json

Method
GET

Routes
/map/json/:mapId
/map/json/:mapId/nodeCount/:nodeCount

Request Parameter
String mapId 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
GET

Route
/map/{mapId}/node/{nodeId}

Request Parameter
String mapId Map Id (= mmIdOnServer)
String nodeId Node Id

Response
String nodeAsJson Node as JSON

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

Add Node

Method
POST

Routes
/map/{mapId}/addNode

Body
Type: application/x-www-form-urlencoded

String parentNodeId Node Id of parent

parentNodeId=ID_1

Response
String nodeAsJson Added node as JSON

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

Delete Node

Method
DELETE

Routes
/map/{mapId}/node/{nodeId}

Request Parameter
String mapId Map Id (= mmIdOnServer)
String nodeId Node Id

Response
No response.

Change Node

Method
POST

Route
/map/{mapId}/changeNode

Body
Type: application/x-www-form-urlencoded

Only 'id' is required!

nodeJson={"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