Resource Information

 

Response formatsjson
Response code 200
Requires authenticationAPI key header x-auth-token
HTTP MethodPOST

Parameters 

Name TypeDefault ValueDescription

name

required 

string-

file name

parent_id

required

string-

the ID of the folder in which you would like to upload your file

find more info on how to get parent_id here

resolve

optional

booleantrue

if there is an existing file with the same name, the new file will not be overwritten and will have an extension in its name (e.g.: the existing file - test.pgp and the new file - test(1).pgp )

if the value is false and the file with the same name already exists, you'll get an error: TypeError: Failed to fetch

file_size

optional

number-file sizes are measured in bytes (B)


Example Request URL

       https://api-test.quatrix.it/api/1.0/upload/link

 

Request Payload

{
  "name": "file_name",
  "parent_id": "b5774c2a-82c2-4853-ada7-efcad4fdf325",
  "resolve": true,
  "file_size": 0
}

Response Body

{
  "parent_id": "b5774c2a-82c2-4853-ada7-efcad4fdf325",
  "file_id": "30858a08-1016-4ef7-969c-173dcc836af3",
  "name": "file_name",
  "upload_key": "8d1f647e-be74-4f9a-969c-1dc5230d44cc"
}


Copy the upload key and use it for the next call: POST /upload/multipart/{upload_key} or POST /upload/chunked/{upload_key}

Please note that this call cannot be executed in Swagger and you can check the example in Postman below.

Request URL 

https://test-api.quatrix.it/upload/multipart/8d1f647e-be74-4f9a-969c-1dc5230d44cc (where 8d1f647e-be74-4f9a-969c-1dc5230d44cc is the upload key)

 

Once you enter the upload key, choose files and hit the Send button. 

 

The upload key is valid for 15 minutes and is invalidated once you make a POST /upload/multipart/{upload_key} call.