#39993·dify

[Refactor/Chore] API Machinery: Migrate API endpoints to layered application services

Author: 41tairCreated Aug 4, 2026Updated Oct 2, 2026

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Description

Migrate Dify API endpoints toward layered application services, using #39822 as the initial reference implementation. The goal is to make API dependencies, business boundaries, database access, and side effects explicit while preserving existing behavior unless an API contract change is intentionally approved. This is an umbrella issue for the complete API Machinery migration. Individual controller/resource families can be claimed and implemented through separate PRs.

Motivation

No response

Additional Context

No response