Hello
I need to move some of our xml files to projeqtor, But we have a lot of files, so we want to do this via API. Is there any possibility to upload file to PQ with api, and link it to document?
Hello
You can simply use the "data import" functionality directly in the solution.
Import a document version and use "importfile" to indicate the path of your xml file.
Make sure you have permissions to the PHP server
A little reading here
I don't know if you understand me correctly. Lets say I create document in PQ manually, fill fields, and attach some files to it(pictures, database backups, etc.)
I wanna do the same, but using API
You cannot through API.
API only acceps data in JSON, without possibility to attach files.
You can do this through import, as Arkhanje explianed
Ok. Uploaded files have their own ID. Is it possible to link previously uploaded file to document by their ID?
No, files for document versions are not managed the same way as attachments.
So if we want multiple documents( in our case Test Cases) we can do that, but if we want to have any attachment to them, we need to do that manually, right?
yes
Is it still impossible to upload a file using API?
You say API only accepts JSON data, but one could encode the document using Base64 and send it in a regular JSON query.
It's not perfect, especially for big files, but this would help a lot.
Base64 encode/decode is a very simple way to store/send binary files as regular text.
Hi,
API is not adapted to this.
We could possibly add this feature is someone agrees to sponsor it.
Don't hesitate to request a quotation if you are interested.
Hello Babynus,
Can you send me a quote by private message or using my profile's email address?
We will chanllenge it with some other solutions we have in mind (doing it ourselves, or upload to a Nextcloud folder then store the link in the ticket).
Kindly regards,
Sylvain