Upload document API

Anything concerning integration via the REST API
Post Reply
bmc
Posts: 1
Joined: Sat Apr 11, 2020 10:36 am

Upload document API

Post by bmc »

Hello,

I am trying to upload a document via REST API and after that, I am creating the metadata and tag for that document.
The problem is that I do 3 post calls one after another, and although I get the document ID after the first post (document upload), the document is not present in mayan yet because that is an async task that didn't complete yet, so the next 2 posts are failing. To solve this, I added a sleep(3) after each post and it works perfectly. But it is not stable if I try to upload a bunch of documents at the same time.
Is there any way to upload a document passing all the info (metadata and tag) in one call, just like the interactive upload does?

Post Reply