Apps API

Uploads the droplet for an App

PUT /v2/apps/:guid/droplet/upload

Defines and uploads a previously staged droplet that this application will run, using a multipart PUT request. The uploaded file should be a gzipped tar file.

Request

Route

PUT /v2/apps/a9c16d56-26dd-406e-9f42-caa42915d316/droplet/upload

Body

Name Description Default Valid Values Example Values
droplet A tgz droplet file.

cURL

curl "https://api.[your-domain.com]/v2/apps/a9c16d56-26dd-406e-9f42-caa42915d316/droplet/upload" \
	-F droplet=@"/path/to/droplet.tgz" \
	-X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzOSIsImVtYWlsIjoiZW1haWwtMzAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDR9.z0fBFq-vMeKTNiBlKtRCZ49OV-V_lTQYYdBvRw_eR1c"
        

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "88890ca1-7500-4344-bbba-794938f6f702",
    "created_at": "2016-10-03T18:26:21Z",
    "url": "/v2/jobs/88890ca1-7500-4344-bbba-794938f6f702"
  },
  "entity": {
    "guid": "88890ca1-7500-4344-bbba-794938f6f702",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: db83725b-6077-4c8d-bff6-ed447b363655
Content-Length: 270