Notebook API Overview

Notebooks are containers for analysis blocks that define process mining workflows within investigations. Use the Notebook API to create, manage, and execute analysis workflows programmatically.

Key Concepts

What Are Notebooks?

Notebooks contain ordered sequences of analysis blocks:

  • Filters: Narrow down the data to specific cases or events
  • Calculators: Compute metrics, durations, and derived values
  • Insights: Generate visualizations and statistical analysis
  • Dashboards: Create shareable reports

Blocks are executed in order, with each block receiving data from its parent block.

Notebook Types

Type Value Description
Standard 0 Regular analysis notebook
Template 1 Template-based notebook
BaseKnowledge 2 Foundational knowledge notebook

Auto-Load Behavior

Notebook CRUD operations automatically load the project into the shared cache. You don't need to explicitly call /project/{id}/load before creating, updating, or deleting notebooks.

# Just call the operation directly - project loads automatically
response = requests.post(
    f"{BASE_URL}/api/{TENANT_ID}/{PROJECT_ID}/notebook/investigation/{investigation_id}",
    json={"name": "New Notebook"},
    headers=headers
)

Optimistic Locking

Update operations support optional conflict detection using DateModified:

# Include DateModified to detect concurrent modifications
response = requests.put(
    f"{BASE_URL}/api/{TENANT_ID}/{PROJECT_ID}/notebook/{notebook_id}",
    json={
        "name": "Updated Name",
        "dateModified": "2024-01-15T10:30:00Z"  # From your last GET
    },
    headers=headers
)

# If another user modified the notebook, returns 409 Conflict

API Endpoints

Notebook CRUD

Method Endpoint Description
GET /api/{tenantId}/{projectId}/notebook/investigation/{investigationId} List notebooks in investigation
POST /api/{tenantId}/{projectId}/notebook/investigation/{investigationId} Create notebook
POST /api/{tenantId}/{projectId}/notebook/investigation/{investigationId}/from-template Create from template
GET /api/{tenantId}/{projectId}/notebook/{notebookId} Get notebook details
PUT /api/{tenantId}/{projectId}/notebook/{notebookId} Update notebook
DELETE /api/{tenantId}/{projectId}/notebook/{notebookId} Delete notebook
POST /api/{tenantId}/{projectId}/notebook/{notebookId}/copy Copy notebook

Block Operations

Method Endpoint Description
GET /api/{tenantId}/{projectId}/notebook/{notebookId}/blocks List blocks
POST /api/{tenantId}/{projectId}/notebook/{notebookId}/blocks Create block
GET /api/{tenantId}/{projectId}/notebook/{notebookId}/blocks/order Get block order
PUT /api/{tenantId}/{projectId}/notebook/{notebookId}/blocks/order Reorder blocks

Utility

Method Endpoint Description
GET /api/{tenantId}/{projectId}/notebook/{notebookId}/url Generate shareable URL
GET /api/{tenantId}/{projectId}/notebook/ping Authenticated connectivity test
GET /api/{tenantId}/{projectId}/notebook/unauthorized-ping Public connectivity test

Quick Start

List Notebooks in an Investigation

curl -X GET "https://your-mindzie-instance.com/api/{tenantId}/{projectId}/notebook/investigation/{investigationId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create a Notebook

curl -X POST "https://your-mindzie-instance.com/api/{tenantId}/{projectId}/notebook/investigation/{investigationId}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Analysis", "description": "Process analysis workflow"}'

Create from Template

curl -X POST "https://your-mindzie-instance.com/api/{tenantId}/{projectId}/notebook/investigation/{investigationId}/from-template" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"templateId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "name": "My Analysis"}'

Response Structure

Notebook Response

{
  "notebookId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "investigationId": "11111111-2222-3333-4444-555555555555",
  "name": "Main Analysis",
  "description": "Primary process analysis workflow",
  "dateCreated": "2024-01-15T10:30:00Z",
  "dateModified": "2024-01-20T14:45:00Z",
  "createdBy": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "modifiedBy": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "notebookType": 0,
  "notebookOrder": 1.0,
  "lastExecutionDuration": 2.5,
  "blockCount": 12
}

Response Fields

Field Type Description
notebookId GUID Unique notebook identifier
investigationId GUID Parent investigation ID
name string Notebook name
description string Notebook description
dateCreated datetime Creation timestamp
dateModified datetime Last modification timestamp
createdBy GUID Creator user ID
modifiedBy GUID Last modifier user ID
notebookType integer Type (0=Standard, 1=Template, 2=BaseKnowledge)
notebookOrder decimal Display order within investigation
lastExecutionDuration double Last execution time in seconds
blockCount integer Number of blocks in notebook

What's Next?