Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Attach file with AP...
 
Notifications
Clear all

Attach file with API

11 Posts
4 Users
0 Reactions
3,770 Views
Rafal
(@rafall92)
Posts: 10
Active Member
Topic starter
 
[#8322]

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?


 
Posted : 21 Jun 2022 10H31
(@marylene)
Posts: 592
Contributor Admin
 

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 


 
Posted : 21 Jun 2022 14H00
Rafal
(@rafall92)
Posts: 10
Active Member
Topic starter
 

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


 
Posted : 21 Jun 2022 14H28
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

You cannot through API.
API only acceps data in JSON, without possibility to attach files.

You can do this through import, as Arkhanje explianed


 
Posted : 22 Jun 2022 12H38
Rafal
(@rafall92)
Posts: 10
Active Member
Topic starter
 

Ok. Uploaded files have their own ID. Is it possible to link previously uploaded file to document by their ID?


 
Posted : 22 Jun 2022 12H42
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

No, files for document versions are not managed the same way as attachments.


 
Posted : 22 Jun 2022 14H28
Rafal
(@rafall92)
Posts: 10
Active Member
Topic starter
 

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?


 
Posted : 22 Jun 2022 14H49
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

yes


 
Posted : 23 Jun 2022 14H18
Sylvain Devidal
(@magicbuzz)
Posts: 38
Active Member
 

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.


 
Posted : 09 Dec 2025 16H16
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

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.


 
Posted : 13 Jan 2026 13H26
Sylvain Devidal
(@magicbuzz)
Posts: 38
Active Member
 

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


 
Posted : 14 Jan 2026 18H41
Share:

Scroll to Top