Skip to main content

Nodes API

Nodes are the core data structure in DreamSolve, representing hierarchical entities such as Projects, Tasks, and other organizational elements.

Base URL

https://dreamsolve.ai/api/v1

Authentication

All endpoints require authentication via the x-api-key header. See the API Overview for details.


List Nodes

Retrieve all nodes for the authenticated user.

GET /api/v1/nodes

Query Parameters

ParameterTypeDescription
project_idstringFilter tasks by project ID
parent_task_idstringFilter subtasks by parent task ID

Response

[
{
"id": "123",
"type": "Project",
"name": "My Project",
"description": "Project description",
"status": "active",
"parentId": null,
"containerId": null,
"organizationId": "org_456",
"children": [],
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
]

Get Node by ID

Retrieve a specific node by its ID.

GET /api/v1/nodes/:id

Path Parameters

ParameterTypeDescription
idstringThe node ID

Response

{
"id": "123",
"type": "Task",
"name": "My Task",
"description": "Task description",
"status": "pending",
"parentId": "456",
"containerId": "789",
"organizationId": "org_456",
"children": [],
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}

Create Node

Create a new node.

POST /api/v1/nodes

Request Body

{
"type": "Task",
"name": "New Task",
"description": "Task description",
"status": "pending",
"parentId": "456"
}
FieldTypeRequiredDescription
typestringYesNode type (Project, Task, etc.)
namestringYesNode name
descriptionstringNoNode description
statusstringNoNode status
parentIdstringNoParent node ID

Response

{
"id": "789",
"type": "Task",
"name": "New Task",
"description": "Task description",
"status": "pending",
"parentId": "456",
"created_at": "2024-01-15T10:00:00Z"
}

Status Code: 201 Created


Update Node

Update an existing node.

PUT /api/v1/nodes/:id

Path Parameters

ParameterTypeDescription
idstringThe node ID

Request Body

{
"name": "Updated Task Name",
"status": "completed"
}

Response

{
"id": "789",
"type": "Task",
"name": "Updated Task Name",
"status": "completed",
"updated_at": "2024-01-15T12:00:00Z"
}

Delete Node

Delete a node and all its children.

DELETE /api/v1/nodes/:id

Path Parameters

ParameterTypeDescription
idstringThe node ID

Response

{
"message": "node deleted successfully"
}

Create Nodes from Plan

Create multiple nodes from a text plan using AI parsing.

POST /api/v1/nodes/create-from-plan

Request Body

{
"nodeId": "123",
"plan": "1. Research competitors\n2. Design mockups\n3. Implement features",
"nodeType": "Task"
}
FieldTypeRequiredDescription
nodeIdstringYesParent node ID
planstringYesText plan to parse
nodeTypestringNoType for created nodes (defaults to parent type)

Response

{
"success": true,
"createdNodes": [
{ "id": "124", "name": "Research competitors" },
{ "id": "125", "name": "Design mockups" },
{ "id": "126", "name": "Implement features" }
],
"summary": "Created 3 tasks from plan"
}

Status Code: 201 Created


Node Files

Manage files associated with a node.

List Node Files

GET /api/v1/nodes/:nodeId/files

Response

{
"files": [
{
"id": "file_123",
"name": "document.pdf",
"description": "Project documentation",
"provider_type": "google_drive",
"mime_type": "application/pdf",
"scan_status": null,
"is_readable": true
}
]
}

Create File Association

POST /api/v1/nodes/:nodeId/files

Request Body

{
"name": "document.pdf",
"description": "Project documentation",
"provider_type": "google_drive",
"file_id": "gdrive_abc123",
"mime_type": "application/pdf"
}
FieldTypeRequiredDescription
namestringYesFile name
descriptionstringNoFile description
provider_typestringYesOne of: google_drive, public_url, internal
file_idstringConditionalRequired for internal provider type
provider_dataobjectNoProvider-specific metadata
file_urlstringNoURL for public_url type
mime_typestringNoMIME type of the file
file_sizenumberNoFile size in bytes

Response

{
"file": {
"id": "file_124",
"name": "document.pdf",
"provider_type": "google_drive"
}
}

Status Code: 201 Created


Node Types

DreamSolve supports various node types:

TypeDescription
ProjectTop-level container for work
TaskActionable work item
SubtaskChild task under a Task
AgentAI agent configuration
TeamTeam or group container
ResourceResource or reference material

Error Responses

Status CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
404Not Found - Node not found or access denied
500Internal Server Error