POST/datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run

Run Datasource Node

Runs a single datasource node in the knowledge pipeline and streams its execution events.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 4 body fields
dataset_idstringrequired
Knowledge base ID, from [List Knowledge Bases](/en/api-reference/knowledge-bases/list-knowledge-bases). For a scoped key, [copy the ID from the Dify URL](/en/api-reference/guides/knowledge#knowledge-base-id).
node_idstringrequired
ID of the datasource node to run, from [List Datasource Plugins](/en/api-reference/knowledge-pipeline/list-datasource-plugins).
credential_idstringoptional
ID of the credential to authenticate with the datasource, from the `credentials` array of [List Datasource Plugins](/en/api-reference/knowledge-pipeline/list-datasource-plugins).
datasource_typestringrequired
Type of the datasource.
Allowed:online_documentlocal_filewebsite_crawlonline_drive
inputsobjectrequired
Input variables for the datasource node.
is_publishedbooleanrequired
Whether to run the published version of the node instead of the draft.

4 status codes
200Streaming response with node execution events.
400`invalid_param` : The knowledge base has no processing pipeline configured, or the request body failed validation.

One documented failure

  • invalid_param

    Pipeline not found

    invalid_param

403- `forbidden` : API access is not enabled for this knowledge base. - `forbidden` : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them.

One documented failure

  • forbidden

    Dataset api access is not enabled.

    forbidden (api access)

404`not_found` : No knowledge base matches `dataset_id`.

One documented failure

  • not_found

    Dataset not found.

    not_found

Error handling

A 400 is returned: invalid_param : The knowledge base has no processing pipeline configured, or the request body failed validation. A 403 is returned: - forbidden : API access is not enabled for this knowledge base.

  • forbidden : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them. A 404 is returned: not_found : No knowledge base matches dataset_id.