-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Is your feature request related to a problem? Please describe.
I think it makes a lot of sense to be able to programmatically discover and list workflows from SimStudio (per api key), but the /api/workflows endpoint only supports session-based authentication (cookies) for now. This makes it impossible to use SimStudio's API for automation, CI/CD pipelines, or third-party integrations that need to list workflows without maintaining browser sessions.
Describe the solution you'd like
Add support for API key authentication (X-API-Key header) to the /api/workflows endpoint, similar to how other SimStudio endpoints like /api/workflows/[id] and /api/workflows/[id]/execute already support API key authentication. This would allow programmatic access to workflow listings using the same authentication method that's already supported for individual workflow operations.
Describe alternatives you've considered
- Session-based authentication: Storing SimStudio credentials and creating sessions programmatically, but this is complex, fragile, and requires storing sensitive login credentials
- Individual workflow endpoints: Using
/api/workflows/[id]for known workflow IDs, but this requires knowing the IDs beforehand, which is what I am trying to avoid
Additional context
# This currently fails with 401 Unauthorized
curl -H "X-API-Key: sim_abc123..." http://localhost:3000/api/workflows
# But this works for individual workflows
curl -H "X-API-Key: sim_abc123..." http://localhost:3000/api/workflows/workflow-id/execute