Nodes

Create a child node

Creates a new child node.

Note: Creating a child node via this endpoint will function the same as creating a node via the node list endpoint, but the child node will have the given node set as its parent.

Permissions

Only write contributors may create children nodes.

Required

Required fields for creating a node include:

   &nbsptitle

   &nbspcategory

Note: nodes default to private unless the public field is explicitly set to true in the request payload.

Returns

Returns a JSON object with a data key containing the representation of the created node, if the request is successful.

If the request is unsuccessful, an errors key containing information about the failure will be returned. Refer to the list of error codes to understand why this request may have failed.

post/nodes/{node_id}/children/

Request

  • Base URL
    https://api.test.osf.io/v2
  • URL
    https://api.test.osf.io/v2/nodes/{node_id}/children/
  • Auth
    none declared

Path parameters

node_idstring required

The unique identifier of the node.

Request body

idstring

The unique identifier of the node entity.

typestring required

The type identifier of the node entity (nodes).

Example request

{
  "data": {
    "type": "nodes",
    "attributes": {
      "title": "An Excellent Project Title",
      "category": "software"
    }
  }
}

Response

Created

Changes

No recorded changes to this operation across all 2 revisions of this API.