Commit Multipart File Upload

post

/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

Supported Media Types
Path Parameters
  • Pattern: .+

    Catalog path of the folder to which you want to upload the file.

Query Parameters
Body ()

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"}

Root Schema : schema
Type: object
Additional Properties Allowed
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK

Returns ETag for the file.

Body ()
Root Schema : CommitFilePartUploadResponse
Type: object
Show Source

400 Response

Bad Request

Error occurred while merging all the parts.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to commit the upload of a part from a multi-part file upload. This example uses cURL to access the REST API from a Windows shell script. 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:

  1. Create Multipart File Upload

  2. Upload File Part

  3. 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.

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"
}
Back to Top