Create Multipart File Upload
/essbase/rest/v1/files/upload-create/{path}
Initialize a file upload in parts. This operation registers the file object and returns a unique upload ID, which must be included in any request related to this file-part upload.
Multipart file upload can improve performance of uploads by parallelizing them into threads. Multipart upload also protects against needing to restart large uploads in case of network failures.
This operation is the first step in the multi-part file upload process. The next steps are to upload the file parts, and then commit the upload.
See Also
Request
- application/json
- application/xml
-
path(required): string
Pattern:
.+
Catalog path of the folder to which you want to upload the file.
-
overwrite(required): boolean
Overwrite if file exists?
Default Value:false
-
append(required): boolean
Append to an existing file?
Default Value:false
Response
- application/json
- application/xml
200 Response
OK
File registered successfully. Returns unique ID.
400 Response
Bad Request
Logged in user may not have appropriate permissions, or the file may already exist.
500 Response
Internal Server Error.
Examples
The following example shows how to initiate a multi-part file upload to a user directory in the Essbase file catalog. As input, path parameters require the destination catalog path, including filename. As a response, Essbase returns an uploadId that you need to pass in when you upload and commit the file parts (or terminate the multi-part file upload process).
This operation is the first step in the multi-part file upload process. The flow of operations is as follows:
-
Create Multipart File Upload (shown in this example)
-
Upload File Part
-
Commit Multipart File Upload
At any point after the initialization step, you can terminate the process using Abort Multipart File Upload.
This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat
.
Script with cURL Command
call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/files/upload-create/users/admin/datafile.txt?overwrite=false?append=false" -H "Accept:application/json" -u %User%:%Password%
Example of Response Body
{
"uploadId" : "2695fc23-ca67-4e9a-a0a5-b1dbe370eb17"
}