nodes_create
const url = 'https://example.com/api/nodes';const options = { method: 'POST', headers: { 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"title":"example","description":"example","icon":"example","status":"active","workspace":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","parent":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/nodes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "title": "example", "description": "example", "icon": "example", "status": "active", "workspace": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parent": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Create a new Node object.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Node ID to duplicate (triggers async deep copy)
Workspace ID
Request Body
Section titled “Request Body”Serializer for Node model.
object
Return the interactor information of the object’s creator.
Parameters
obj : object The object containing the creator information.
Returns
dict The interactor information of the creator.
object
Return information about the last interactor who edited the object.
Parameters
obj : object The object containing the last editor information.
Returns
dict The interactor information of the last editor.
object
Return a list of IDs representing the path from a given object to its root parent.
Parameters
obj : object The object with an “id” attribute and a “parent” attribute.
Returns
list A list of strings representing the path from the given object to its root parent.
Return count of children for a given object and a related URL to retrieve them.
Only the children the requesting user may read are counted, so that the count matches what the related URL returns: memberships are not inherited at read time, and a node may have children hidden from the user asking for it.
Parameters
obj : object The object for which to retrieve the children.
Returns
dict A dictionary with keys “count” and “related” containing the number of children and a URL to retrieve the related children objects.
object
Return information about the samples, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the sample.
Returns
dict A dictionary with keys “count” and “related” containing the number of samples and a URL to retrieve the related sample objects.
object
Return information about the datalinks, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the datalink.
Returns
dict A dictionary with keys “count” and “related” containing the number of datalinks and a URL to retrieve the related datalink objects.
object
Return information about the metadata, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the metadata.
Returns
dict A dictionary with keys “count” and “related” containing the number of metadata and a URL to retrieve the related metadata objects.
object
Return the role of the user in the node.
Parameters
obj : object The object for which to retrieve the member role.
Returns
str The role of the user in the node, or None if the user is not a member.
Serializer for Node model.
object
Return the interactor information of the object’s creator.
Parameters
obj : object The object containing the creator information.
Returns
dict The interactor information of the creator.
object
Return information about the last interactor who edited the object.
Parameters
obj : object The object containing the last editor information.
Returns
dict The interactor information of the last editor.
object
Return a list of IDs representing the path from a given object to its root parent.
Parameters
obj : object The object with an “id” attribute and a “parent” attribute.
Returns
list A list of strings representing the path from the given object to its root parent.
Return count of children for a given object and a related URL to retrieve them.
Only the children the requesting user may read are counted, so that the count matches what the related URL returns: memberships are not inherited at read time, and a node may have children hidden from the user asking for it.
Parameters
obj : object The object for which to retrieve the children.
Returns
dict A dictionary with keys “count” and “related” containing the number of children and a URL to retrieve the related children objects.
object
Return information about the samples, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the sample.
Returns
dict A dictionary with keys “count” and “related” containing the number of samples and a URL to retrieve the related sample objects.
object
Return information about the datalinks, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the datalink.
Returns
dict A dictionary with keys “count” and “related” containing the number of datalinks and a URL to retrieve the related datalink objects.
object
Return information about the metadata, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the metadata.
Returns
dict A dictionary with keys “count” and “related” containing the number of metadata and a URL to retrieve the related metadata objects.
object
Return the role of the user in the node.
Parameters
obj : object The object for which to retrieve the member role.
Returns
str The role of the user in the node, or None if the user is not a member.
Serializer for Node model.
object
Return the interactor information of the object’s creator.
Parameters
obj : object The object containing the creator information.
Returns
dict The interactor information of the creator.
object
Return information about the last interactor who edited the object.
Parameters
obj : object The object containing the last editor information.
Returns
dict The interactor information of the last editor.
object
Return a list of IDs representing the path from a given object to its root parent.
Parameters
obj : object The object with an “id” attribute and a “parent” attribute.
Returns
list A list of strings representing the path from the given object to its root parent.
Return count of children for a given object and a related URL to retrieve them.
Only the children the requesting user may read are counted, so that the count matches what the related URL returns: memberships are not inherited at read time, and a node may have children hidden from the user asking for it.
Parameters
obj : object The object for which to retrieve the children.
Returns
dict A dictionary with keys “count” and “related” containing the number of children and a URL to retrieve the related children objects.
object
Return information about the samples, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the sample.
Returns
dict A dictionary with keys “count” and “related” containing the number of samples and a URL to retrieve the related sample objects.
object
Return information about the datalinks, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the datalink.
Returns
dict A dictionary with keys “count” and “related” containing the number of datalinks and a URL to retrieve the related datalink objects.
object
Return information about the metadata, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the metadata.
Returns
dict A dictionary with keys “count” and “related” containing the number of metadata and a URL to retrieve the related metadata objects.
object
Return the role of the user in the node.
Parameters
obj : object The object for which to retrieve the member role.
Returns
str The role of the user in the node, or None if the user is not a member.
Responses
Section titled “Responses”Serializer for Node model.
object
Return the interactor information of the object’s creator.
Parameters
obj : object The object containing the creator information.
Returns
dict The interactor information of the creator.
object
Return information about the last interactor who edited the object.
Parameters
obj : object The object containing the last editor information.
Returns
dict The interactor information of the last editor.
object
Return a list of IDs representing the path from a given object to its root parent.
Parameters
obj : object The object with an “id” attribute and a “parent” attribute.
Returns
list A list of strings representing the path from the given object to its root parent.
Return count of children for a given object and a related URL to retrieve them.
Only the children the requesting user may read are counted, so that the count matches what the related URL returns: memberships are not inherited at read time, and a node may have children hidden from the user asking for it.
Parameters
obj : object The object for which to retrieve the children.
Returns
dict A dictionary with keys “count” and “related” containing the number of children and a URL to retrieve the related children objects.
object
Return information about the samples, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the sample.
Returns
dict A dictionary with keys “count” and “related” containing the number of samples and a URL to retrieve the related sample objects.
object
Return information about the datalinks, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the datalink.
Returns
dict A dictionary with keys “count” and “related” containing the number of datalinks and a URL to retrieve the related datalink objects.
object
Return information about the metadata, including the count and a related URL.
Parameters
obj : object The object for which to retrieve the metadata.
Returns
dict A dictionary with keys “count” and “related” containing the number of metadata and a URL to retrieve the related metadata objects.
object
Return the role of the user in the node.
Parameters
obj : object The object for which to retrieve the member role.
Returns
str The role of the user in the node, or None if the user is not a member.
Example
{ "status": "active"}object
object
Example
{ "code": "body_validation_error", "message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.", "details": [ { "parameter": "status", "code": "invalid_choice", "message": "\"<status_value>\" is not a valid choice." } ]}object
object
Example
{ "code": "forbidden", "message": "You do not have permission to perform this operation. Check the `details` property for more details.", "details": [ { "parameter": "node", "code": "not_allowed", "message": "The member's role does not allow creation." } ]}
