Skip to content

[REQUEST] Add API key authentication support to GET /api/workflows list endpoint for programmatic discovery #1335

@Lutherwaves

Description

@Lutherwaves

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

  1. Session-based authentication: Storing SimStudio credentials and creating sessions programmatically, but this is complex, fragile, and requires storing sensitive login credentials
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions