get https://cgc-api.sbgenomics.com/v2/v2/upload/multipart//part/
/upload/multipart/{upload_id}/part/{part_number}
This call returns the signed URL required to upload a part of a multipart upload. Once you have obtained this URL for your file part, you can make a PUT
request to it with the file part as the request body.
https://cgc-api.sbgenomics.com/v2/upload/multipart/{upload_id}/part/{part_number}
Request
Example request
GET /v2/upload/multipart/ezCeGmsWvyLwLjDdw3WNXXfs0EK4GpcHXijP37fP7o1jbdh24IAFEF7New5wYyli/part/1 HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X GET "https://cgc-api.sbgenomics.com/v2/upload/multipart/ezCeGmsWvyLwLjDdw3WNXXfs0EK4GpcHXijP37fP7o1jbdh24IAFEF7New5wYyli/part/1"
Header Fields
Name | Description |
---|---|
X-SBG-Auth-Token required | Your CGC authentication token. |
Content-Type required | application/json |
Path parameters
Name | Description |
---|---|
upload_id | The ID for the upload, returned by the call to initialize a multipart upload. |
part_number | The number of the file part you are uploading. Part numbers start from 1. |
Response
See a list of CGC-specific response codes that may be contained in the body of the response.
Response body
The response object contains information about the URL to which you should upload the file part, The information is structured using the following key-value pairs.
Key | Data type | Description |
---|---|---|
method | String | The HTTP method to use when making the HTTP part upload request. |
url | String | The URL to which to make the HTTP part upload request. |
expires | Integer | The timestamp in Coordinated Universal Time (UTC) by when the HTTP part upload request should be made. Warning: this timestamp includes microseconds. If your programming environment prefers second-based UTC timestamp format (also known as UNIX time, POSIX time or epoch time), simply divide this number by 1000. |
headers | Object | A map of headers and values that should be set when making the HTTP part upload request. |
report | Object | See the Structure of the report object section below for an explanation of the report object. |
success_codes | Array of Integers | A list of status codes returned by the HTTP part upload request that should be recognized as success. A successful part upload request should be reported back to the API in a call to report an uploaded file part by passing the information collected from the report object. |
Structure of the report
object
report
objectThis object instructs you which pieces of information need to be collected from a successful response to the HTTP part upload request.
Key | Data type | Description |
---|---|---|
headers | Array of Strings | A list of HTTP headers whose values should be collected from a successful response to the HTTP part upload request. |
body | Object | Reserved for future use |
Example response body
{
"method": "PUT",
"url": "https://sbg-vs2-devel.s3.amazonaws.com/ac5a1030-7e27-3da4-b42b-39658b795d61%2BCanFam3.1.dna_rm.toplevel.fa.gz?uploadId=lMllZ7WIWqHsCMu9IKV4VytwZOy0.4ZKEPDD73Cw6J745a3xFXKZLHrqDi0kZt0jTm25PYJqNfEJDF9OaJ6Xvg8vLv9K7SJ.RLiCczfy6ieGCJzNQd78vmSK3a9Bkgx2&partNumber=1&AWSAccessKeyId=AKIAJF4ANIHPERCZA724Q&Expires=1459113561&Signature=3myj2S1960C31jkmjX24WApZwNo%3D",
"expires": "2016-02-27T15:55:38Z",
"headers": {},
"report": {
"success_codes": [
200
],
"headers": [
"ETag"
]
}
}