Replies: 3 comments 3 replies
-
Hi @es335ab! I'm Dosu and I’m helping the dify team. This looks like an indexing/background task issue rather than a UI cache problem. The update-by-file endpoint should update the document’s content and “Last Updated” timestamp after the async indexing task completes. If the status stays at “waiting”/“queuing” for hours and the content/timestamp don’t change, it usually means the background indexing worker (Celery) is stalled, unavailable, or a recent backend change introduced a regression. There’s no persistent cache at the API/UI layer for document metadata—updates should be immediate once indexing finishes, unless there’s a backend failure or async task isn’t running as expected (source). There’s no user-facing “force re-index” or “refresh cache” button. Re-indexing is triggered by state changes (like enabling, disabling, archiving, or unarchiving a document), or by retrying failed/paused documents, but these are handled internally and not exposed as public endpoints (source). A recent batch status update API allows you to enable/disable/archive/unarchive documents, which may trigger re-indexing if the document is in the right state (source). Pause/resume operations were also recently added (source). If the document is stuck in “waiting”/“queuing” for a long time, check that your background worker is running and healthy. If you have access, try toggling the document’s status (enable/disable/archive/unarchive) via the batch status API to see if it triggers re-indexing. If that doesn’t work, deleting and recreating the document is a known workaround, but ideally shouldn’t be necessary (source). If you’re running self-hosted, make sure your Celery worker is up and processing tasks. If you’re on a managed instance, this may be a backend bug or infrastructure issue—recent changes to indexing logic could be related (source). If you can, check the logs for errors in the indexing task. Let me know if you need help checking document status or want more details on using the batch status API. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Thank you, @dosu! |
Beta Was this translation helpful? Give feedback.
-
@dosu The API responses all appear normal. Thanks again for your help! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Yes, I'm experiencing an issue when updating a knowledge document in Dify via the API.
I'm using the
update-by-file
endpoint to upload a new CSV to an existingDOCUMENT_ID
. The API responds successfully and the new file appears in the Dify dashboard with the correct file name and size. However, the document's "Last Updated" timestamp in the UI does not update, and the actual content also remains unchanged (still showing the previous version). This issue only recently started to occur; previously, the updates worked as expected.2. Additional context or comments
POST /v1/datasets/{DATASET_ID}/documents/{DOCUMENT_ID}/update-by-file
indexing_status
as"waiting"
anddisplay_status
as"queuing"
DOCUMENT_ID
the only workaround?Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions