[PR #23012] feat: add output structure in parameters api #30122

Open
opened 2026-02-21 20:46:53 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/23012

State: open
Merged: No


Resolves https://github.com/langgenius/dify/issues/23011

When integrating a Dify workflow into an external system — such as a batch scheduler that periodically triggers workflows — it’s essential for that system to understand the workflow’s input and output structures. This information enables proper execution and result handling.

🌐 Current Integration Pattern

In typical scenarios, we want to provide only a Dify application URL to the external system. Using that URL, we can call Dify’s public web APIs to retrieve workflow information and trigger executions — all without requiring login credentials.

Currently, we’re able to obtain the user_input_form from the /parameters API, which gives us the structure of the workflow’s inputs.

️Problem
• The workflow’s output structure is not available via any unauthenticated API;
• This makes it impossible for an external system to anticipate the output format when invoking a workflow;
• Without login, there’s no way to programmatically retrieve this information, creating a significant limitation for integration use cases.

Suggested Solution

To address this issue, I propose either of the following:

  1. Extend the existing /parameters API to include the output structure of the workflow;
  2. Or, introduce a new unauthenticated API endpoint specifically for exposing output schema.

Here I go with the first one.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/23012 **State:** open **Merged:** No --- Resolves https://github.com/langgenius/dify/issues/23011 When integrating a Dify workflow into an external system — such as a batch scheduler that periodically triggers workflows — it’s essential for that system to understand the workflow’s input and output structures. This information enables proper execution and result handling. 🌐 Current Integration Pattern In typical scenarios, we want to provide only a Dify application URL to the external system. Using that URL, we can call Dify’s public web APIs to retrieve workflow information and trigger executions — all without requiring login credentials. Currently, we’re able to obtain the user_input_form from the /parameters API, which gives us the structure of the workflow’s inputs. ❗️Problem • The workflow’s output structure is not available via any unauthenticated API; • This makes it impossible for an external system to anticipate the output format when invoking a workflow; • Without login, there’s no way to programmatically retrieve this information, creating a significant limitation for integration use cases. ✅ Suggested Solution To address this issue, I propose either of the following: 1. Extend the existing /parameters API to include the output structure of the workflow; 2. Or, introduce a new unauthenticated API endpoint specifically for exposing output schema. Here I go with the first one. ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:46:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30122