Update a blueprint

This command updates a blueprint from the supplied JSON string. The JSON string must include the contents of the blueprint in the "document" attribute.

Request

PUT http://{hostname}:{port}
  /landscaper/rest/blueprint/{blueprintId}
Accept: application/json
Content-Type: application/json
Table 1. URL parameters
Parameter Type Required Description
blueprintId string true Name or ID of the blueprint
Table 2. Header parameters
Parameter Type Required Description
Content-Type application/json true  
Accept application/json true  
Location string false The full location of the blueprint, such as /landscaper/orion/file/jsmith_00000000_0000_0000_0000_000000000002-OrionContent/default/my_blueprint/my_blueprint.yml.
This command takes a JSON request string or file. Use the following template for the request:
{"document": "Blueprint contents"}

Example

curl -u jsmith:passwd 
   -H "Content-Type: application/json"
  http://myserver.example.com:8080/landscaper/rest/blueprint/MyBlueprint -X PUT 
  -d @updatedBlueprint.json

Example JSON request

{
    "document": "heat_template_version: 2013-05-23\n\ndescription: >\n  
My blueprint.\n\nparameters:\n  flavor:\n    type: string\n    
description: Flavor to be used for compute instance\n    
default: \"m1.small\"\n  key_name:\n    type: string\n    
description: Name of key-pair to be used for compute instance\n    
default: \"TODO\"\n\nresources:\n  ubuntu-precise:\n    
type: OS::Nova::Server\n    properties:\n      name: \"linux-os\"\n      
image: \"10974a7d-483b-438d-92e5-1d2b6afc799b\" # linux-os\n      
flavor: { get_param: flavor }\n      key_name: { get_param: key_name }
\n\n\noutputs:\n  blueprint_url:\n    description: Blueprint Origin URL\n    
value:  http://ucdp.example.com:8080/landscaper/view/projects
?open=MyBlueprint\n\n"
}

Example response

The response of this command is the source code of the blueprint in JSON format, similar to the code in the Source tab of the blueprint editor.

Feedback