Let the platform do the work

//insertafter/:target POST

Overview

Insert new node after target node.

Request Arguments

Name Type Description Required
module String The name of sugar module that contains a nested set data and implements the NestedSetInterface. True
target String The ID of record that will be used as target to insert new node after True

Request

{
    "name" : "Children Node 1"
}

Response Arguments

This endpoint does not return any response arguments.

Response

This endpoint returns a newly created bean
{ "my_favorite":false, "following":"", "id":"59fa8dd7-0f2c-4bfd-364f-54495f77fa3f", "name":"Default title", "date_entered":"2014-10-23T23:03:22+03:00", "date_modified":"2014-10-23T23:03:22+03:00", "modified_user_id":"1", "modified_by_name":"Administrator", "created_by":"1", "created_by_name":"Administrator", "doc_owner":"", "description":"", "deleted":false, "source_id":"", "source_type":"", "source_meta":"", "root":"be9b0c4a-8b78-1ffa-4f14-54481c2f6269", "lft":118, "rgt":119, "level":1, "_acl":{"fields":{}}, "_module":"Categories" }

Change Log

Version Change
v10 Added /<module>/insertafter/:target POST endpoint.

Topics