Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Updating an App

PATCH /v3/apps/:guid

Request

Route

PATCH /v3/apps/guid-d17e9ef9-56a9-4e52-a97a-0e4f4330f8b3

Parameters

Name Description Valid Values Example Values
name Name of the App
desired_droplet_guid GUID of the Droplet to be used for the App

Body

Name Description Default Valid Values Example Values
{
  "name": "new_name",
  "desired_droplet_guid": "guid-a2670b2d-2495-4538-9b3f-9318c1a6e710"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjN9.vHBME9psfA5iE00XV9FREDkQf_JvbBtSTvRklJ8CK6k
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-d17e9ef9-56a9-4e52-a97a-0e4f4330f8b3" -d '{
  "name": "new_name",
  "desired_droplet_guid": "guid-a2670b2d-2495-4538-9b3f-9318c1a6e710"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjN9.vHBME9psfA5iE00XV9FREDkQf_JvbBtSTvRklJ8CK6k" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-d17e9ef9-56a9-4e52-a97a-0e4f4330f8b3",
  "name": "new_name",
  "desired_state": "STOPPED",
  "_links": {
    "self": {
      "href": "/v3/apps/guid-d17e9ef9-56a9-4e52-a97a-0e4f4330f8b3"
    },
    "processes": {
      "href": "/v3/apps/guid-d17e9ef9-56a9-4e52-a97a-0e4f4330f8b3/processes"
    },
    "packages": {
      "href": "/v3/apps/guid-d17e9ef9-56a9-4e52-a97a-0e4f4330f8b3/packages"
    },
    "space": {
      "href": "/v2/spaces/819664ff-c1b1-4ee6-8760-ba410bf3a24e"
    },
    "desired_droplet": {
      "href": "/v3/droplets/guid-a2670b2d-2495-4538-9b3f-9318c1a6e710"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ff8491f1-7f8e-44f7-9ad9-6b5fe67cf17e
Content-Length: 608
X-Content-Type-Options: nosniff