Data Upload

/api/repositories/{repository}/entities/upload
Parameter Type Purpose
repository string The name of the Repository to access

Post

POST /api/repositories/(string: repository)/entities/upload
POST /api/repositories/jupiter/entities/upload HTTP/1.1

The message body takes a file as input. The encoding should be set to enctype='multipart/form-data'.

Only one file can be uploaded at a time.

Response Code Reason
200 File uploaded to the server
400 Invalid data passed with request
500 Server error

A successful response contains the virtual path to the file that is uploaded.

If the server filesystem contains another file with the same name, the file will be renamed to an unique name.

This API should be used for uploading data from client file system before creating an Entity.

The files will be created under import directory in the repository environment location. A separate directory will be created for each user under _upload directory within import directory.

A sample response would be as follows:

{
    "path": "/vupload/sample.txt"
}

/vupload represents the directory import/_upload/{user} within the repository environment, where user is the username of the user uploading the data.

It is advisable to use traditional methods of uploading like ftp or sftp if you have to trasfer huge amount of data (over 200 MB). These uploads could be quite slow if you are using standalone Node server. If you are using integrated Node server, the data is transfered much faster.