Repository navigation
Replies: 5 comments 3 replies
|
Yes. Paperless-AI already exposes the same reset operation used by its History UI: curl -X POST 'https://paperless-ai.example/api/reset-documents' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{"ids":[123]}'This deletes only Paperless-AI's processing record for document curl -X POST 'https://paperless-ai.example/api/scan/now' \
-H 'X-API-Key: YOUR_API_KEY'For all documents, the corresponding endpoint is Sources: https://github.com/clusterzx/paperless-ai/blob/main/routes/setup.js#L1354-L1455 and https://github.com/clusterzx/paperless-ai/blob/main/public/js/history.js#L262-L288 |
|
Thank you @Kxrma47 for your response. I am using the Paperless-ngx Workflow feature, specifically the webhook option. In which case it requires a webhook URL. I am able to successfully access: http://mypaperlessurl.com:port/api/webhook/document And I can pass the header url and parameter {doc_url} successfully along with my x-api-key. However when I try to pass either of these URLs they report a 404 not found: http://mypaperlessurl.com:port/api/webhook/reset-documents or /reset-document or /scan/now I've also tried using header id and parameter {doc_id} Am not sure how to use curl commands from within the Paperless-ngx docker container within a workflow. Are there any links that might explain how to do that? I'm just trying to setup a simple workflow. Trigger: doc tag as ai-force |
|
@miles267 Sorry—I gave
Then add a second webhook action to Important correction to my earlier answer: resetting the ID removes only Paperless-AI's processing record. It does not clear Paperless-ngx tags/correspondent. If you want those cleared, add a Paperless-ngx Removal workflow action before the webhook; consider removing Sources: https://github.com/clusterzx/paperless-ai/blob/main/routes/setup.js#L1354-L1493 · https://docs.paperless-ngx.com/usage/#workflow-actions |
|
Thank you again. I’m still working through it. Can you please confirm whether the URL convention is: http//paperless_server:port/api/webhook when passing webhook workflows from paperless-ngx? I get 404 not found errors which seems to indicate the url convention is incorrect. |
|
Thank you SO much @Kxrma47. You've taught me so much about this powerful feature. With your detail support, I was able to do as I had hoped: 1.) manually tag any document(s) with an ai-force tag; Considering how much research I had done in web forums, reddit, etc. about similar issues I was experiencing (none of which seemed to reach resolution), I do hope others will find this thread useful. Overall there is a considerable knowledge gap in how to use this workflow integration between paperless-ngx and paperless-ai. Thanks again for your detail and patience. |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi - I currently have Paperless-ngx operating effectively to process all of my documents and tagging them automatically. Upon completion, it assigns them an ai-processed tag. While I do periodically go in and use the Manual option to reset a specific document, the performance of this UI is rather slow.
Is there a webhook option available to reset a document? In other words a webhook command or URL that can be used that will effectively reset all document entries in the db for a document (more quickly than the Manual UI option)? This would then enable to me to create a workflow where I could then assign an ai-force tag that would trigger Paperless-ai to reprocess that document immediately.
I can currently use a webhook pointed to my paperless-ai instance to update tag info but not trigger a document manual reset so that it can be reprocessed also. The URL I use in my webhook is: https://mypaperless-ai.instance.com/api/documents/?format=json
This is closest mention I could find however it's not the solution I was seeking:
#313
Thanks in advance.
All reactions