Documentation Index Fetch the complete documentation index at: https://docs.localmind.ai/llms.txt
Use this file to discover all available pages before exploring further.
Die Automate API ist eine RESTful API, die es Ihnen ermöglicht, Workflows, Executions und Nodes programmatisch zu verwalten und zu überwachen. Sie verwendet JSON für Anfragen und Antworten, alle Endpoints sind über HTTPS verfügbar und erfordern Authentifizierung. Integrieren Sie Automate nahtlos in Ihre eigenen Anwendungen und Systeme.
REST API Standard REST-Endpoints für alle Operationen
JSON Format Alle Anfragen und Antworten im JSON-Format
HTTPS Only Sichere Verbindungen über HTTPS erforderlich
Authentifizierung
API Key Authentication
Die Automate API verwendet API Keys für die Authentifizierung. Sie erhalten Ihren API Key aus den Automate-Einstellungen.
cURL Beispiel
JavaScript Beispiel
Python Beispiel
curl -X GET "https://automate.localmind.ai/api/v1/workflows" \
-H "X-Api-Key: your-api-key-here"
API Key erstellen
Zu Automate-Einstellungen navigieren
Öffnen Sie Automate und navigieren Sie zu Settings → API Keys
Neuen API Key erstellen
Klicken Sie auf “Create API Key” und geben Sie einen Namen ein
API Key kopieren
Kopieren Sie den generierten API Key sofort - er wird nur einmal angezeigt
Sicher speichern
Speichern Sie den API Key sicher in Ihrem Credential-Manager oder Environment Variables
Wichtig: API Keys sind wie Passwörter. Teilen Sie sie niemals öffentlich und speichern Sie sie sicher. Wenn ein API Key kompromittiert wurde, löschen Sie ihn sofort und erstellen Sie einen neuen.
Base URL
Alle API-Endpoints sind relativ zu dieser Base URL:
https://automate.localmind.ai/api/v1
Für Self-Hosted Installationen:
https://your-domain.com/api/v1
Rate Limits
Die Automate API hat Rate Limits, um die Stabilität des Systems zu gewährleisten:
Standard Limit 100 Requests pro Minute pro API Key
Burst Limit 10 Requests pro Sekunde für kurze Bursts
Jede API-Antwort enthält Rate Limit Informationen:
X-RateLimit-Limit : 100
X-RateLimit-Remaining : 95
X-RateLimit-Reset : 1640995200
Rate Limit Handling
Rate Limit Handling
Python Rate Limit Handling
async function makeApiRequest ( url , options ) {
const response = await fetch ( url , options );
if ( response . status === 429 ) {
// Rate Limit erreicht
const resetTime = parseInt ( response . headers . get ( 'X-RateLimit-Reset' ));
const waitTime = resetTime - Math . floor ( Date . now () / 1000 );
console . log ( `Rate limit erreicht. Warte ${ waitTime } Sekunden...` );
await new Promise ( resolve => setTimeout ( resolve , waitTime * 1000 ));
// Retry
return makeApiRequest ( url , options );
}
return response ;
}
Workflows
Workflow auflisten
Rufen Sie alle Workflows ab:
GET /workflows
Response
JavaScript Beispiel
Python Beispiel
GET /api/v1/workflows
X-Api-Key : your-api-key-here
Workflow abrufen
Rufen Sie einen spezifischen Workflow ab:
GET /workflows/:id
Response
GET /api/v1/workflows/workflow_123
X-Api-Key : your-api-key-here
Workflow erstellen
Erstellen Sie einen neuen Workflow:
POST /workflows
JavaScript Beispiel
Python Beispiel
POST /api/v1/workflows
X-Api-Key : your-api-key-here
Content-Type : application/json
{
"name" : "New Workflow" ,
"nodes" : [
{
"id" : "node_1" ,
"type" : "webhook" ,
"name" : "Webhook" ,
"parameters" : {}
}
],
"connections" : {},
"settings" : {
"saveDataErrorExecution" : "all" ,
"saveDataSuccessExecution" : "all"
}
}
Workflow aktualisieren
Aktualisieren Sie einen bestehenden Workflow:
PUT /workflows/:id
JavaScript Beispiel
PUT /api/v1/workflows/workflow_123
X-Api-Key : your-api-key-here
Content-Type : application/json
{
"name" : "Updated Workflow Name" ,
"active" : true ,
"nodes" : [ ... ],
"connections" : { ... }
}
Workflow aktivieren/deaktivieren
Aktivieren oder deaktivieren Sie einen Workflow:
POST /workflows/:id/activate
POST /workflows/:id/deactivate
JavaScript Beispiel
POST /api/v1/workflows/workflow_123/activate
X-Api-Key : your-api-key-here
Workflow löschen
Löschen Sie einen Workflow:
DELETE /workflows/:id
JavaScript Beispiel
DELETE /api/v1/workflows/workflow_123
X-Api-Key : your-api-key-here
Executions
Executions auflisten
Rufen Sie alle Executions ab:
GET /executions
Response
JavaScript Beispiel
GET /api/v1/executions?workflowId=workflow_123&limit=50&status=success
X-Api-Key : your-api-key-here
Execution abrufen
Rufen Sie eine spezifische Execution mit Details ab:
GET /executions/:id
Response
GET /api/v1/executions/execution_789
X-Api-Key : your-api-key-here
Workflow manuell ausführen
Führen Sie einen Workflow manuell aus:
POST /workflows/:id/execute
JavaScript Beispiel
POST /api/v1/workflows/workflow_123/execute
X-Api-Key : your-api-key-here
Content-Type : application/json
{
"data" : {
"main" : [
[
{
"json" : {
"input" : "Test data"
}
}
]
]
}
}
Webhooks
Webhook-URL abrufen
Rufen Sie die Webhook-URL für einen Workflow ab:
GET /workflows/:id/webhook
Response
GET /api/v1/workflows/workflow_123/webhook
X-Api-Key : your-api-key-here
Webhook testen
Testen Sie einen Webhook:
cURL Beispiel
JavaScript Beispiel
curl -X POST "https://automate.localmind.ai/webhook/workflow_123/abc123" \
-H "Content-Type: application/json" \
-d '{
"test": "data"
}'
Error Handling
HTTP Status Codes
Die API verwendet standardmäßige HTTP Status Codes:
200 OK Anfrage erfolgreich
201 Created Ressource erfolgreich erstellt
400 Bad Request Ungültige Anfrage-Parameter
401 Unauthorized Authentifizierung fehlgeschlagen
403 Forbidden Keine Berechtigung für diese Ressource
404 Not Found Ressource nicht gefunden
429 Too Many Requests Rate Limit überschritten
500 Internal Server Error Server-Fehler
Alle Fehlerantworten folgen diesem Format:
Error Response
Error Handling Beispiel
Python Error Handling
{
"error" : {
"message" : "Workflow nicht gefunden" ,
"code" : "WORKFLOW_NOT_FOUND" ,
"statusCode" : 404 ,
"details" : {
"workflowId" : "workflow_123"
}
}
}
Retry-Logik
Implementieren Sie Retry-Logik für robuste API-Calls:
Retry-Logik
Python Retry-Logik
async function apiRequestWithRetry ( url , options , maxRetries = 3 ) {
for ( let attempt = 1 ; attempt <= maxRetries ; attempt ++ ) {
try {
const response = await fetch ( url , options );
if ( response . ok ) {
return await response . json ();
}
// Retry bei 5xx Fehlern
if ( response . status >= 500 && attempt < maxRetries ) {
const waitTime = Math . pow ( 2 , attempt ) * 1000 ; // Exponential backoff
await new Promise ( resolve => setTimeout ( resolve , waitTime ));
continue ;
}
throw new Error ( `HTTP ${ response . status } ` );
} catch ( error ) {
if ( attempt === maxRetries ) {
throw error ;
}
const waitTime = Math . pow ( 2 , attempt ) * 1000 ;
await new Promise ( resolve => setTimeout ( resolve , waitTime ));
}
}
}
API-Monitoring
Logging
Implementieren Sie Logging für API-Calls:
function logApiCall ( method , url , status , duration ) {
console . log ({
timestamp: new Date (). toISOString (),
method ,
url ,
status ,
duration: ` ${ duration } ms` ,
});
}
async function monitoredApiCall ( url , options ) {
const startTime = Date . now ();
try {
const response = await fetch ( url , options );
const duration = Date . now () - startTime ;
logApiCall ( options . method || 'GET' , url , response . status , duration );
return response ;
} catch ( error ) {
const duration = Date . now () - startTime ;
logApiCall ( options . method || 'GET' , url , 'ERROR' , duration );
throw error ;
}
}
Best Practices
API Keys sicher speichern Verwenden Sie Environment Variables oder einen Credential-Manager. Niemals in Code committen.
Rate Limits respektieren Implementieren Sie Rate Limit Handling und Exponential Backoff.
Error Handling Behandeln Sie alle möglichen Fehlerfälle und implementieren Sie Retry-Logik.
Logging Loggen Sie alle API-Calls für Debugging und Monitoring.
Timeouts setzen Setzen Sie angemessene Timeouts für API-Calls.
Pagination nutzen Verwenden Sie Pagination für große Datensätze.
Code-Beispiele
Vollständiges Beispiel: Workflow-Management
Vollständiges Beispiel
Python Vollständiges Beispiel
class AutomateApiClient {
constructor ( apiKey , baseUrl = 'https://automate.localmind.ai/api/v1' ) {
this . apiKey = apiKey ;
this . baseUrl = baseUrl ;
}
async request ( endpoint , options = {}) {
const url = ` ${ this . baseUrl }${ endpoint } ` ;
const headers = {
'X-Api-Key' : this . apiKey ,
'Content-Type' : 'application/json' ,
... options . headers ,
};
const response = await fetch ( url , {
... options ,
headers ,
});
if ( ! response . ok ) {
const error = await response . json ();
throw new Error ( error . error ?. message || `HTTP ${ response . status } ` );
}
return await response . json ();
}
async getWorkflows () {
return this . request ( '/workflows' );
}
async getWorkflow ( id ) {
return this . request ( `/workflows/ ${ id } ` );
}
async createWorkflow ( workflow ) {
return this . request ( '/workflows' , {
method: 'POST' ,
body: JSON . stringify ( workflow ),
});
}
async executeWorkflow ( id , data ) {
return this . request ( `/workflows/ ${ id } /execute` , {
method: 'POST' ,
body: JSON . stringify ({ data }),
});
}
}
// Verwendung
const client = new AutomateApiClient ( 'your-api-key' );
// Workflows abrufen
const workflows = await client . getWorkflows ();
console . log ( workflows . data );
// Workflow ausführen
const execution = await client . executeWorkflow ( 'workflow_123' , {
main: [[{ json: { input: 'Test' } }]],
});
console . log ( 'Execution ID:' , execution . data . id );
Sicherheitsrichtlinien
API Keys schützen
Niemals in Code committen
Verwenden Sie Environment Variables
Rotieren Sie Keys regelmäßig
HTTPS verwenden Verwenden Sie immer HTTPS für API-Calls. HTTP ist nicht erlaubt.
Least Privilege Erstellen Sie API Keys mit minimalen notwendigen Berechtigungen.
Input Validation Validieren Sie alle Inputs bevor Sie sie an die API senden.
Nächste Schritte
Settings & Konfiguration Erfahren Sie mehr über Automate-Einstellungen und Konfiguration.
Custom Nodes Erstellen Sie eigene Nodes für spezifische Anwendungsfälle.
Workflow Basics Lernen Sie die Grundlagen von Automate Workflows.
Debugging Debugging-Techniken für Workflows und API-Integrationen.
Brauchen Sie Hilfe? Unser API-Support-Team hilft Ihnen gerne bei der Integration. Kontaktieren Sie uns unter api-support@localmind.ai .