Report an uploaded part

/upload/multipart/{upload_id}/part

This call allows you to report the upload of a file part.

https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/upload/multipart/{upload_id}/part

Request

Example request

POST /v2/upload/multipart/Yrand0mVyTZj2Vc2WwKAQtXUhBFZDzax20oaBf12mSixrrcm78sBzB8YGxUgQi1K/part HTTP/1.1
Host: api.sb.biodatacatalyst.nhlbi.nih.gov
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74

{
  "part_number": 1,
  "response": {
    "headers": {
      "ETag": "1234e128411f2bace2sadfdabe610f30"
    }
  }
}
curl --data '{"part_number": 1, "response": {"headers": {"ETag": "1234e128411f2bace2sadfdabe610f30"}}}' -s -H "X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74" -H "content-type: application/json" -X POST "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/upload/multipart/Yrand0mVyTZj2Vc2WwKAQtXUhBFZDzax20oaBf12mSixrrcm78sBzB8YGxUgQi1K/part"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your authentication token.
Content-Type
required
application/json

Path parameters

NameDescription
upload_idThe ID for the upload, returned by the call to initialize a multipart upload.

Request body

In the body of the request, you should enter a JSON object key-value pairs describing the report. The keys, and their permitted values, are described below.

KeyDatatype of valueDescription of value
part_numberIntegerThe number of the file part you are reporting. Part numbers start from 1.
responseObjectThis object should contain the information collected from a successful HTTP part upload request.
See the Formatting the response object section below for an explanation of its structure.

Formatting the response object

When reporting a part, the structure of the response object is different from that of the report object received when getting a part upload URL.

Assuming that you have collected the information from the HTTP part upload request, you should format the response object in this call as a set of key-value mappings. The keys in these mappings should be headers and other response elements described in Get upload URL for a file part, and their values should be strings that you have collected from the HTTP part upload request.

See the example below for an illustration of how to format a part report request.

KeyDatatype of valueDescription of value
headersObject of string keys to string valuesA map of header keys from the Get upload URL for a file part to their values returned by the successful HTTP part upload request you've made.
bodyObjectReserved for future use

Example request body

{
  "part_number": 1,
  "response": {
    "headers": {
      "ETag": "1234e128411f2bace2sadfdabe610f30"
    }
  }
}

Response

See a list of response codes that may be contained in the body of the response.

Example response body

HTTP/1.1 200 OK
Date: Tue, 29 Mar 2016 16:36:45 GMT
Content-Type: application/json
Connection: close