Monitor your Streamline automation performance, sync status, and execution logs.
Track Git repository synchronization events and errors.
curl -H "X-API-Key: $FREDDY_API_KEY" \
"https://api.aitronos.com/api/v1/streamline/automations/sauto_abc123/sync-logs"import os
import requests
api_key = os.environ["FREDDY_API_KEY"]
automation_id = "sauto_abc123"
response = requests.get(
f"https://api.aitronos.com/api/v1/streamline/automations/{automation_id}/sync-logs",
headers={"X-API-Key": api_key}
)
logs = response.json()
print(f"Total logs: {logs['total']}")# View only errors
curl -H "X-API-Key: $FREDDY_API_KEY" \
"https://api.aitronos.com/api/v1/streamline/automations/sauto_abc123/sync-logs?status=error"# View only pull events
curl -H "X-API-Key: $FREDDY_API_KEY" \
"https://api.aitronos.com/api/v1/streamline/automations/sauto_abc123/sync-logs?event_type=pull"View sync logs across all automations in your organization.
curl -H "X-API-Key: $FREDDY_API_KEY" \
"https://api.aitronos.com/api/v1/streamline/organizations/org_xyz789/sync-logs"import os
import requests
api_key = os.environ["FREDDY_API_KEY"]
organization_id = "org_xyz789"
response = requests.get(
f"https://api.aitronos.com/api/v1/streamline/organizations/{organization_id}/sync-logs",
headers={"X-API-Key": api_key},
params={"status": "error", "limit": 50}
)
error_logs = response.json()
print(f"Found {len(error_logs)} errors across organization")Code synchronization from Git repository.
Success indicators:
- Code pulled and updated successfully
commit_shacontains the latest commit
Common errors:
REPO_NOT_FOUND- Repository deleted or inaccessibleAUTHENTICATION_FAILED- Invalid credentialsNETWORK_ERROR- Connectivity issues
GitHub webhook registration.
Success indicators:
- Webhook registered with GitHub
- Automation will receive push notifications
Common errors:
INVALID_CREDENTIALS- GitHub token invalidINSUFFICIENT_PERMISSIONS- Token lacks webhook permissions
GitHub webhook removal.
Success indicators:
- Webhook removed from GitHub
Common warnings:
- Webhook not found (already removed)
Repository/credentials validation.
Success indicators:
- Repository accessible
- Credentials valid
Common errors:
REPO_NOT_FOUND- Repository doesn't existINVALID_CREDENTIALS- Credentials expired
Periodic credential validation.
Success indicators:
- Credentials still valid
Common errors:
INVALID_CREDENTIALS- Credentials expired or revoked
| Type | Description | Trigger |
|---|---|---|
webhook | Automatic sync | GitHub push event |
manual | User-initiated | UI or API call |
scheduled | Periodic sync | Background job |
| Error Code | Description | Resolution |
|---|---|---|
REPO_NOT_FOUND | Repository deleted or inaccessible | Update repository URL or restore access |
INVALID_CREDENTIALS | GitHub credentials invalid/expired | Update credentials in automation settings |
AUTHENTICATION_FAILED | GitHub authentication failed | Verify token has required permissions |
RATE_LIMIT_EXCEEDED | GitHub API rate limit reached | Wait and retry, or upgrade GitHub plan |
NETWORK_ERROR | Network connectivity issue | Check network and retry |
WEBHOOK_REGISTRATION_FAILED | Failed to register webhook | Check repository permissions |
Monitor error logs regularly and set up alerts for critical failures:
import os
import requests
def check_automation_health(automation_id):
"""Check for recent errors in automation sync logs"""
api_key = os.environ["FREDDY_API_KEY"]
response = requests.get(
f"https://api.aitronos.com/api/v1/streamline/automations/{automation_id}/sync-logs",
headers={"X-API-Key": api_key},
params={"status": "error", "limit": 10}
)
logs = response.json()
error_count = logs.get("total", 0)
if error_count > 5:
send_alert(f"Automation {automation_id} has {error_count} errors")
return error_count
# Run periodically
check_automation_health("sauto_abc123")Monitor sync performance over time:
def analyze_sync_performance(automation_id):
"""Analyze sync duration trends"""
api_key = os.environ["FREDDY_API_KEY"]
response = requests.get(
f"https://api.aitronos.com/api/v1/streamline/automations/{automation_id}/sync-logs",
headers={"X-API-Key": api_key},
params={"limit": 100}
)
logs = response.json()["logs"]
durations = [log["duration_ms"] for log in logs if log.get("duration_ms")]
avg_duration = sum(durations) / len(durations) if durations else 0
max_duration = max(durations) if durations else 0
print(f"Average sync duration: {avg_duration:.2f}ms")
print(f"Max sync duration: {max_duration}ms")Ensure webhooks are properly registered:
def verify_webhook_status(automation_id):
"""Check webhook registration status"""
api_key = os.environ["FREDDY_API_KEY"]
response = requests.get(
f"https://api.aitronos.com/api/v1/streamline/automations/{automation_id}/sync-logs",
headers={"X-API-Key": api_key},
params={"event_type": "webhook_register", "limit": 1}
)
logs = response.json()["logs"]
if logs and logs[0]["status"] == "success":
print("Webhook is properly registered")
else:
print("Warning: Webhook registration may have failed")Key metrics to track:
- Success Rate: Percentage of successful syncs
- Error Rate: Percentage of failed syncs
- Average Duration: Mean sync duration
- Last Sync Time: Time since last successful sync
- Webhook Status: Active/inactive webhook state
If you see frequent errors:
- Check GitHub credentials are valid
- Verify repository still exists and is accessible
- Check GitHub API rate limits
- Review recent repository changes
If syncs are taking too long:
- Check repository size
- Review network connectivity
- Consider optimizing repository structure
- Check GitHub API status
If webhook events aren't triggering:
- Verify webhook is registered (check logs)
- Check GitHub webhook settings
- Verify repository permissions
- Test with manual sync
- Getting Started - Create your first automation
- Parameters - Configure automation parameters
- Scheduling - Schedule automations
- Best Practices - Follow recommended patterns
- Sync Logs API - API reference