Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-1cbf87fe-e33b-4e3a-b846-b930fe3ffae8/packages?source_package_guid=guid-a3d3a9c6-e54d-4c0e-ab0e-47491cfb7f9f

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-a3d3a9c6-e54d-4c0e-ab0e-47491cfb7f9f

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MSIsImVtYWlsIjoiZW1haWwtMjY4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NDh9.cApnSTU0yBIUzyIwoTMr-R_ptUKFi_INAj4vIV72Tok
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-1cbf87fe-e33b-4e3a-b846-b930fe3ffae8/packages?source_package_guid=guid-a3d3a9c6-e54d-4c0e-ab0e-47491cfb7f9f" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MSIsImVtYWlsIjoiZW1haWwtMjY4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NDh9.cApnSTU0yBIUzyIwoTMr-R_ptUKFi_INAj4vIV72Tok" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "04c6669c-ebd9-4ec3-af5f-ff57c7c2ae91",
  "type": "url",
  "hash": {
    "type": "sha1",
    "value": null
  },
  "url": "http://awesome-sauce.com",
  "state": "READY",
  "error": null,
  "created_at": "2015-09-11T18:39:08Z",
  "updated_at": null,
  "_links": {
    "self": {
      "href": "/v3/packages/04c6669c-ebd9-4ec3-af5f-ff57c7c2ae91"
    },
    "app": {
      "href": "/v3/apps/guid-1cbf87fe-e33b-4e3a-b846-b930fe3ffae8"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b39e18cd-974e-4c49-b6b9-62d75984f47e
Content-Length: 452
X-Content-Type-Options: nosniff