Upload File Part

put

/essbase/rest/v1/files/upload-part/{path}

Upload part of a file in a multipart file upload. You must have already initiated a multipart file upload. Provide the upload path, a part number (integer), and the unique upload ID that was returned from the Create Multipart File Upload operation.

Note: If multiple object parts are uploaded using the same upload ID and part number, the latest upload overwrites the previous.

Request

Supported Media Types
Path Parameters
  • Pattern: .+

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

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK

Returns a unique ETag (entity tag). Both the part number and corresponding ETag value for each part when commit the uploaded.

Body ()
Root Schema : UploadFilePartResponse
Type: object
Show Source
Nested Schema : Response
Type: object
Show Source

400 Response

Bad Request

If any issue while uploading parts, it returns error and all parts get clean.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to upload part of a file in a multi-part file upload. This example uploads two parts, using cURL to access the REST API from a Windows shell script. As input, path parameters require the destination catalog path. Query parameters require a part number and an upload ID. As a response, Essbase returns an etag for each part. You need to pass in the etag(s) with their corresponding part numbers when you commit the upload.

This operation is the second step in the multi-part file upload process. The flow of operations is as follows:

  1. Create Multipart File Upload

  2. Upload File Part (shown in this example)

  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 Commands

call properties.bat
curl -X PUT "https://myserver.example.com:9001/essbase/rest/v1/files/upload-part/users/admin/datafile.txt?partNum=1&uploadId=8399f4a4-6e8f-42d7-b454-b7c0ef8f56f6" -H Accept:application/json -H Content-Type:application/octet-stream -u %User%:%Password%
curl -X PUT "https://myserver.example.com:9001/essbase/rest/v1/files/upload-part/users/admin/datafile.txt?partNum=2&uploadId=8399f4a4-6e8f-42d7-b454-b7c0ef8f56f6" -H Accept:application/json -H Content-Type:application/octet-stream -u %User%:%Password%

Example of Response Bodies

Response 1

{
  "partNum" : 1,
  "response" : {
    "etag" : "c7bb3d4f4589824cea53d27fabfc044"
  }
}

Response 2

{
  "partNum" : 2,
  "response" : {
    "etag" : "fa5873784f4df9e5e623e8b716bf2ac7"
  }
}
Back to Top