Projektverwaltung
Verwalten Sie Projekte innerhalb von mindzieStudio-Mandanten. Erstellen, abrufen, aktualisieren und löschen Sie Projekte, die Datensätze, Untersuchungen, Dashboards und Analyse-Workflows enthalten.
Verbindungstest
Unautorisierter Ping
GET /api/{tenantId}/project/unauthorized-ping
Test-Endpunkt, der keine Authentifizierung erfordert. Verwenden Sie diesen, um die Netzwerkverbindung zu überprüfen.
Antwort
Ping Successful
Authentifizierter Ping
GET /api/{tenantId}/project/ping
Authentifizierter Ping-Endpunkt zur Überprüfung des API-Zugriffs für einen bestimmten Mandanten.
Antwort (200 OK)
Ping Successful (tenant id: {tenantId})
Alle Projekte auflisten
GET /api/{tenantId}/project
Gibt eine paginierte Liste aller Projekte zurück, auf die der authentifizierte Benutzer im angegebenen Mandanten Zugriff hat.
Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
tenantId |
GUID | Ja | Die Mandanten-ID |
Query-Parameter
| Parameter | Typ | Standard | Beschreibung |
|---|---|---|---|
page |
Ganzzahl | 1 | Seitenzahl für die Paginierung |
pageSize |
Ganzzahl | 50 | Anzahl der Elemente pro Seite (max. empfohlen: 100) |
Antwort (200 OK)
{
"projects": [
{
"projectId": "87654321-4321-4321-4321-210987654321",
"tenantId": "12345678-1234-1234-1234-123456789012",
"projectName": "Purchase Order Analysis",
"projectDescription": "Process mining analysis of P2P workflow",
"dateCreated": "2024-01-15T10:30:00Z",
"dateModified": "2024-01-20T14:45:00Z",
"createdBy": "user@example.com",
"modifiedBy": "user@example.com",
"isActive": true,
"datasetCount": 3,
"investigationCount": 5,
"dashboardCount": 2,
"userCount": 8
}
],
"totalCount": 15,
"page": 1,
"pageSize": 50
}
Felder des Projekt-Objekts
| Feld | Typ | Beschreibung |
|---|---|---|
projectId |
GUID | Eindeutige Kennung für das Projekt |
tenantId |
GUID | Mandant, dem dieses Projekt zugeordnet ist |
projectName |
string | Anzeigename des Projekts |
projectDescription |
string | Beschreibung des Projekts |
dateCreated |
datetime | Zeitpunkt der Erstellung des Projekts |
dateModified |
datetime | Zeitpunkt der letzten Änderung des Projekts |
createdBy |
string | Benutzer, der das Projekt erstellt hat |
modifiedBy |
string | Benutzer, der das Projekt zuletzt geändert hat |
isActive |
boolean | Ob das Projekt aktiv ist |
datasetCount |
integer | Anzahl der Datensätze im Projekt |
investigationCount |
integer | Anzahl der Untersuchungen |
dashboardCount |
integer | Anzahl der Dashboards |
userCount |
integer | Anzahl der Benutzer mit Zugriff |
Projektdetails abrufen
GET /api/{tenantId}/project/{projectId}
Ruft detaillierte Informationen zu einem bestimmten Projekt ab.
Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
tenantId |
GUID | Ja | Die Mandanten-ID |
projectId |
GUID | Ja | Die Projekt-ID |
Antwort (200 OK)
Gleiches Format wie das Projektobjekt in der Listen-Antwort.
Fehlermeldungen
Nicht gefunden (404):
{
"error": "Project not found with ID '{projectId}'. The project may have been deleted or the ID is incorrect.",
"projectId": "87654321-4321-4321-4321-210987654321"
}
Projektübersicht abrufen
GET /api/{tenantId}/project/{projectId}/summary
Ruft aggregierte Statistiken und Schlüsselmesswerte für das Projekt ab.
Antwort (200 OK)
{
"projectId": "87654321-4321-4321-4321-210987654321",
"projectName": "Purchase Order Analysis",
"projectDescription": "Process mining analysis of P2P workflow",
"dateCreated": "2024-01-15T10:30:00Z",
"dateModified": "2024-01-20T14:45:00Z",
"statistics": {
"totalDatasets": 3,
"totalInvestigations": 5,
"totalDashboards": 2,
"totalNotebooks": 12,
"totalUsers": 8
}
}
Projekt erstellen
POST /api/{tenantId}/project
Erstellt ein neues Projekt im angegebenen Mandanten.
Anforderungstext
{
"projectName": "New Analysis Project",
"projectDescription": "Process mining analysis for procurement workflow"
}
Anforderungsfelder
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
projectName |
string | Ja | Projektname (max. 255 Zeichen) |
projectDescription |
string | Nein | Beschreibung (max. 1000 Zeichen) |
Antwort (201 Created)
Gibt das erstellte Projektobjekt zurück (gleiches Format wie Get Project).
Fehlermeldungen
Fehlerhafte Anfrage (400):
{
"error": "Validation failed",
"validationErrors": ["Project name is required"]
}
Projekt aktualisieren
PUT /api/{tenantId}/project/{projectId}
Aktualisiert die Eigenschaften eines bestehenden Projekts.
Pfadparameter
| Parameter | Typ | Beschreibung |
|---|---|---|
tenantId |
GUID | Die Mandanten-ID |
projectId |
GUID | Die Projekt-ID |
Anforderungstext
{
"projectName": "Updated Project Name",
"projectDescription": "Updated description",
"isActive": true
}
Anforderungsfelder
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
projectName |
string | Ja | Neuer Projektname |
projectDescription |
string | Nein | Neue Beschreibung |
isActive |
boolean | Nein | Projekt aktivieren/deaktivieren |
Antwort (200 OK)
Gibt das aktualisierte Projektobjekt zurück.
Projekt löschen
DELETE /api/{tenantId}/project/{projectId}
Löscht ein Projekt und ALLE zugehörigen Daten dauerhaft.
WARNUNG: Dies ist eine DESTRUKTIVE Operation, die NICHT rückgängig gemacht werden kann.
Cascade-Löschung umfasst
- Alle Datensätze im Projekt
- Alle Untersuchungen und Notebooks
- Alle Dashboards
- Alle Benutzerberechtigungen
- Alle Blob-Speicherdateien (Ereignisprotokolle, Anhänge)
Pfadparameter
| Parameter | Typ | Beschreibung |
|---|---|---|
tenantId |
GUID | Die Mandanten-ID |
projectId |
GUID | Die Projekt-ID |
Antwort (200 OK)
{
"message": "Project deleted successfully",
"projectId": "87654321-4321-4321-4321-210987654321"
}
Implementierungsbeispiele
cURL
# Alle Projekte auflisten
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/project" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Projektdetails abrufen
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/project/87654321-4321-4321-4321-210987654321" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Neues Projekt erstellen
curl -X POST "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/project" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectName": "Q4 Analysis",
"projectDescription": "Quarterly procurement analysis"
}'
# Projekt aktualisieren
curl -X PUT "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/project/87654321-4321-4321-4321-210987654321" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projectName": "Q4 Analysis - Final",
"projectDescription": "Updated description"
}'
# Projekt löschen (VORSICHT: Unwiderruflich!)
curl -X DELETE "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/project/87654321-4321-4321-4321-210987654321" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Python
import requests
TENANT_ID = '12345678-1234-1234-1234-123456789012'
BASE_URL = 'https://your-mindzie-instance.com'
class ProjectManager:
def __init__(self, token):
self.headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
def list_projects(self, page=1, page_size=50):
"""Liste aller Projekte im Mandanten."""
url = f'{BASE_URL}/api/{TENANT_ID}/project'
params = {'page': page, 'pageSize': page_size}
response = requests.get(url, headers=self.headers, params=params)
response.raise_for_status()
return response.json()
def get_project(self, project_id):
"""Projektdetails abrufen."""
url = f'{BASE_URL}/api/{TENANT_ID}/project/{project_id}'
response = requests.get(url, headers=self.headers)
response.raise_for_status()
return response.json()
def create_project(self, name, description=''):
"""Neues Projekt erstellen."""
url = f'{BASE_URL}/api/{TENANT_ID}/project'
payload = {
'projectName': name,
'projectDescription': description
}
response = requests.post(url, json=payload, headers=self.headers)
response.raise_for_status()
return response.json()
def update_project(self, project_id, name=None, description=None, is_active=None):
"""Bestehendes Projekt aktualisieren."""
url = f'{BASE_URL}/api/{TENANT_ID}/project/{project_id}'
payload = {}
if name:
payload['projectName'] = name
if description is not None:
payload['projectDescription'] = description
if is_active is not None:
payload['isActive'] = is_active
response = requests.put(url, json=payload, headers=self.headers)
response.raise_for_status()
return response.json()
def delete_project(self, project_id):
"""Projekt löschen (VORSICHT: Unwiderruflich!)."""
url = f'{BASE_URL}/api/{TENANT_ID}/project/{project_id}'
response = requests.delete(url, headers=self.headers)
response.raise_for_status()
return response.json()
# Verwendung
manager = ProjectManager('your-auth-token')
# Alle Projekte auflisten
result = manager.list_projects()
print(f"Gesamtzahl der Projekte: {result['totalCount']}")
for project in result['projects']:
print(f"- {project['projectName']}: {project['datasetCount']} Datensätze")
# Neues Projekt erstellen
new_project = manager.create_project(
name='API Test Project',
description='Created via API'
)
print(f"Erstellt: {new_project['projectId']}")
JavaScript/Node.js
const TENANT_ID = '12345678-1234-1234-1234-123456789012';
const BASE_URL = 'https://your-mindzie-instance.com';
class ProjectManager {
constructor(token) {
this.headers = {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
};
}
async listProjects(page = 1, pageSize = 50) {
const url = `${BASE_URL}/api/${TENANT_ID}/project?page=${page}&pageSize=${pageSize}`;
const response = await fetch(url, { headers: this.headers });
if (!response.ok) throw new Error(`Failed: ${response.status}`);
return await response.json();
}
async getProject(projectId) {
const url = `${BASE_URL}/api/${TENANT_ID}/project/${projectId}`;
const response = await fetch(url, { headers: this.headers });
if (!response.ok) throw new Error(`Failed: ${response.status}`);
return await response.json();
}
async createProject(name, description = '') {
const url = `${BASE_URL}/api/${TENANT_ID}/project`;
const response = await fetch(url, {
method: 'POST',
headers: this.headers,
body: JSON.stringify({ projectName: name, projectDescription: description })
});
if (!response.ok) throw new Error(`Failed: ${response.status}`);
return await response.json();
}
async deleteProject(projectId) {
const url = `${BASE_URL}/api/${TENANT_ID}/project/${projectId}`;
const response = await fetch(url, {
method: 'DELETE',
headers: this.headers
});
if (!response.ok) throw new Error(`Failed: ${response.status}`);
return await response.json();
}
}
// Verwendung
const manager = new ProjectManager('your-auth-token');
const projects = await manager.listProjects();
console.log(`Gefundene Projekte: ${projects.totalCount}`);