Open madduck opened 1 month ago
This can be used in the meantime:
resp = await paperless.request_json(
"POST", "/api/acknowledge_tasks/", json=dict(tasks=[task.id])
)
I will think about that as I try to avoid endpoints for the Paperless frontend. Could you describe your use-case a little?
I mass-import files, and when an automatic import has been successful, I want to acknowledge the task automatically.
It's okay though to use the generic request_json
function for this if you don't want to abstract the functionality…
PNGX has an undocumented API endpoint to acknowledge tasks:
/api/acknowledge_tasks/
. It takes a POSTed listtasks
with the IDs (not UUIDs) ofTask
objects, e.g.:Since it allows for bulk acknowledgement, something like this would be good:
It would be great to also have this exposed as a method of the
Task
class/model for single-task acknowledgement, enabling e.g.: