Skip to main content
The Content Nodes API allows you to manage individual content items (resources and topics) and organize them in a hierarchical tree structure.

Endpoints

List Content Nodes

curl -H "Authorization: Token YOUR_TOKEN" \
  "https://studio.learningequality.org/api/contentnode?parent={parent_id}"
Retrieve content nodes. Use filters to query specific nodes.
parent
string
Filter by parent node ID
parent__in
string
Filter by multiple parent IDs (comma-separated)
id__in
string
Filter by multiple node IDs (comma-separated)
kind
string
Filter by content kind (e.g., “video”, “document”, “exercise”, “topic”)
root_id
string
Filter by channel root ID
ancestors_of
string
Get all ancestors of a specific node
complete
boolean
Filter by completion status
max_results
integer
Maximum number of results (max 100)
ordering
string
Order results by field (default: “lft”). Prefix with ”-” for descending order.
{
  "results": [
    {
      "id": "node-id-123",
      "content_id": "content-id-456",
      "node_id": "node-id-789",
      "title": "Introduction to Algebra",
      "description": "Basic algebraic concepts",
      "kind": "video",
      "language": "en",
      "license": 1,
      "author": "Jane Doe",
      "provider": "Khan Academy",
      "parent_id": "parent-node-id",
      "channel_id": "channel-id-abc",
      "complete": true,
      "published": true,
      "modified": "2024-01-15T10:30:00Z",
      "thumbnail_src": "https://storage.example.com/thumb.jpg",
      "has_children": false,
      "resource_count": 1,
      "total_count": 1
    }
  ],
  "more": null
}

Create Content Node

curl -X POST \
  -H "Authorization: Token YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "parent": "parent-node-id",
    "title": "New Video",
    "kind": "video",
    "license": 1
  }' \
  https://studio.learningequality.org/api/contentnode
Create a new content node.
parent
string
required
Parent node ID (required for creation)
title
string
Node title (max 200 characters)
description
string
Node description
kind
string
required
Content kind ID (e.g., “video”, “document”, “exercise”, “topic”, “audio”, “html5”)
language
string
Language code
license
integer
License ID
license_description
string
Additional license details
Copyright holder name
author
string
Content author
provider
string
Content provider organization
aggregator
string
Content aggregator organization
role_visibility
string
Role visibility setting (“learner” or “coach”)
thumbnail_encoding
object
Thumbnail encoding data
extra_fields
object
Additional content-specific fields
suggested_duration
integer
Suggested duration in seconds
tags
object
Tags as key-value pairs where keys are tag names and values are booleans
grade_levels
object
Grade levels as key-value pairs
resource_types
object
Resource types as key-value pairs
learning_activities
object
Learning activities as key-value pairs
accessibility_labels
object
Accessibility labels as key-value pairs
categories
object
Subject categories as key-value pairs
learner_needs
object
Learner needs as key-value pairs
{
  "id": "new-node-id-123",
  "content_id": "content-id-456",
  "node_id": "node-id-789",
  "title": "New Video",
  "kind": "video",
  "parent_id": "parent-node-id",
  "complete": false,
  "published": false
}

Update Content Node

curl -X PATCH \
  -H "Authorization: Token YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Title",
    "description": "Updated description"
  }' \
  https://studio.learningequality.org/api/contentnode/{id}
Update an existing content node.
id
string
required
Content node UUID
The parent field cannot be changed through update - use the move operation instead. The kind field cannot be changed after creation.

Get Node Prerequisites

curl -H "Authorization: Token YOUR_TOKEN" \
  https://studio.learningequality.org/api/contentnode/{id}/requisites
Get all prerequisite relationships for nodes in the same channel.
id
string
required
Content node UUID
[
  {
    "target_node": "node-id-123",
    "prerequisite": "prerequisite-node-id-456"
  }
]

Get Node Size

curl -H "Authorization: Token YOUR_TOKEN" \
  https://studio.learningequality.org/api/contentnode/{id}/size
Calculate the total size of a node and its descendants. Only works on root nodes.
id
string
required
Root content node UUID
{
  "size": 5242880000,
  "stale": false
}

Tree Operations

Move Node

Move a content node to a new position in the tree.
{
  "type": "MOVED",
  "table": "contentnode",
  "key": "node-id-to-move",
  "target": "target-parent-id",
  "position": "last-child"
}
key
string
required
ID of the node to move
target
string
required
ID of the target node
position
string
Position relative to target: “first-child”, “last-child”, “left”, or “right” (default: “last-child”)

Copy Node

Copy a content node and optionally its descendants to a new location.
{
  "type": "COPIED",
  "table": "contentnode",
  "key": "new-node-id",
  "from_key": "source-node-id",
  "target": "target-parent-id",
  "position": "last-child",
  "mods": {
    "title": "Copy of Original"
  },
  "excluded_descendants": []
}
key
string
required
New ID for the copied node
from_key
string
required
ID of the source node to copy
target
string
required
ID of the target parent node
position
string
Position relative to target
mods
object
Modifications to apply to the copied node
excluded_descendants
array
Array of descendant node IDs to exclude from the copy

Content Node Fields

id
string
Unique node identifier (UUID)
content_id
string
Content identifier for tracking user interactions (UUID)
node_id
string
Node identifier used in Kolibri (UUID)
title
string
Node title (max 200 characters)
description
string
Node description
kind
string
Content kind (video, document, exercise, topic, audio, html5, etc.)
language
string
Language code
license
integer
License ID
license_description
string
License description
Copyright holder
author
string
Content author
provider
string
Content provider
aggregator
string
Content aggregator
parent_id
string
Parent node ID
channel_id
string
Channel ID this node belongs to
root_id
string
Root node ID of the tree
original_channel_id
string
Original channel this content was copied from
original_channel_name
string
Name of the original channel
original_source_node_id
string
Original node ID from source
complete
boolean
Whether the node is complete and ready for publishing
changed
boolean
Whether the node has been changed
published
boolean
Whether the node has been published
modified
string
Last modification timestamp (ISO 8601)
thumbnail_src
string
Thumbnail image URL or base64 data
thumbnail_encoding
object
Thumbnail encoding information
role_visibility
string
Visibility setting (learner/coach)
has_children
boolean
Whether this node has child nodes
total_count
integer
Total number of descendants
resource_count
integer
Number of non-topic descendants
coach_count
integer
Number of coach-only resources
assessment_item_count
integer
Number of assessment items (for exercises)
error_count
integer
Number of incomplete descendants
has_updated_descendants
boolean
Whether any published descendants have been updated
has_new_descendants
boolean
Whether there are new unpublished descendants
tags
array
Array of tag names
extra_fields
object
Additional content-specific fields
suggested_duration
integer
Suggested duration in seconds
grade_levels
object
Grade level labels
resource_types
object
Resource type labels
learning_activities
object
Learning activity labels
accessibility_labels
object
Accessibility labels
categories
object
Subject category labels
learner_needs
object
Learner needs labels

Build docs developers (and LLMs) love