İnceleme Defterleri
Bir inceleme içindeki defterlere erişin. Defterler, süreç madenciliği iş akışlarını tanımlayan analiz bloklarını içerir.
Ön Koşullar
Bu API aracılığıyla defterlere erişmeden önce, projeyi Project API kullanarak önbelleğe yüklemelisiniz.
# Önce projeyi önbelleğe yükleyin
curl -X GET "https://your-mindzie-instance.com/api/{tenantId}/project/{projectId}/load" \
-H "Authorization: Bearer YOUR_API_KEY"
Detaylar için Project Cache API bölümüne bakınız.
İnceleme Defterlerini Listele
GET /api/{tenantId}/{projectId}/investigation/{investigationId}/notebooks
Projede bulunan önbellekten bir inceleme içindeki tüm defterleri getirir.
Yol Parametreleri
| Parametre | Tür | Gerekli | Açıklama |
|---|---|---|---|
tenantId |
GUID | Evet | Kiracı (tenant) kimliği |
projectId |
GUID | Evet | Proje kimliği |
investigationId |
GUID | Evet | İnceleme kimliği |
Yanıt (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
}
Defter Nesnesi Alanları
| Alan | Tür | Açıklama |
|---|---|---|
notebookId |
GUID | Defter için benzersiz tanımlayıcı |
investigationId |
GUID | Bu deftere ait inceleme |
name |
string | Defterin görüntüleme adı |
description |
string | Defterin açıklaması |
dateCreated |
datetime | Defterin oluşturulma zamanı |
dateModified |
datetime | Defterin son değiştirilme zamanı |
createdBy |
GUID | Defteri oluşturan kullanıcı |
modifiedBy |
GUID | Defteri son değiştiren kullanıcı |
notebookType |
integer | Defter tipi (0 = standart) |
notebookOrder |
decimal | İnceleme içerisindeki görüntüleme sırası |
lastExecutionDuration |
double | Son yürütme süresi (saniye cinsinden) |
blockCount |
integer | Defterdeki blok sayısı |
Hata Yanıtları
Bulunamadı (404) - Proje önbellekte değil:
"Project not found in cache. Please load the project first using the ProjectController.LoadProject endpoint."
Bulunamadı (404) - İnceleme bulunamadı:
{
"error": "Investigation not found",
"investigationId": "11111111-2222-3333-4444-555555555555"
}
Ana Defteri Getir
GET /api/{tenantId}/{projectId}/investigation/{investigationId}/main-notebook
Bir inceleme için ana defteri getirir. Ana defter, inceleme oluşturulduğunda otomatik olarak yaratılır ve genellikle temel filtreleme ve analiz iş akışını içerir.
Yol Parametreleri
| Parametre | Tür | Gerekli | Açıklama |
|---|---|---|---|
tenantId |
GUID | Evet | Kiracı (tenant) kimliği |
projectId |
GUID | Evet | Proje kimliği |
investigationId |
GUID | Evet | İnceleme kimliği |
Yanıt (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
}
Hata Yanıtları
Bulunamadı (404) - İnceleme bulunamadı:
{
"error": "Investigation not found",
"investigationId": "11111111-2222-3333-4444-555555555555"
}
Bulunamadı (404) - Ana defter bulunamadı:
{
"error": "Main notebook not found for investigation",
"investigationId": "11111111-2222-3333-4444-555555555555"
}
Uygulama Örnekleri
cURL
# Adım 1: Önce projeyi önbelleğe yükleyin
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"
# Adım 2: İncelemedeki tüm defterleri listele
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"
# Ana defteri doğrudan getir
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):
"""Defterlere erişmeden önce projeyi önbelleğe yükle."""
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):
"""Bir incelemedeki tüm defterleri listele."""
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):
"""Bir inceleme için ana defteri getir."""
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()
# Kullanım
accessor = NotebookAccessor('your-auth-token')
investigation_id = '11111111-2222-3333-4444-555555555555'
# Adım 1: Projeyi önbelleğe yükle
print("Projeyi önbelleğe yüklüyor...")
load_result = accessor.load_project()
print(f"Proje yüklendi: {load_result['projectName']}")
# Adım 2: Defterleri listele
notebooks = accessor.list_notebooks(investigation_id)
print(f"\nToplam {notebooks['totalCount']} defter bulundu:")
for nb in notebooks['notebooks']:
print(f" - {nb['name']}: {nb['blockCount']} blok")
# Ana defteri al
main = accessor.get_main_notebook(investigation_id)
print(f"\nAna defter: {main['name']} ({main['blockCount']} blok)")
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(`Başarısız: ${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(`Başarısız: ${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(`Başarısız: ${response.status}`);
return await response.json();
}
}
// Kullanım
const accessor = new NotebookAccessor('your-auth-token');
const investigationId = '11111111-2222-3333-4444-555555555555';
// Adım 1: Projeyi önbelleğe yükle
console.log('Projeyi önbelleğe yüklüyor...');
const loadResult = await accessor.loadProject();
console.log(`Proje yüklendi: ${loadResult.projectName}`);
// Adım 2: Defterleri listele
const notebooks = await accessor.listNotebooks(investigationId);
console.log(`\nToplam ${notebooks.totalCount} defter bulundu:`);
notebooks.notebooks.forEach(nb => {
console.log(` - ${nb.name}: ${nb.blockCount} blok`);
});
// Ana defteri al
const main = await accessor.getMainNotebook(investigationId);
console.log(`\nAna defter: ${main.name} (${main.blockCount} blok)`);
En İyi Uygulamalar
- Her Zaman Önce Projeyi Yükleyin: Defterlere erişmeden önce projenin önbelleğe yüklendiğinden emin olun
- Önbellek Süresi: Projeler en son erişimden sonra 30 dakika boyunca önbellekte kalır
- Oturumu Güncelle: API çağrıları önbellek süresini otomatik olarak uzatır
- Ana Defteri Kullanın: Temel analizler için ana defter temel iş akışını içerir
- Defter Sırası: Defterler tutarlı görüntüleme için
notebookOrderalanına göre sıralanır