Home
Version 3
Apps API

Apps API

Restage an App

POST /v2/apps/:guid/restage

Request

Route

POST /v2/apps/f5e41a2c-1bec-409a-b8d9-a75c7a03bb2d/restage

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/f5e41a2c-1bec-409a-b8d9-a75c7a03bb2d/restage" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MiIsImVtYWlsIjoiZW1haWwtMTg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5Mzh9.AR2bj3IrsPH8RxIMd3CYSwSpZ5Jvs6d3JZGPeZcyrio" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f5e41a2c-1bec-409a-b8d9-a75c7a03bb2d",
    "url": "/v2/apps/f5e41a2c-1bec-409a-b8d9-a75c7a03bb2d",
    "created_at": "2015-10-07T00:35:38Z",
    "updated_at": "2015-10-07T00:35:38Z"
  },
  "entity": {
    "name": "name-1975",
    "production": false,
    "space_guid": "66387dc4-5955-4ce2-af21-d40bf8c4d643",
    "stack_guid": "87eb86c9-f73c-4c17-a090-55a4fa63eabe",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STARTED",
    "version": "a570554a-6483-47ba-8427-0b71cbede6c2",
    "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-07T00:35:38Z",
    "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/f5e41a2c-1bec-409a-b8d9-a75c7a03bb2d
X-VCAP-Request-ID: 970a2192-e5ee-4f3b-9f35-a0627f42ee2f
Content-Length: 1139
X-Content-Type-Options: nosniff