Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Updating an App

PATCH /v3/apps/:guid

Request

Route

PATCH /v3/apps/guid-bfb87a69-2ed8-4995-ae31-9618b4f31843

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-d7e01ed2-7253-41b0-8b86-b70d2b39c695"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNSIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.L9KlPuFOWROORnZalvod6-4M2Hp8iTb84GXtsvp_ckU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-bfb87a69-2ed8-4995-ae31-9618b4f31843" -d '{
  "name": "new_name",
  "desired_droplet_guid": "guid-d7e01ed2-7253-41b0-8b86-b70d2b39c695"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNSIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.L9KlPuFOWROORnZalvod6-4M2Hp8iTb84GXtsvp_ckU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-bfb87a69-2ed8-4995-ae31-9618b4f31843",
  "name": "new_name",
  "desired_state": "STOPPED",
  "_links": {
    "self": {
      "href": "/v3/apps/guid-bfb87a69-2ed8-4995-ae31-9618b4f31843"
    },
    "processes": {
      "href": "/v3/apps/guid-bfb87a69-2ed8-4995-ae31-9618b4f31843/processes"
    },
    "packages": {
      "href": "/v3/apps/guid-bfb87a69-2ed8-4995-ae31-9618b4f31843/packages"
    },
    "space": {
      "href": "/v2/spaces/a218be97-1280-4e19-badb-0c3e7e99d913"
    },
    "desired_droplet": {
      "href": "/v3/droplets/guid-d7e01ed2-7253-41b0-8b86-b70d2b39c695"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6c82b6c0-494d-4703-b3d7-15e8c6281294
Content-Length: 608
X-Content-Type-Options: nosniff