Commit Multipart File Upload
/essbase/rest/v1/files/upload-commit/{path}
Commit the upload of one or more parts from a multipart file upload. Include the part number and corresponding ETag (entity tag) value for each part.
Request
- application/json
- application/xml
-
path(required): string
Pattern:
.+
Catalog path of the folder to which you want to upload the file.
-
uploadId: string
Upload ID of partial file upload initiation.
Request body for committing a partial file upload. Must include an array of all part numbers and corresponding Etags (entity tags). Example: {"1":"9ac601f6-cc23-437a-9a55-93d581a150e1","2":"9ac601f6-cc23-437a-9a55-93d581a151e1"}
Response
- application/json
- application/xml
200 Response
OK
Returns ETag for the file.
400 Response
Bad Request
Error occurred while merging all the parts.
500 Response
Internal Server Error.
Examples
The following example shows how to commit the upload of a part from a multi-part file upload to the Essbase catalog. As input, path parameters require the destination catalog path. Query parameters require an upload ID, and an array of part number/etag pairs.
This operation is the third step in the multi-part file upload process. The flow of operations is as follows:
-
Create Multipart File Upload
-
Upload File Part
-
Commit Multipart File Upload (shown in this example)
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-commit/users/admin/datafile.txt?uploadId=8399f4a4-6e8f-42d7-b454-b7c0ef8f56f6" -H "Accept:application/json" -H "Content-Type:application/json" -d '{"1":"c7bb3d4f4589824cea53d27fabfc044","2":"fa5873784f4df9e5e623e8b716bf2ac7"}' -u %User%:%Password%
Example of Response Body
{
"etag" : "e9b5315b4a9fcc99fa6023e0a7bb2f64"
}