Onderzoeksnotities
Toegang tot notities binnen een onderzoek. Notities bevatten de analyseblokken die process mining-workflows definiƫren.
Vereisten
Voordat u notities via deze API kunt openen, moet u het project eerst in de cache laden met behulp van de Project API.
# Laad eerst het project in de cache
curl -X GET "https://your-mindzie-instance.com/api/{tenantId}/project/{projectId}/load" \
-H "Authorization: Bearer YOUR_API_KEY"
Zie Project Cache API voor meer informatie.
Lijst van Onderzoeksnotities
GET /api/{tenantId}/{projectId}/investigation/{investigationId}/notebooks
Haalt alle notities binnen een onderzoek op uit de projectcache.
Padparameters
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
tenantId |
GUID | Ja | De tenant-identificatie |
projectId |
GUID | Ja | De project-identificatie |
investigationId |
GUID | Ja | De identificatie van het onderzoek |
Respons (200 OK)
{
"notebooks": [
{
"notebookId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"investigationId": "11111111-2222-3333-4444-555555555555",
"name": "Main",
"description": "",
"dateCreated": "2024-01-15T10:30:00Z",
"dateModified": "2024-01-20T14:45:00Z",
"createdBy": null,
"modifiedBy": null,
"notebookType": null,
"notebookOrder": 1.0,
"lastExecutionDuration": 0,
"blockCount": 12
},
{
"notebookId": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
"investigationId": "11111111-2222-3333-4444-555555555555",
"name": "Variant Analysis",
"description": "",
"dateCreated": "2024-01-16T09:00:00Z",
"dateModified": "2024-01-18T11:30:00Z",
"createdBy": null,
"modifiedBy": null,
"notebookType": null,
"notebookOrder": 2.0,
"lastExecutionDuration": 0,
"blockCount": 8
}
],
"totalCount": 2
}
Veldomschrijving Notebook Object
| Veld | Type | Beschrijving |
|---|---|---|
notebookId |
GUID | Unieke identificatie voor de notitie |
investigationId |
GUID | Onderzoek waartoe deze notitie behoort |
name |
string | Weergavenaam van de notitie |
description |
string | Beschrijving van de notitie |
dateCreated |
datetime | Wanneer de notitie is aangemaakt |
dateModified |
datetime | Wanneer de notitie voor het laatst is gewijzigd |
createdBy |
GUID | Gebruiker die de notitie heeft aangemaakt |
modifiedBy |
GUID | Gebruiker die de notitie voor het laatst heeft gewijzigd |
notebookType |
integer | Type notitie (0 = standaard) |
notebookOrder |
decimal | Weergavevolgorde binnen het onderzoek |
lastExecutionDuration |
double | Laatste uitvoeringstijd in seconden |
blockCount |
integer | Aantal blokken in de notitie |
Foutreacties
Niet gevonden (404) - Project niet in cache:
"Project not found in cache. Please load the project first using the ProjectController.LoadProject endpoint."
Niet gevonden (404) - Onderzoek niet gevonden:
{
"error": "Investigation not found",
"investigationId": "11111111-2222-3333-4444-555555555555"
}
Haal de Hoofdnietitie op
GET /api/{tenantId}/{projectId}/investigation/{investigationId}/main-notebook
Haalt de hoofdnietitie voor een onderzoek op. De hoofdnietitie wordt automatisch aangemaakt wanneer een onderzoek wordt gestart en bevat doorgaans de kerngrootte- en analyseworkflow.
Padparameters
| Parameter | Type | Verplicht | Beschrijving |
|---|---|---|---|
tenantId |
GUID | Ja | De tenant-identificatie |
projectId |
GUID | Ja | De project-identificatie |
investigationId |
GUID | Ja | De identificatie van het onderzoek |
Respons (200 OK)
{
"notebookId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"investigationId": "11111111-2222-3333-4444-555555555555",
"name": "Main",
"description": "Primary analysis notebook",
"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
}
Foutreacties
Niet gevonden (404) - Onderzoek niet gevonden:
{
"error": "Investigation not found",
"investigationId": "11111111-2222-3333-4444-555555555555"
}
Niet gevonden (404) - Hoofdnietitie niet gevonden:
{
"error": "Main notebook not found for investigation",
"investigationId": "11111111-2222-3333-4444-555555555555"
}
Implementatievoorbeelden
cURL
# Stap 1: Laad eerst het project in de cache
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/project/87654321-4321-4321-4321-210987654321/load" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Stap 2: Lijst alle notities in een onderzoek
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/87654321-4321-4321-4321-210987654321/investigation/11111111-2222-3333-4444-555555555555/notebooks" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Haal de hoofdnietitie direct op
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/87654321-4321-4321-4321-210987654321/investigation/11111111-2222-3333-4444-555555555555/main-notebook" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Python
import requests
TENANT_ID = '12345678-1234-1234-1234-123456789012'
PROJECT_ID = '87654321-4321-4321-4321-210987654321'
BASE_URL = 'https://your-mindzie-instance.com'
class NotebookAccessor:
def __init__(self, token):
self.headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
def load_project(self):
"""Laad het project in de cache voordat u notities opent."""
url = f'{BASE_URL}/api/{TENANT_ID}/project/{PROJECT_ID}/load'
response = requests.get(url, headers=self.headers)
response.raise_for_status()
return response.json()
def list_notebooks(self, investigation_id):
"""Lijst alle notities in een onderzoek."""
url = f'{BASE_URL}/api/{TENANT_ID}/{PROJECT_ID}/investigation/{investigation_id}/notebooks'
response = requests.get(url, headers=self.headers)
response.raise_for_status()
return response.json()
def get_main_notebook(self, investigation_id):
"""Haal de hoofdnietitie voor een onderzoek op."""
url = f'{BASE_URL}/api/{TENANT_ID}/{PROJECT_ID}/investigation/{investigation_id}/main-notebook'
response = requests.get(url, headers=self.headers)
response.raise_for_status()
return response.json()
# Gebruik
accessor = NotebookAccessor('your-auth-token')
investigation_id = '11111111-2222-3333-4444-555555555555'
# Stap 1: Laad project in de cache
print("Project in cache laden...")
load_result = accessor.load_project()
print(f"Project geladen: {load_result['projectName']}")
# Stap 2: Lijst notities
notebooks = accessor.list_notebooks(investigation_id)
print(f"\n{notebooks['totalCount']} notities gevonden:")
for nb in notebooks['notebooks']:
print(f" - {nb['name']}: {nb['blockCount']} blokken")
# Haal de hoofdnietitie op
main = accessor.get_main_notebook(investigation_id)
print(f"\nHoofdnietitie: {main['name']} ({main['blockCount']} blokken)")
JavaScript/Node.js
const TENANT_ID = '12345678-1234-1234-1234-123456789012';
const PROJECT_ID = '87654321-4321-4321-4321-210987654321';
const BASE_URL = 'https://your-mindzie-instance.com';
class NotebookAccessor {
constructor(token) {
this.headers = {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
};
}
async loadProject() {
const url = `${BASE_URL}/api/${TENANT_ID}/project/${PROJECT_ID}/load`;
const response = await fetch(url, { headers: this.headers });
if (!response.ok) throw new Error(`Mislukt: ${response.status}`);
return await response.json();
}
async listNotebooks(investigationId) {
const url = `${BASE_URL}/api/${TENANT_ID}/${PROJECT_ID}/investigation/${investigationId}/notebooks`;
const response = await fetch(url, { headers: this.headers });
if (!response.ok) throw new Error(`Mislukt: ${response.status}`);
return await response.json();
}
async getMainNotebook(investigationId) {
const url = `${BASE_URL}/api/${TENANT_ID}/${PROJECT_ID}/investigation/${investigationId}/main-notebook`;
const response = await fetch(url, { headers: this.headers });
if (!response.ok) throw new Error(`Mislukt: ${response.status}`);
return await response.json();
}
}
// Gebruik
const accessor = new NotebookAccessor('your-auth-token');
const investigationId = '11111111-2222-3333-4444-555555555555';
// Stap 1: Laad het project
console.log('Project in cache laden...');
const loadResult = await accessor.loadProject();
console.log(`Project geladen: ${loadResult.projectName}`);
// Stap 2: Lijst notities
const notebooks = await accessor.listNotebooks(investigationId);
console.log(`\n${notebooks.totalCount} notities gevonden:`);
notebooks.notebooks.forEach(nb => {
console.log(` - ${nb.name}: ${nb.blockCount} blokken`);
});
// Haal de hoofdnietitie op
const main = await accessor.getMainNotebook(investigationId);
console.log(`\nHoofdnietitie: ${main.name} (${main.blockCount} blokken)`);
Best Practices
- Laad Altijd Eerst het Project: Zorg ervoor dat het project in de cache is geladen voordat u notities opent
- Cacheduur: Projecten blijven 30 minuten na laatste toegang in de cache
- Sessie In Stand Houden: API-aanroepen verlengen automatisch de cachelevensduur
- Gebruik de Hoofdnietitie: Voor basisanalyse bevat de hoofdnietitie de primaire workflow
- Notitievolgorde: Notities worden weergegeven volgens
notebookOrdervoor consistente presentatie