Hi,
I try to test the batch import of files (Documents) using the REST API.
I read a previous post and the REST API page provided to try to find out how to import files.
So I think that I have to create Attachment and then Document objects.
I tried to create an attachment by using a POST request on URI https://myserver/api/v1/Attachment using the following JSON :
{
"size": 17620,
"name": "name.pdf",
"file": "<A lot of stuff coded in Base64 here >",
"deleted": 0,
"type": "application/pdf"
}
I get no Id of the attachment created (NULL return). There is a new row created in attachment table but there is no size, name, deleted or type provided (all these columns are NULL).
I am sure I miss something in the process.
Could you give me some infos about Attachment creation? Is there an API guide available?
Thanks for your help!
I try to test the batch import of files (Documents) using the REST API.
I read a previous post and the REST API page provided to try to find out how to import files.
So I think that I have to create Attachment and then Document objects.
I tried to create an attachment by using a POST request on URI https://myserver/api/v1/Attachment using the following JSON :
{
"size": 17620,
"name": "name.pdf",
"file": "<A lot of stuff coded in Base64 here >",
"deleted": 0,
"type": "application/pdf"
}
I get no Id of the attachment created (NULL return). There is a new row created in attachment table but there is no size, name, deleted or type provided (all these columns are NULL).
I am sure I miss something in the process.
Could you give me some infos about Attachment creation? Is there an API guide available?
Thanks for your help!
Comment