Upload Bits for a Package of type bits
POST /v3/packages/:guid/upload
Request
Route
POST /v3/packages/guid-831eba07-ee61-4ee3-9d8a-0d35c677255e/upload
Parameters
Name |
Description |
Valid Values |
Example Values |
bits
|
A binary zip file containing the package bits
|
|
|
bits_name=application.zip&bits_path=%2Ftmp%2Fd20150831-23118-bb1rkz%2Fapplication.zip
Headers
cURL
curl "https://api.[your-domain.com]/v3/packages/guid-831eba07-ee61-4ee3-9d8a-0d35c677255e/upload" -d 'bits_name=application.zip&bits_path=%2Ftmp%2Fd20150831-23118-bb1rkz%2Fapplication.zip' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NSIsImVtYWlsIjoiZW1haWwtMTQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDR9.fj1iescg6t2gtFLJ2DfxvfprGuq8lII5vowN18np9vM" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"guid": "guid-831eba07-ee61-4ee3-9d8a-0d35c677255e",
"type": "bits",
"hash": {
"type": "sha1",
"value": null
},
"url": null,
"state": "PROCESSING_UPLOAD",
"error": null,
"created_at": "2015-08-31T21:50:04Z",
"updated_at": "2015-08-31T21:50:04Z",
"_links": {
"self": {
"href": "/v3/packages/guid-831eba07-ee61-4ee3-9d8a-0d35c677255e"
},
"upload": {
"href": "/v3/packages/guid-831eba07-ee61-4ee3-9d8a-0d35c677255e/upload",
"method": "POST"
},
"download": {
"href": "/v3/packages/guid-831eba07-ee61-4ee3-9d8a-0d35c677255e/download",
"method": "GET"
},
"stage": {
"href": "/v3/packages/guid-831eba07-ee61-4ee3-9d8a-0d35c677255e/droplets",
"method": "POST"
},
"app": {
"href": "/v3/apps/guid-0a5853bd-f01b-4457-9742-de006bfba36a"
}
}
}
Headers