CLI Reference Guide

l Use the merge option as described under Parameters.
Note: You can use the merge option with the view parameter to update only the view
properties for which you specify values in the request body.
Note: Collection specific behavior
When a merge option is specified on a collection, for example _property_values_action_
=merge, all collection items specified in the PUT request body are updated. Any other
collection items are left untouched.
For the property attribute of an artifact, the items of this collection attribute are matched by
name. For all other attributes, the collection items are matched by id.
Examples
The following examples demonstrate how to update an artifact.
This example shows how to change the finalize flag of a component using the view parameter.
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/90e72e4f3af5c989013afb471ebc0264?userIde
ntifier=&scope=view&view=componentfinalize
The following XML was sent in the request body:
<ServiceComponent>
<id>90e72e4f3af5c989013afb471ebc0264</id>
<toFinalize>false</toFinalize>
</ServiceComponent>
This example shows changing the display name of a resource provider. This example does not use
the view parameters. To use this approach, retrieve the artifact using GET artifact API, modify the
necessary value (in this example - displayName), and use that as the body of the PUT request to
update the artifact.
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/90e72e4f3b00a69e013b0c049ab00033?userIde
ntifier=<user_id>
The following XML was sent in the request body:
<ResourceProvider>
<id>90e72e4f3b00a69e013b0c049ab00033</id>
<objectId>90e72e4f3b00a69e013b0c049ab00033</objectId>
<createdOn>2012-11-16T17:38:46.576-08:00</createdOn>
<updatedOn>2012-11-16T17:38:46.576-08:00</updatedOn>
<createdBy>
<id>90d96588360da0c701360da0f1d5f483</id>
...
</createdBy>
HP Cloud Service Automation (4.00) Page 16 of 141
APIReference
Contents