Quick Start Examples

.

1. Create a Page and Add Notes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Create a page with notes
curl -X POST http://localhost/api/v1/append_to_page \
  -H "Content-Type: application/json" \
  -d '{
    "page_name": "My Project",
    "notes": [
      {
        "content": "Project overview {priority::high}",
        "order_index": 1
      },
      {
        "content": "TODO Research competitors",
        "order_index": 2
      }
    ]
  }'

2. Search for Tasks

1
2
# Find all TODO tasks
curl "http://localhost/api/v1/search?tasks=TODO&page=1&per_page=10"

3. Get Recent Pages

1
2
# Get the 7 most recently updated pages
curl "http://localhost/api/v1/recent_pages"
1
2
# Search for notes containing "project"
curl "http://localhost/api/v1/search?q=project&page=1&per_page=10"

5. Batch Operations

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Create multiple notes in one request
curl -X POST http://localhost/api/v1/notes \
  -H "Content-Type: application/json" \
  -d '{
    "action": "batch",
    "operations": [
      {
        "type": "create",
        "payload": {
          "page_id": 1,
          "content": "First note {tags::important}",
          "order_index": 1
        }
      },
      {
        "type": "create",
        "payload": {
          "page_id": 1,
          "content": "Second note",
          "order_index": 2
        }
      }
    ]
  }'