Programmatically Creating New Tags #1146
-
Hello. I am very excited to be using Paperless as it seems like a very convenient system! However, I'm currently attempting to migrate our documents from our (now-unusable) NEAT system. I want to do this programmatically as I have all of the fields I need exported as a CSV and there are some 30,000+ documents. Just dumping them into the consumer is unfortunately not an option as the consumer can't extract a lot of this manually-input-over-years information. I have most of the details worked out for exporting old documents and importing them with names and dates and such with the REST API, however I need to be able to create tags programmatically. I've been looking through the documentation, and can't find any way to do this. It doesn't necessarily have to be through the REST API either. I have looked at the pre-consumption script, and custom parsers pages in the documentation and can't really tell if either of them are capable of what I need. TL;DR: Basically I just need some way to tell Paperless what documents get what tags (which likely aren't already created), and the name, date, etc. with a programming/scripting language. I am willing to be very flexible with any suggestions or ways this is possible. Thank you for any help you are willing to provide! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You can make a POST request to the endpoint /api/tags/. If you try to navigate to the url https://YOURPAPERLESS/api/tags/ you can inspect how the request to create a new tag works (at the end of the page). Example: |
Beta Was this translation helpful? Give feedback.
You can make a POST request to the endpoint /api/tags/.
If you try to navigate to the url https://YOURPAPERLESS/api/tags/ you can inspect how the request to create a new tag works (at the end of the page).
Example:
{ "name": "testTag", "colour": null, "match": "", "matching_algorithm": null, "is_insensitive": false, "is_inbox_tag": false }