Dashboard-Verwaltung
Auflisten und Abrufen von Dashboards
Greifen Sie auf Dashboards zu, die Visualisierungspanels für Process Mining Insights, KPIs und Analysen enthalten. Dashboards sind Container zur organisierten und teilbaren Darstellung Ihrer Analyseergebnisse.
Verbindungstest
Unautorisierter Ping
GET /api/{tenantId}/{projectId}/dashboard/unauthorized-ping
Test-Endpunkt, der keine Authentifizierung erfordert. Verwenden Sie diesen, um die Erreichbarkeit der Dashboard-API zu überprüfen.
Antwort
Ping Successful
Authentifizierter Ping
GET /api/{tenantId}/{projectId}/dashboard/ping
Authentifizierter Ping-Endpunkt zur Überprüfung des API-Zugriffs für einen bestimmten Mandanten und ein Projekt.
Antwort (200 OK)
Ping Successful (tenant id: {tenantId})
Antwort (401 Unauthorized)
{error message describing authorization failure}
Alle Dashboards auflisten
GET /api/{tenantId}/{projectId}/dashboard
Ruft eine paginierte Liste aller Dashboards im angegebenen Projekt ab. Jedes Dashboard enthält Metadaten, die Anzahl der Panels und eine teilbare URL.
Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
tenantId |
GUID | Ja | Der Mandantenbezeichner |
projectId |
GUID | Ja | Der Projektbezeichner |
Abfrageparameter
| Parameter | Typ | Standard | Beschreibung |
|---|---|---|---|
page |
integer | 1 | Seitennummer für die Paginierung |
pageSize |
integer | 50 | Anzahl der Elemente pro Seite (max. empfohlen: 100) |
Antwort (200 OK)
{
"dashboards": [
{
"dashboardId": "880e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440000",
"name": "Process Overview Dashboard",
"description": "Main dashboard showing key process metrics",
"panelCount": 8,
"url": "https://your-instance.com/dashboard/880e8400-e29b-41d4-a716-446655440000",
"dateCreated": "2024-01-15T10:30:00Z",
"dateModified": "2024-01-20T14:45:00Z",
"createdBy": "user@example.com",
"modifiedBy": "user@example.com"
}
],
"totalCount": 25,
"page": 1,
"pageSize": 50
}
Antwortfelder
| Feld | Typ | Beschreibung |
|---|---|---|
dashboards |
array | Liste der Dashboard-Objekte |
totalCount |
integer | Gesamtanzahl der Dashboards |
page |
integer | Aktuelle Seitennummer |
pageSize |
integer | Elemente pro Seite |
Dashboard-Objektfelder
| Feld | Typ | Beschreibung |
|---|---|---|
dashboardId |
GUID | Eindeutiger Bezeichner für das Dashboard |
projectId |
GUID | Projekt, zu dem das Dashboard gehört |
name |
string | Anzeigename des Dashboards |
description |
string | Beschreibung des Dashboards |
panelCount |
integer | Anzahl der Panels im Dashboard |
url |
string | Teilbare URL für das Dashboard |
dateCreated |
datetime | Zeitpunkt der Erstellung des Dashboards |
dateModified |
datetime | Zeitpunkt der letzten Änderung des Dashboards |
createdBy |
string | Benutzer, der das Dashboard erstellt hat |
modifiedBy |
string | Benutzer, der das Dashboard zuletzt geändert hat |
Dashboard Details abrufen
GET /api/{tenantId}/{projectId}/dashboard/{dashboardId}
Ruft umfassende Informationen zu einem bestimmten Dashboard ab, einschließlich Metadaten, Panel-Anzahl und teilbarer URL.
Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
tenantId |
GUID | Ja | Der Mandantenbezeichner |
projectId |
GUID | Ja | Der Projektbezeichner |
dashboardId |
GUID | Ja | Der Dashboard-Bezeichner |
Antwort (200 OK)
{
"dashboardId": "880e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440000",
"name": "Process Overview Dashboard",
"description": "Main dashboard showing key process metrics and performance indicators",
"panelCount": 8,
"url": "https://your-instance.com/dashboard/880e8400-e29b-41d4-a716-446655440000",
"dateCreated": "2024-01-15T10:30:00Z",
"dateModified": "2024-01-20T14:45:00Z",
"createdBy": "user@example.com",
"modifiedBy": "user@example.com"
}
Fehlerantworten
Nicht gefunden (404):
{
"Error": "Dashboard not found",
"DashboardId": "880e8400-e29b-41d4-a716-446655440000"
}
Dashboards erstellen
Die Erstellung von Dashboards wird über die mindzieStudio-Benutzeroberfläche verwaltet, da sie Kontext der Untersuchung und Notebook-Beziehungen erfordert. Siehe Dashboard Overview für Details.
Implementierungsbeispiele
cURL
# Verbindung testen (keine Authentifizierung)
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/87654321-4321-4321-4321-210987654321/dashboard/unauthorized-ping"
# Verbindung testen (authentifiziert)
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/87654321-4321-4321-4321-210987654321/dashboard/ping" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Alle Dashboards auflisten
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/87654321-4321-4321-4321-210987654321/dashboard?page=1&pageSize=50" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# Bestimmtes Dashboard abrufen
curl -X GET "https://your-mindzie-instance.com/api/12345678-1234-1234-1234-123456789012/87654321-4321-4321-4321-210987654321/dashboard/880e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
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 DashboardManager {
constructor(token) {
this.headers = {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
};
}
async getAllDashboards(page = 1, pageSize = 50) {
const url = `${BASE_URL}/api/${TENANT_ID}/${PROJECT_ID}/dashboard?page=${page}&pageSize=${pageSize}`;
const response = await fetch(url, { headers: this.headers });
return await response.json();
}
async getDashboard(dashboardId) {
const url = `${BASE_URL}/api/${TENANT_ID}/${PROJECT_ID}/dashboard/${dashboardId}`;
const response = await fetch(url, { headers: this.headers });
if (response.ok) {
return await response.json();
} else if (response.status === 404) {
throw new Error('Dashboard not found');
} else {
throw new Error(`Failed to get dashboard: ${response.status}`);
}
}
async listAllDashboards() {
const allDashboards = [];
let page = 1;
while (true) {
const result = await this.getAllDashboards(page);
allDashboards.push(...result.dashboards);
if (allDashboards.length >= result.totalCount) {
break;
}
page++;
}
return allDashboards;
}
}
// Verwendung
const manager = new DashboardManager('your-auth-token');
// Alle Dashboards abrufen
const result = await manager.getAllDashboards();
console.log(`Gefundene Dashboards: ${result.totalCount}`);
result.dashboards.forEach(d => {
console.log(`- ${d.name}: ${d.panelCount} Panels`);
console.log(` URL: ${d.url}`);
});
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 DashboardManager:
def __init__(self, token):
self.headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
def get_all_dashboards(self, page=1, page_size=50):
"""Erhalte paginierte Liste von Dashboards."""
url = f'{BASE_URL}/api/{TENANT_ID}/{PROJECT_ID}/dashboard'
params = {'page': page, 'pageSize': page_size}
response = requests.get(url, headers=self.headers, params=params)
return response.json()
def get_dashboard(self, dashboard_id):
"""Details eines Dashboards abrufen."""
url = f'{BASE_URL}/api/{TENANT_ID}/{PROJECT_ID}/dashboard/{dashboard_id}'
response = requests.get(url, headers=self.headers)
if response.ok:
return response.json()
elif response.status_code == 404:
raise Exception('Dashboard nicht gefunden')
else:
raise Exception(f'Fehler beim Abrufen des Dashboards: {response.status_code}')
def list_all_dashboards(self):
"""Alle Dashboards abrufen (mit Paginierung)."""
all_dashboards = []
page = 1
while True:
result = self.get_all_dashboards(page=page)
all_dashboards.extend(result['dashboards'])
if len(all_dashboards) >= result['totalCount']:
break
page += 1
return all_dashboards
# Verwendung
manager = DashboardManager('your-auth-token')
# Alle Dashboards abrufen
dashboards = manager.get_all_dashboards()
print(f"Gesamtanzahl Dashboards: {dashboards['totalCount']}")
for dashboard in dashboards['dashboards']:
print(f"\nDashboard: {dashboard['name']}")
print(f" Panels: {dashboard['panelCount']}")
print(f" URL: {dashboard['url']}")
C#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
public class DashboardListReturn
{
public List<DashboardReturn> Dashboards { get; set; }
public int TotalCount { get; set; }
public int Page { get; set; }
public int PageSize { get; set; }
}
public class DashboardReturn
{
public Guid DashboardId { get; set; }
public Guid ProjectId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public int PanelCount { get; set; }
public string Url { get; set; }
public DateTime DateCreated { get; set; }
public DateTime DateModified { get; set; }
public string CreatedBy { get; set; }
public string ModifiedBy { get; set; }
}
public class DashboardApiClient
{
private readonly HttpClient _httpClient;
private readonly string _baseUrl;
private readonly Guid _tenantId;
private readonly Guid _projectId;
public DashboardApiClient(string baseUrl, Guid tenantId, Guid projectId, string accessToken)
{
_baseUrl = baseUrl;
_tenantId = tenantId;
_projectId = projectId;
_httpClient = new HttpClient();
_httpClient.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", accessToken);
}
public async Task<DashboardListReturn> GetAllDashboardsAsync(int page = 1, int pageSize = 50)
{
var url = $"{_baseUrl}/api/{_tenantId}/{_projectId}/dashboard?page={page}&pageSize={pageSize}";
var response = await _httpClient.GetAsync(url);
if (response.IsSuccessStatusCode)
{
var json = await response.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize<DashboardListReturn>(json,
new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
}
throw new Exception($"Fehler beim Abrufen der Dashboards: {response.StatusCode}");
}
public async Task<DashboardReturn> GetDashboardAsync(Guid dashboardId)
{
var url = $"{_baseUrl}/api/{_tenantId}/{_projectId}/dashboard/{dashboardId}";
var response = await _httpClient.GetAsync(url);
if (response.IsSuccessStatusCode)
{
var json = await response.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize<DashboardReturn>(json,
new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
}
else if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
{
throw new Exception($"Dashboard {dashboardId} nicht gefunden");
}
throw new Exception($"Fehler beim Abrufen des Dashboards: {response.StatusCode}");
}
}