Skip to content

[TASK] Content Drive: endpoint to return workflow schemes for a list of content types #35471

Description

@zJaaal

Problem Statement

The chip-filter UI for "workflow" in content drive needs to know which workflow schemes are valid options given the user's currently-selected content types. The existing endpoint (GET /api/v1/workflow/schemes/schemescontenttypes/{contentTypeId}) only accepts a single content type ID. Calling it N times client-side is slow and creates ordering/race conditions in the UI.

Acceptance Criteria

  • New endpoint that accepts a list of content type identifiers (variable names or IDs) and returns the union of workflow schemes assigned to those content types.
  • Response shape: { schemes: WorkflowSchemeView[] } (a content type → schemes breakdown is not needed for the current UI; can be added later if required).
  • Schemes are deduplicated by scheme ID before being returned.
  • Empty input list returns { schemes: [] } (200 OK), not 400.
  • Unknown content type IDs are silently ignored (do not 404 the whole request).
  • Auth/permissions: same model as the existing single-content-type endpoint.

Implementation Pointers

  • Reuse WorkflowAPI.findSchemesForContentType(ContentType) per content type and combine results.
  • Deduplicate by scheme ID before returning.
  • The existing single-content-type endpoint stays for backward compatibility.

Discussion Point — Endpoint Shape

The recommended shape is a new POST /api/v1/workflow/schemes/schemescontenttypes with a JSON body: { "contentTypes": ["Blog", "News"] }. This matches the dotCMS multi-value convention used in DriveRequestForm and avoids touching the existing path-param endpoint.

Alternative: extend the existing endpoint to also accept a CSV path parameter or query param. Cheaper to ship but mixes two URL contracts on one path.

The implementer should confirm with the team before choosing. The default recommendation is the new POST.

Tests

  • Unit: WorkflowResourceTest covering empty input, single content type, multiple content types with overlapping schemes, multiple content types with disjoint schemes, unknown content type ID mixed with valid ones.
  • Integration: dotcms-integration covering permission denial.
  • Postman: new entry under the workflow collection.

Out of Scope

  • Filtering by archived schemes, languages, or workflow actions.
  • Returning workflow steps (steps come from a separate API; this endpoint only returns schemes).
  • Per-content-type breakdown of which scheme came from which type.

Activity

  1. added theissue type on Apr 27, 2026
  2. changed the title [-]feat(workflow): endpoint to return workflow schemes for a list of content types[/-] [+][TASK] Content Drive: endpoint to return workflow schemes for a list of content types[/+] on Apr 27, 2026
  3. moved this from New to Next Sprint in dotCMS - Product Planningon Apr 27, 2026
  4. self-assigned this
    on May 15, 2026
  5. moved this from Next Sprint to In Progress in dotCMS - Product Planningon May 15, 2026
  6. github-actions commented on May 16, 2026

    @github-actions
    Contributor
  7. moved this from In Progress to QA in dotCMS - Product Planningon May 20, 2026
  8. removed their assignment
    on May 20, 2026
  9. moved this from QA to In Review in dotCMS - Product Planningon May 20, 2026
  10. 14 remaining items

  11. moved this from In Review to QA in dotCMS - Product Planningon Jun 3, 2026
  12. added a commit that references this issue on Jun 4, 2026
  13. dario-daza commented on Jun 10, 2026

    @dario-daza
    Member

    QA PASSED

    QA-workflows-contenttype-list.mp4
  14. removed their assignment
    on Jun 10, 2026
  15. added 2 commits that reference this issue on Jun 16, 2026
    be30928
    47e2f53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions