Home
Version 3
Apps API

Apps API

Restage an App

POST /v2/apps/:guid/restage

Request

Route

POST /v2/apps/6cbb5f34-feb8-422d-9f1e-2aa54f3aaeb3/restage

Parameters

Name Description Valid Values Example Values
guid The guid of the App

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/6cbb5f34-feb8-422d-9f1e-2aa54f3aaeb3/restage" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMyIsImVtYWlsIjoiZW1haWwtMjA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTl9.OsV1qevOrlKmcbZQXzwTfreo3OVGAuuFi31bouoIVpc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6cbb5f34-feb8-422d-9f1e-2aa54f3aaeb3",
    "url": "/v2/apps/6cbb5f34-feb8-422d-9f1e-2aa54f3aaeb3",
    "created_at": "2015-10-15T23:52:39Z",
    "updated_at": "2015-10-15T23:52:39Z"
  },
  "entity": {
    "name": "name-2076",
    "production": false,
    "space_guid": "711a569b-fb31-40f6-ba8f-933a21bb5d75",
    "stack_guid": "e2139f04-5b5c-4a31-be51-7530c145e9bc",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STARTED",
    "version": "d9632458-dbe3-48d9-ad64-b9286d575277",
    "command": null,
    "console": false,
    "debug": null,
    "staging_task_id": null,
    "package_state": "PENDING",
    "health_check_type": "port",
    "health_check_timeout": null,
    "staging_failed_reason": null,
    "staging_failed_description": null,
    "diego": false,
    "docker_image": null,
    "package_updated_at": "2015-10-15T23:52:39Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/apps/6cbb5f34-feb8-422d-9f1e-2aa54f3aaeb3
X-VCAP-Request-ID: d279db32-b128-453a-a53a-98fe47f0a2f3
Content-Length: 1139
X-Content-Type-Options: nosniff