HP CloudSystem Enterprise Started Guide

HPCloud Service Automation
For the Windows ® and Linux operating systems
Software Version: 4.10
APIReference
Document Release Date: July 2014
Software Release Date: July 2014
Legal Notices
Warranty
The information contained herein is subject to change without notice.
Restricted Rights Legend
Confidential computer software. Valid l icensefrom HP r equired for possession, use or copying. Consistent wi th FAR 12.211and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for C ommercial Items are licensedto the U.S. Government under vendor's standard commercial license.
Copyright Notice
© Copyright 2010-2014 Hewlett-Packard Development Company, L.P.
Trademark Notices
Adobe™ is a trademark of Adobe Systems Incorporated.
Microsoft® and Windows® are U.S. registered trademarks of Microsoft Corporation.
Oracle and Java are registeredtrademarks of Oracle and/or its affiliates.
RED HAT READY™ Logoand RED HAT CERTIFIED PARTNER™ Logo are trademarks of R ed Hat, Inc.
This product includes an interfaceof the 'zlib' general purpose compressionl ibrary, w hich is Copyright © 1995-2002Jean-loup Gailly and Mark Adler.
Documentation Updates
The title pageof this document contains the following identifying information:
l Software Version number, which indicates the software version. l Document Release Date, which changes each time the document is updated. l Software Release Date, which indicates the release date of this version of the software.
To check for recent updates or toverify that you are using the most r ecent edition of a document, go to: http: //h20230.www2.hp.com/selfsolve/manuals
This si te requires thatyouregister for an H P Passport and sign in. To register for an HP Passport ID, go to: htt p://h20229.www2.hp.com/passport-registration.html
Or click the New users- please register l ink on the HP Passport l ogin page.
Youw ill also receive updated or new editions if yousubscribe to the appropriate product support service. Contact your HP sales r epresentative for details.
Support
Visit the HP Software Support Online web si te at: htt p://www.hp.com/go/hpsoftwaresupport
This w eb site provides contact information and details about the products, services, and support that HP Software offers.
HP Software onlinesupport provides customer self-solve capabilities. It provides a fast andefficient way to access interactive technical support tools needed to m anage your business. As avalued support customer, you can benefit by using the support web site to:
l Search for knowledge documents of i nterest l Submit andtrack support cases and enhancement requests l Download software patches l Manage support contracts l Look up HP support contacts l Review information about available services l Enter i ntodiscussions with other software customers l Research and register for software tr aining
Most of the support areas r equire that you register as an HP Passport user and sign in. Many also r equire a support contract. To register for anHP Passport ID, goto:
http://h20229.www2.hp.com/passport-registration.html
To find m ore informationabout access levels, go to:
http://h20230.www2.hp.com/new_access_levels.jsp
HP Sof tware Solutions Now accesses the HPSW Solution andIntegrationPortal W eb site. This site enables you to explore H P Product Solutions to meet your
business needs, includes a full list of Integrations between HP Products, as well as a listing of ITIL Processes. The URL for this W eb site is
http://h20230.www2.hp.com/sc/solutions/index.jsp
HP Cloud Service Automation (4.10) Page 2 of 150

Contents

Contents 3
HP CSA 4.x API Reference Introduction 8
Chapter 1: Artifact API 9
URIs 9
Artifact 9
Group 9
ResourceProvider 10
Service Offering 10
Artifact types 10
Create an artifact 11
View an artifact 12
Update an artifact 14
Delete an artifact 17
Retrieve a predefined view for an artifact 17
Retrieve resolved properties for an artifact 19
List active groups associated with an organization 22
Add groups to an organization 23
Update group display name, distinguished name 25
Delete or disassociate group from an organization 26
List resource providers 27
Add document to service offering 28
Delete document from service offering 30
Update document in service offering 31
Publish service offerings to catalog 31
Unpublish service offerings from catalog 33
Retrieve artifact state and status 35
Artifact views 36
Chapter 2: Availablevalues API 42
Chapter 3: Catalog API 44
HP Cloud Service Automation (4.10) Page 3 of 150
APIReference Contents
URIs 44
Catalog 44
Category 44
Offering 44
Request 45
Approval 45
Approval policy 46
Subscription 46
Resource Subscription 46
Instance 46
List catalogs 47
Get catalog details 49
Create catalog categories 50
Update catalog categories 52
Delete catalog category 53
List offerings in the catalog 54
Get offering details 55
List requests in the catalog 56
Deprecation Notice 56
Submit a request 58
Get request details 60
Cancel a request 63
Retire a request 63
List approvals in the catalog 64
Deprecation Notice 64
Get approval details 65
Update approval decision using an external approval system 65
Update approval decision using CSA approval process 66
Update catalog approval policies 68
Update service offerings approval policy 69
List subscriptions in the catalog 71
HP Cloud Service Automation (4.10) Page 4 of 150
APIReference Contents
Chapter 4: Export API 77
Chapter 5: Import API 79
Chapter 6: Importzip API 82
Deprecation Notice 71
Get subscription details 72
List instances in the catalog 74
Deprecation Notice 74
Get instance details 75
Retire an approval 75
Get resource subscription details 76
Deprecation Notice 82
Chapter 7: Import_result API 85
Chapter 8: Lifecycle engine API 87
Get details for a lifecycle execution record 87
Get latest lifecycle execution record for a service instance 89
Schedule lifecycle transition for service instance 89
Chapter 9: Login API 91
URIs 91
Get userIdentifier 91
Get userIdentifier for user name with slash 92
Chapter 10: Notification API 94
URIs 94
View list of notification objects 94
Send notification 96
Chapter 11: Organization API 99
URIs 99
View a list of organizations 100
View an organization 102
List organization's approval policies 105
Create approval policy 107
Update approval policy 110
HP Cloud Service Automation (4.10) Page 5 of 150
APIReference Contents
Chapter 12: orgInformation API 117
Chapter 13: Processinstances API 118
Delete approval policy 112
Retrieve organization LDAP access point information 113
List most requested, recently requested, or new offerings 114
URIs 118
Process Instance structure 118
Retrieve a process instance 119
Create a process instance 121
Update a process instance 122
Execute a process instance 125
Chapter 14: Search API 126
Chapter 15: User API 127
URIs 127
Request 127
Approval 127
Subscription 128
Instance 129
List service requests for subscription 129
List active requests for user 130
Get count of requests for user 132
Cancel multiple service requests 133
Delete multiple service requests 134
List approvals for approver 136
Get count of approvals for user 137
Delete multiple approval requests 137
List subscriptions for user 138
Get count of subscriptions for user 140
Get list of recent or expiring soon subscriptions for user 141
Delete multiple subscriptions 141
List instances for user 143
HP Cloud Service Automation (4.10) Page 6 of 150
APIReference Contents
Chapter 16: Utilization API 145
Chapter 17: Values for the detail parameter 147
Chapter 18: Values for the scope parameter 148
We appreciate your feedback! 149
HP Cloud Service Automation (4.10) Page 7 of 150

HP CSA 4.x API Reference Introduction

The APIs for HP Cloud Service Automation (CSA) use a REST interface. See http://en.wikipedia.org/wiki/Representational_state_transfer for general REST information. This documentation assumes that you know how to use REST interfaces.
See the HPCloud Service Automation API Quick Start for information on communication with CSA using RESTful calls.
Caution: This document includes information only on the RESTAPIs introduced in CSA 3.x, and that are still available in CSA 4.x. Information on RESTAPIs introduced in CSA 4.x can be found in the HP Cloud Service Automation API Quick Start.
The base URL for a CSA REST API is https://<host:port>/csa/rest, which is appended with the specific URI for the API call. For example, to access the <example> API, you would use the URL: https://<host:port>/csa/rest/<example>.
Because XML content passed into or returned by CSA REST API calls can be lengthy, example XML content presented in this document will often be abbreviated to include just the more pertinent XML content.
Note: Special or localized characters used in the URL of REST API calls must be encoded before they are sent to the server.
Tip: You should only include one value for a Boolean property and the value must be either true or false.
HP Cloud Service Automation (4.10) Page 8 of 150

Chapter 1: Artifact API

Description
Use this API to view, create, and modify CSA artifacts.
Base URL
https://<host>:<port>/csa/rest

URIs

The following URIs are appended to the base URL:
Artifact
URI Method Parameters Description
/artifact POST userIdentifier "Create an artifact" on page 11
/artifact/<artifact_id> GET userIdentifier,
scope, detail, view
/artifact/<artifact_id> PUT userIdentifier,
scope, view
/artifact/<artifact_id> DELETE userIdentifier "Delete an artifact" on page 17
/artifact/fastview/<artifact_ id>
/artifact/<artifact_ id>/resolveProperties
GET userIdentifier,view "Retrieve a predefined view for
GET userIdentifier,
propertyName
"View an artifact" on page 12
"Update an artifact" on page 14
an artifact" on page 17
"Retrieve resolved properties for an artifact" on page 19
Group
URI Method Parameters Description
/artifact/<organization_ id>/group
/artifact/<organization_ id>/group
GET userIdentifier "List active groups associated with
an organization" on page 22
POST userIdentifier "Add groups to an organization" on
page 23
HP Cloud Service Automation (4.10) Page 9 of 150
APIReference
URI Method Parameters Description
/artifact/<organization_ id>/group/<grou_id>
/artifact/<organization_ id>/group/<group_id>
PUT userIdentifier "Update group display name,
distinguished name" on page 25
DELETE userIdentifier "Delete or disassociate group from an
organization" on page 26
ResourceProvider
URI Method Parameters Description
/artifact GET userIdentifier, artifactType "List resource providers" on page 27
Service Offering
URI Method Parameters Description
/artifact/<service_offering_ id>/document
/artifact/<service_offering_ id>/document
POST userIdentifier "Add document to service
offering" on page 28
DELETE userIdentifier "Delete document from
service offering" on page 30
/artifact/<service_offering_ id>/document/<document_id>
/artifact/<catalog_id>/publish POST userIdentifier "Publish service offerings to
/artifact/<catalog_id>/unpublish POST userIdentifier "Unpublish service offerings
Note: You can view information about an artifact with GET /artifact/<artifact_id> or GET /artifact/fastview/<artifact_id>. The fastview API can traverse associations, while the standard artifact API only returns information for the artifact.
POST userIdentifier "Update document in service
offering" on page 31
catalog" on page 31
from catalog" on page 33

Artifact types

You can work with the following artifact types using the /artifact API. You can use them with the methods marked in the table.
Artifact type GET POST PUT DELETE
Approval process X
HP Cloud Service Automation (4.10) Page 10 of 150
APIReference
Artifact type GET POST PUT DELETE
Approval template X
Approver X
Catalog X X X X
Document X X X
Group X
Named approver approval template X
Organization X X X X
Person X
Resource binding X X
Resource environment X
Resource offering X X X
Resource pool X X X X
Resource provider X X X X
Resource subscription X X
Service component X X X X
Service blueprint X X X X
Service instance X X
Service offering X X X X
Service request X
Subscription X

Create an artifact

Details
URI
Method POST
HP Cloud Service Automation (4.10) Page 11 of 150
/artifact
APIReference
URI
Parameters
Returns 200 - Ok
/artifact
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception

View an artifact

Details
URI
Method GET
Parameters
/artifact/<artifact_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree|view]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned. If the value is vie,
then the view parameter is required.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147
Note: Some API calls do not support all possible values for this parameter.
detail=FULL, even as the default value, is not accepted for organization
artifacts because the volume of content returned can be excessively large. Specify detail=BASIC to avoid an exception message.
view=<view_type>
Required when value for scope is view; if this parameter is defined, then the value for scope is processed as if its value was view. The default is basicinfo. See
"Artifact views" on page 36 for a list of view types.
Returns 200 - Ok
401 - Not authorized 500 - Server exception
HP Cloud Service Automation (4.10) Page 12 of 150
APIReference
Examples
Use the following URL:
https://<host>:<port>/csa/rest/artifact/90e72e4f3b00a69e013b0bf7ed55002e?userIde ntifier=<user_id>
The following XML was returned in the response:
<ResourceEnvironment>
<id>90e72e4f3b00a69e013b0bf7ed55002e</id> <objectId>90e72e4f3b00a69e013b0bf7ed55002e</objectId> <createdOn>2012-11-16T17:24:55.765-08:00</createdOn> <updatedOn>2012-11-16T17:24:55.765-08:00</updatedOn> <createdBy>
<id>90d96588360da0c701360da0f1d5f483</id> <objectId>90d96588360da0c701360da0f1d5f483</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>admin</name> <displayName>admin</displayName>
<disabled>false</disabled> </createdBy> <updatedBy>
<id>90d96588360da0c701360da0f1d5f483</id>
<objectId>90d96588360da0c701360da0f1d5f483</objectId>
<isCriticalSystemObject>true</isCriticalSystemObject>
<name>admin</name>
<displayName>admin</displayName>
<disabled>false</disabled> </updatedBy> <isCriticalSystemObject>false</isCriticalSystemObject> <description>TestEnv</description> <name>TestEnv_November 17, 2012 1:24:55 AM UTC</name> <displayName>TestEnv</displayName> <state>
<id>90d96588360da0c701360da0ef470038</id>
<objectId>90d96588360da0c701360da0ef470038</objectId>
<createdOn>2012-11-01T15:16:54.687-07:00</createdOn>
<isCriticalSystemObject>true</isCriticalSystemObject>
<description>Active</description>
<iconUrl>/csa/images/categories/artifact_state/active.png</iconUrl>
<name>ACTIVE</name>
<displayName>Active</displayName>
<disabled>false</disabled>
<categoryType>
<id>90d96588360da0c701360da0ef420037</id> <objectId>90d96588360da0c701360da0ef420037</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ARTIFACT_STATE</name>
HP Cloud Service Automation (4.10) Page 13 of 150
APIReference
<displayName>Artifact State</displayName> <extensible>false</extensible>
</categoryType> </state> <artifactType>
<id>90d96588360da0c701360da0eedb0020</id>
<objectId>90d96588360da0c701360da0eedb0020</objectId>
<createdOn>2012-11-01T15:16:57.787-07:00</createdOn>
<isCriticalSystemObject>true</isCriticalSystemObject>
<description>Resource Environment</description>
<iconUrl>
/csa/images/categories/artifact_type/resource_environment.png </iconUrl> <name>RESOURCE_ENVIRONMENT</name> <displayName>Resource Environment</displayName> <disabled>false</disabled> <categoryType> <id>90d96588360da0c701360da0eeb40017</id>
<objectId>90d96588360da0c701360da0eeb40017</objectId>
<isCriticalSystemObject>true</isCriticalSystemObject>
<name>ARTIFACT_TYPE</name>
<displayName>Artifact Type</displayName>
<extensible>false</extensible> </categoryType>
</artifactType> <disabled>false</disabled> <numberOfProvider>0</numberOfProvider> <numberOfServiceDesign>0</numberOfServiceDesign> <numberOfCatalog>0</numberOfCatalog>
</ResourceEnvironment>

Update an artifact

Details
URI /artifact/<artifact_id>
Method PUT
HP Cloud Service Automation (4.10) Page 14 of 150
APIReference
URI /artifact/<artifact_id>
Parameters
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
view=<view_type>&scope=view
Optional; Used to update artifacts based on pre-defined views. See "Artifact
views" on page 36 (description column) for a list of view types that support update
operation.
<_artifact_property>_action_=merge
Optional; use themerge option with the action meta tag query parameter to update only a portion of the artifact. The action meta tag can either be specified globally for the artifact by including parameter _action_=merge, or fora specificpropertye.g., _property_values_action_=merge.
Returns 200 - Ok
401 - Not authorized 404 - Not found 500 - Server exception
Note: To completely update the artifact, i.e., replace the persistent artifact, do notuse the view or merge parameters andinclude all artifact content in the request body. Note that if only a portion of the artifiact contentis sent in the request body, any unspecified content will be removed from the artifact.
To update a portion of the artifact:
l Use a pre-defined view that contains a subset of the artifact properties; only that subset of
properties will be updated per the values specified in the request body.See"Artifact views"
on page 36for a list of view types.
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.
HP Cloud Service Automation (4.10) Page 15 of 150
APIReference
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> <updatedBy>
<id>90d96588360da0c701360da0f1d5f483</id>
... </updatedBy> <isCriticalSystemObject>false</isCriticalSystemObject> <description>TestProvider</description> <name>TestProvider_November 17, 2012 1:38:46 AM UTC</name> <displayName>TestProviderModified</displayName> <state>
<id>90d96588360da0c701360da0ef470038</id>
... </state> <artifactType>
<id>90d96588360da0c701360da0eed8001f</id>
... </artifactType> <disabled>false</disabled> <accessPoint>
<id>90e72e4f3b00a69e013b0c049a740032</id>
HP Cloud Service Automation (4.10) Page 16 of 150
APIReference
... </accessPoint> <providerType>
<id>90d96588360da0c701360da0eeac0016</id>
... </providerType> <numberOfResourceOffering>0</numberOfResourceOffering> <numberOfEnvironment>0</numberOfEnvironment> <numberOfPools>0</numberOfPools>
</ResourceProvider>

Delete an artifact

Details
URI
Method DELETE
Parameters
Returns 200 - Ok
Deletion is subject to a set of business rules which depend on the type of artifact. The business rules for artifacts are explained in the table below. Note that consumption artifacts are not removed from the database when they are deleted; instead, the artifact is marked as retired. Please refer to the"Catalog API" on page 44 for retiring consumption artifacts.
Artifact type Details
Resource provider
Service design Can be deleted when all associated service offerings or service instances are
/artifact/<artifact_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 500 - Server exception
Can only be deleted if no active service subscriptions use the resource provider.
retired.

Retrieve a predefined view for an artifact

Because the REST API presented here returns content ina different format when retrieving a single result versus multiple results, and could thereby complicate your using the results, it is recommended that the "View an artifact" on page 12API be used. Performance intensive applications might stillchoose to use the following API.
HP Cloud Service Automation (4.10) Page 17 of 150
APIReference
Details
URI
Method GET
Parameters
Returns 200 - Ok
/artifact/fastview/<artifact_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
view=<view_type>
Required; see "Artifact views" on page 36 for a list of view types.
404 - Not found 500 - Server exception
Examples
The following URL was sent. Note that artifact_id is theID of any artifact that has an accesspoint.
https://<host>:port/csa/rest/artifact/fastview/90e72e4f3abe4bf4013ac24735730010? userIdentifier=<user_id>&view=accesspoint
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <resultView>
<resultMap>
<entry>
<key>accessPoint.uri</key>
<value xsi:type="xs:string">http://amz:443</value> </entry> <entry>
<key>accessPoint.password</key>
<value xsi:type="xs:string">amz</value> </entry> <entry>
<key>accessPoint.username</key>
<value xsi:type="xs:string">amz</value> </entry> <entry>
<key>accessPoint.category.name</key>
<value xsi:type="xs:string">URL</value> </entry>
</resultMap>
</resultView>
HP Cloud Service Automation (4.10) Page 18 of 150
APIReference
Filtering
You can filter the results by providing a value for a property in the URI. The query is then filtered based on that property. You can use the properties listed in "Artifact views" on page 36.
Note: The property name that is specified in the URL must have the period (.) character replaced with the underscore (_) character.
The following example shows the result when the previous example is filtered on a property name.
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/fastview/90e72e4f3b00a69e013b0c049ab0003 ?userIdentifier=<user_id>&view=propertyinfo&property_name=propBLN
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <resultView>
<resultMap>
<entry>
<key>property.values.value</key>
<value xsi:type="xs:string">true</value> </entry> <entry>
<key>property.consumerVisible</key>
<value xsi:type="xs:boolean">true</value> </entry> <entry>
<key>property.displayName</key>
<value xsi:type="xs:string">Boolean property</value> </entry> <entry>
<key>property.valueType.name</key>
<value xsi:type="xs:string">BOOLEAN</value> </entry> <entry>
<key>property.name</key>
<value xsi:type="xs:string">propBLN</value>
</entry>
</resultMap>
</resultView>

Retrieve resolved properties for an artifact

A propertycan have a source binding configuredthat indicates its value is to be retrieved from a property on another artifact. The REST API discussed here provides a mechanism toretrieve the value from the source property. As part of this retrieval, relevant tokens configured on properties are also resolved.
HP Cloud Service Automation (4.10) Page 19 of 150
APIReference
There are two approaches to retrieving resolved properties:
l Retrieve all properties l Retrieve a single named property
Details
URI
Method GET
Parameters
Returns 200 - Ok
/artifact/<artifact_id>/resolveProperties
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
propertyName=<property_name>
Optional; the name of the property you want to retrieve. Only retrieves the value
for the property specified.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
The following URL was used to retrieve all properties for an artifact:
https://<host>:<port>/csa/rest/artifact/<id>/resolveProperties?userIdentifier=<u ser_id>
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Properties>
<property> ... </property> <property> ... </property> <property>
<id>90d9651a3684c7f0013684cafda80005</id> <createdOn>2012-04-05T16:15:57.480-07:00</createdOn> <updatedOn>2012-04-05T16:15:57.497-07:00</updatedOn> <isCriticalSystemObject>false</isCriticalSystemObject> <name>PARENT_SVC_COMPONENT_ID</name> <artifact>
<id>90d9651a3684c7f0013684cafda80008</id> <isCriticalSystemObject>false</isCriticalSystemObject> <name>TEST_CHILD_COMPONENT</name>
<disabled>false</disabled> </artifact> <propertyBindings>
<id>90d9651a3684c7f0013684cb28820009</id>
HP Cloud Service Automation (4.10) Page 20 of 150
APIReference
</property> <property> ... </property> <property> ... </property>
</Properties>
<createdOn>2012-04-05T16:16:08.450-07:00</createdOn>
<updatedOn>2012-04-05T16:16:08.450-07:00</updatedOn>
<propertyBindingType>
<name>SOURCE</name> <categoryType>
<name>PROPERTY_BINDING_TYPE</name>
...
</categoryType>
... </propertyBindingType> <artifact>90d9651a3684c7f0013684c91f8c0004</artifact> <artifactPropertyName>SVC_COMPONENT_ID</artifactPropertyName>
</propertyBindings> <scope> ... </scope> <valueType> ... </valueType> <values>
<id>90d9651a3684c7f0013684c91f8b0002</id> <createdOn>2012-04-05T16:13:55.083-07:00</createdOn> <updatedOn>2012-04-05T16:13:55.083-07:00</updatedOn> <value>90d9651a3684c7f0013684c91f8c0004</value>
</values> <maxOccurs>0</maxOccurs> <minOccurs>0</minOccurs> <orderIndex>0</orderIndex> <confidential>false</confidential> <encrypted>false</encrypted> <consumerReadOnly>false</consumerReadOnly> <consumerVisible>false</consumerVisible>
The following URL was used to retrieve a single property:
https://<host>:<port>/csa/rest/artifact/<id>/resolveProperties? userIdentifier=<user_id>&propertyName=PARENT_SVC_COMPONENT_ID
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Properties>
<property>
<id>90d9651a3684c7f0013684cafda80005</id> <name>PARENT_SVC_COMPONENT_ID</name>
...
</property>
</Properties>
HP Cloud Service Automation (4.10) Page 21 of 150
APIReference

List active groups associated with an organization

Details
URI
Method GET
Parameters
Returns 200 - Ok
/artifact/<organization_id>/group
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/8a81818f3d02fb7e013d0308891d0003/group?u serIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <GroupList>
<count>1</count> <limit>1</limit> <group>
<id>8a81818f3d02fb7e013d030af854000f</id> <isCriticalSystemObject>false</isCriticalSystemObject> <name>sc_February 22, 2013 5:54:43 PM UTC</name> <displayName>ServiceConsumer1</displayName> <state>...</state> <artifactType>...</artifactType> <disabled>false</disabled> <distinguishedName>
cn=ServiceConsumer,ou=ConsumerGroup,ou=CSAGroups </distinguishedName> <role>
... </role>
</group>
</GroupList>
HP Cloud Service Automation (4.10) Page 22 of 150
APIReference

Add groups to an organization

Details
URI
/artifact/<organization_id>/group
Method POST
Parameters
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
Returns 200 - Ok
401 - Not authorized 404 - Object not found 500 - Server exception
Note that the role mustbe specifiedfor each group in the request body.Valid rolesare as follows. For Consumer type organizations:
l SERVICE_CONSUMER
For Provider type organizations:
l CONSUMER_SERVICE_ADMINISTRATOR l SERVICE_BUSINESS_MANAGER l SERVICE_DESIGNER l CSA_ADMIN l RESOURCE_SUPPLY_MANAGER l SERVICE_OPERATIONS_MANAGER
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/8a81818f3d1421e7013d1423635a0003/group?u serIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent:
<GroupList>
<group>
<displayName>My-Group-Name</displayName> <distinguishedName>
cn=TestConsumer,ou=ConsumerGroup,ou=CSAGroups </distinguishedName> <role>
<name>SERVICE_CONSUMER</name> </role>
</group>
HP Cloud Service Automation (4.10) Page 23 of 150
APIReference
<group>
<displayName>Another-Group-Name</displayName> <distinguishedName>
cn=TestConsumer2,ou=ConsumerGroup,ou=CSAGroups </distinguishedName> <role>
<name>SERVICE_CONSUMER</name> </role>
</group>
</GroupList>
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <GroupList>
<count>2</count> <limit>2</limit> <group>
<isCriticalSystemObject>false</isCriticalSystemObject> <name>My-Group-Name</name> <displayName>My-Group-Name</displayName> <disabled>false</disabled> <distinguishedName>
cn=TestConsumer,ou=ConsumerGroup,ou=CSAGroups </distinguishedName> <role>
<isCriticalSystemObject>false</isCriticalSystemObject>
<name>SERVICE_CONSUMER</name>
<disabled>false</disabled> </role>
</group> <group>
<isCriticalSystemObject>false</isCriticalSystemObject> <name>Another-Group-Name</name> <displayName>Another-Group-Name</displayName> <disabled>false</disabled> <distinguishedName>
cn=TestConsumer2,ou=ConsumerGroup,ou=CSAGroups </distinguishedName> <role>
<isCriticalSystemObject>false</isCriticalSystemObject>
<name>SERVICE_CONSUMER</name>
<disabled>false</disabled> </role>
</group>
</GroupList>
HP Cloud Service Automation (4.10) Page 24 of 150
APIReference

Update group display name, distinguished name

Use this/artifact URIto update the group display name and/or distinguised name for the specified organization.
Details
URI
Method PUT
Parameters
Returns 200 - Ok
/artifact/<organization_id>/group/<group_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/8a81818f3d02fb7e013d0308891d0003group/8a 81818f3d1437e2013d1795d41107ea?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent:
<GroupList>
<group>
<displayName>My-New-Group-Name</displayName> <distinguishedName>
cn=TestConsumer,ou=ConsumerGroup,ou=CSAGroups </distinguishedName>
</group>
</GroupList>
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Group>
<id>8a81818f3d1437e2013d1795d41107ea</id> <isCriticalSystemObject>false</isCriticalSystemObject> <name>sc_February 22, 2013 5:54:43 PM UTC</name> <displayName>My-New-Group-Name</displayName> <state>
<id>90d96588360da0c701360da0ef470038</id> <isCriticalSystemObject>false</isCriticalSystemObject> <name>ACTIVE</name>
HP Cloud Service Automation (4.10) Page 25 of 150
APIReference
<disabled>false</disabled>
</state> <artifactType>
<id>90d96588360da0c701360da0eeff002b</id> <isCriticalSystemObject>false</isCriticalSystemObject> <name>GROUP</name> <disabled>false</disabled>
</artifactType> <disabled>false</disabled> <distinguishedName>
cn=TestConsumer,ou=ConsumerGroup,ou=CSAGroups
</distinguishedName>
</Group>

Delete or disassociate group from an organization

Use this URI to delete a group or to disassociate it from an organization. If no organization is associated with this group, the group will be deleted. Otherwise, the group will be disassociated from the specified organization.
Details
URI
Method DELETE
Parameters
Returns 200 - Ok
/artifact/<organization_id>/group/<group_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/8a81818f3d1421e7013d1423635a0003/group/8 a81818f3d1437e2013d1795d41107ea?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was returned:
<messageList>
<messages>Removed role association for My-New-Group-Name</messages>
</messageList>
HP Cloud Service Automation (4.10) Page 26 of 150
APIReference

List resource providers

Details
URI
Method GET
Parameters
Returns 200 - Ok
/artifact
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
artifactType=RESOURCE_PROVIDER
Required; the only valid value is RESOURCE_PROVIDER. Basic view information is provided in the return content.
401 - Not authorized 500 - Server exception
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact?userIdentifier= 90d96588360da0c701360da0f1d5f483&artifactType=RESOURCE_PROVIDER
The following XML was returned in the response:
<ResourceProviderList>
<count>3</count> <limit>0</limit> <resourceProvider>
<id>90e72e583d4c6e77013d4c96b1ab0010</id> <objectId>90e72e583d4c6e77013d4c96b1ab0010</objectId> <isCriticalSystemObject>false</isCriticalSystemObject> <description>Sitescope A</description> <name>Sitescope_A_March 9, 2013 12:39:36 AM UTC</name> <displayName>Sitescope A</displayName> <disabled>false</disabled>
</resourceProvider> ...
</ResourceProviderList>
HP Cloud Service Automation (4.10) Page 27 of 150
APIReference

Add document to service offering

Details
URI
Method POST
Parameters
Returns 200 - Ok
/artifact/<service_offering_id>/document
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent with headers:
l Content-type: multipart/form-data l Content-Disposition: form-data; name="file" l Content-Type: application/octet-stream
https://<host>:<port>/csa/rest/artifact/90cef5de3c63429f013c68b8cdda0bad/documen t?userIdentifier=90cef5de3c63429f013c642c7fc708ab
To better demonstrate how to use this REST API URI, the following a python script attaches a text file to a service offering. The script was created based on HTML documentation. You can find information on html form content types at: http://www.w3.org/TR/html401/interact/forms.html#h-
17.13.4.2.
""" Sample python script that attaches a text file in the current directory to an ACTIVE CSA service offering on a local host, with default credentials. Script usage:
<scrip-name.py> <service offering uuid> <filename> <admin uuid>
The following example attaches file doc.txt to the service offering with id 90ce c0773c83a11a013c871e4c1a0503 using an admin user ID 90d96588360da0c701360da0f1d5f483 post-doc.py 90cec0773c83a11a013c871e4c1a0503 doc.txt 90d96588360da0c701360da0f1d 5f483 Tested with: ActivePython 3.2.2.3 """ from xml.dom.minidom import parse, parseString from http.client import HTTPSConnection from base64 import b64encode import mimetypes
HP Cloud Service Automation (4.10) Page 28 of 150
APIReference
import sys def get_content_type(filename):
return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
def get_file_contents(filename):
CRLF = '\r\n' f = open(filename, 'r') return CRLF.join(f.readlines())
def encode_multipart_formdata(filename):
BOUNDARY = '----------CSA_r0ck$_$' CRLF = '\r\n' L = [] L.append('--' + BOUNDARY) L.append('Content-Disposition: form-data; name="file"; filename="%s"' % file
name)
L.append('Content-Type: %s' % get_content_type(filename)) L.append('') L.append(get_file_contents(filename)) L.append('--' + BOUNDARY + '--') L.append('') body = CRLF.join(L) content_type = 'multipart/form-data; boundary=%s' % BOUNDARY return content_type, body
def addDocumentToOffering(offeringId, documentName, userId):
conn = HTTPSConnection("localhost:8444") userAndPass = b64encode(b"csaTransportUser:csaTransportUser").decode("asci
i")
post_url = "/csa/rest/artifact/" + offeringId + "/document?userIdentifier="+
userId
content_type, body = encode_multipart_formdata(documentName) content_length = str(len(body)) headers = {'Authorization' : 'Basic %s' % userAndPass,
'Content-Type' :'%s' % content_type, 'content-length' : str(len(b
ody)), 'Accept' : 'application/xml'}
conn.request('POST', post_url, body, headers=headers) res = conn.getresponse() data = res.read() print(data)
def main(offeringId, documentName, userId):
addDocumentToOffering(offeringId, documentName, userId)
if __name__ == "__main__":
offeringId = sys.argv[1] documentName = sys.argv[2] userId = sys.argv[3] main(offeringId, documentName, userId)
HP Cloud Service Automation (4.10) Page 29 of 150
APIReference

Delete document from service offering

Details
URI
Method DELETE
Parameters
Returns 200 - Ok
/artifact/<service_offering_id>/document/<document_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/90cef5de3c63429f013c68b8cdda0bad/documen t/90cef5de3c63429f013c68b8cdda0bad?userIdentifier=90cef5de3c63429f013c642c7fc708 ab
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Document>
<id>90cef5de3c63429f013c68d4146a0bce</id> <isCriticalSystemObject> false </isCriticalSystemObject> <name>Example Offering Doc.txt</name> <state>
... </state> <artifactType>
... </artifactType> <disabled>false</disabled> <url>/csa//document/download?id=90cef5de3c63429f013c68d4146a0bce</url> <content>Sample Doc Content</content> <mimeType>application/octet-stream</mimeType> <documentType>
...
</documentType>
</Document>
HP Cloud Service Automation (4.10) Page 30 of 150
APIReference

Update document in service offering

Details
URI
Method POST
Parameters
Returns 200 - Ok
/artifact/<service_offering_id>/document/<document_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent with headers:
l Content-type: multipart/form-data l Content-Disposition: form-data; name="file" l Content-Type: application/octet-stream
https://<host>:<port>/csa/rest/artifact/90cec0123ae20db2013ae2111e3e000a/documen t/90cec0123afffe57013afffec64f0001?userIdentifier=90d96588360da0c701360da0f1d5f4 83
See "Add document to service offering" on page 28 for a more detailed example.

Publish service offerings to catalog

Details
URI
Method POST
Parameters
Returns 200 - Ok
HP Cloud Service Automation (4.10) Page 31 of 150
/artifact/<catlog_id>/publish
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
APIReference
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/90e72e323b5330cc013b5358c0940021/publish ?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent in the request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <CatalogItems>
<catalogItem>
<artifactContext>
<name>OFFERING1_January 30, 2013 6:18:47 PM UTC</name> </artifactContext> <artifactContextType>
<name>SERVICE_OFFERING</name>
<categoryType>
<name>ARTIFACT_TYPE</name>
</categoryType> </artifactContextType> <category>
<name>CRM</name>
<categoryType>
<name>CATALOG_CATEGORY</name>
</categoryType> </category>
</catalogItem> <catalogItem>
<artifactContext>
<name>OFFERING2_January 28, 2013 11:32:17 PM UTC</name> </artifactContext> <artifactContextType>
<name>SERVICE_OFFERING</name>
<categoryType>
<name>ARTIFACT_TYPE</name>
</categoryType> </artifactContextType> <category>
<name>ACCESSORY</name>
<categoryType>
<name>CATALOG_CATEGORY</name>
</categoryType> </category>
</catalogItem> <catalogItem>
<artifactContext>
<name>OFFERING1_January 30, 2013 6:18:47 PM UTC </name> </artifactContext>
HP Cloud Service Automation (4.10) Page 32 of 150
APIReference
<artifactContextType>
<name>SERVICE_OFFERING</name>
<categoryType>
<name>ARTIFACT_TYPE</name>
</categoryType> </artifactContextType> <category>
<name>AABBCCDD</name>
<displayName>AABBCCDD</displayName>
<categoryType>
<name>CATALOG_CATEGORY</name>
</categoryType> </category>
</catalogItem>
</CatalogItems>
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <messageList>
<messages> Publish OFFERING1_January 30, 2013 6:18:47 PM UTC to category AABBC
CDD failed. Category doesn't exist.</messages>
<messages> Publish OFFERING2_January 28, 2013 11:32:17 PM UTC to category ACCE
SSORY succeeded.</messages>
<messages> Publish OFFERING1_January 30, 2013 6:18:47 PM UTC to category CRM s ucceeded.</messages> </messageList>

Unpublish service offerings from catalog

Details
URI
Method POST
Parameters
Returns 200 - Ok
/artifact/<catlog_id>/unpublish
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Object not found 500 - Server exception
Example
The following URL was sent:
HP Cloud Service Automation (4.10) Page 33 of 150
APIReference
https://<host>:<port>/csa/rest/artifact/90e72e323b5330cc013b5358c0940021/unpubli sh?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent in the request:
<CatalogItems>
<catalogItem>
<artifactContext>
<name>OFFERING1_January 30, 2013 6:18:47 PM UTC</name> </artifactContext> <artifactContextType>
<name>SERVICE_OFFERING</name>
<categoryType><name>ARTIFACT_TYPE</name></categoryType> </artifactContextType> <category>
<name>CRM</name>
<categoryType>
<name>CATALOG_CATEGORY</name>
</categoryType> </category>
</catalogItem> <catalogItem>
<artifactContext>
<name>OFFERING2_January 28, 2013 11:32:17 PM UTC</name> </artifactContext> <artifactContextType>
<name>SERVICE_OFFERING</name>
<categoryType><name>ARTIFACT_TYPE</name></categoryType> </artifactContextType> <category>
<name>AABBCCDD</name>
<displayName>AABBCCDD</displayName>
<categoryType><name>CATALOG_CATEGORY</name></categoryType> </category>
</catalogItem>
</CatalogItems>
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <messageList>
<messages> Unpublish Service Offering OFFERING1_January 30, 2013 6:18:47 PM UT
C from category CRM succeeded.</messages>
<messages> Unpublish Service Offering OFFERING2_January 28, 2013 11:32:17 PM U TC from category AABBCCDD failed. Category doesn't exist.</messages> </messageList>
HP Cloud Service Automation (4.10) Page 34 of 150
APIReference

Retrieve artifact state and status

Details
URI
/artifact/state/<artifact_id>
Method GET
Parameters
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
Request
None
Body
Return
ArtifactStateInfo
Body
Returns 200 - Ok
401 - Not authorized 404 - Object not found 500 - Server exception
For all artifacts, possible values for the returned artifactState are:
l ACTIVE l RETIRED
The following state and status information will be returned for specific artifact types.
For service instance artifacts, state will be returned and will contain one of the following values:
l ACTIVE l CANCELLED l CANCELLING l CANCEL_FAILED l DEPLOYING l EXPIRE_FAILED l EXPIRING l FAILED l MODIFYING l MODIFY_FAILED l IN_PROGRESS l PUBLIC_ACTION_FAILED l RESERVED
For service request artifacts:
HP Cloud Service Automation (4.10) Page 35 of 150
APIReference
l State will be returned and will contain one of the following values:
n APPROVED n CANCELLED n COMPLETED n IN_PROGRESS n PENDING_APPROVAL n REJECTED n SUBMITTED
l Status will be returned. If no value was set a null value will be returned. Otherwise it will contain
one of the following values:
n FAILURE n SUCCESS
For service subscription artifacts, status will be returned and will contain one of the following values:
l ACTIVE l CANCELLED l EXPIRED l PAUSED l PENDING l TERMINATED
Example
The following URL was sent:
https://<host>:<port>/csa/rest/artifact/state/90e72e323ad23bd6013ad23f63da0016?u serIdentifier=90d96588360da0c701360da0f1d5f483
The following JSON was returned in the response body:
{
"id": "90e72e323fe4c9ae013fe4def98a0125",
"artifactType": "SERVICE_INSTANCE",
"artifactState": "ACTIVE""state": "FAILED"
"status":null> }

Artifact views

Artifact views provide a convenient way to perform retrieve or update actions. When views are used with artifact GET and fastview GET requests, the response includes only the relevant information depending on the type of view requested. When used with PUT requests, the body of the request can include just relevant information, compared to typical PUT requests.
Advantages of Views
HP Cloud Service Automation (4.10) Page 36 of 150
APIReference
l With GET requests, views retrieve only the relevant data for the artifact and avoid loading all the
data for the artifact. This leads to better performance.
l With PUT requests, the burden is not on the user to know all the artifact details to update the
artifact. The user can pass only the necessary information.
l An example of using views is presented in "Update an artifact" on page 14 (using
componentfinalize view).
Note: If you are updating with artifact views, you need to specify all the view’s properties.
The following predefined views are available.
View name Properties Description
accesspoint accessPoint.username
accessPoint.password accessPoint.uri accessPoint.category.name
actioninfo action.actionState.name
action.actionStatus action.errorOnTimeout action.failOnError action.timeout action.processDefinition.name action.consumerVisible action.stateConstraint.lifecycleState.name action.stateConstraint.lifecycleSubstate.name
This retrieves information from the access point object. Any entity that has the accessPoint property should work with this view.
Retrieves the properties for the action object in addition to all the basicinfo and propertyinfo properties. Note: If the intention is to update an existing action, then action.id must be specified.
HP Cloud Service Automation (4.10) Page 37 of 150
APIReference
View name Properties Description
artifactinfo state.name
artifactType.name disabled ownedBy.name
basicinfo id
name displayName description iconUrl detailedDescription isCriticalSystemObject
candidatepools*
resourceBinding.candidateProvider.candidatePool.id resourceBinding.candidateProvider.candidatePool.objectId resourceBinding.candidateProvider.candidatePool.isCriticalS ystemObject resourceBinding.candidateProvider.candidatePool.name resourceBinding.candidateProvider.candidatePool.displayNa me resourceBinding.candidateProvider.candidatePool.disabled resourceBinding.candidateProvider.candidatePool.useProvid erEnv
Retrieves the required properties from an artifact object in addition to all the basicinfo properties.
Retrieves information from any Identity object. All artifacts and some additional entities (e.g., accessPoint) are identity objects.
Use this view to retrieve candidate resource provider pools for a given resource binding.
candidateprovid ers*
HP Cloud Service Automation (4.10) Page 38 of 150
resourceBinding.candidateProvider.resourceProvider.id resourceBinding.candidateProvider.resourceProvider.objectId resourceBinding.candidateProvider.resourceProvider.isCritica lSystemObject resourceBinding.candidateProvider.resourceProvider.name resourceBinding.candidateProvider.resourceProvider.display Name resourceBinding.candidateProvider.resourceProvider.disabled
Use this view to retrieve candidate resource providers for a given resource binding.
APIReference
View name Properties Description
componentchild componentChild.name
componentChild.displayName componentChild.description componentChild.iconUrl componentChild.detailedDescription componentChild.isCriticalSystemObject componentChild.ownedBy.name componentChild.state.name componentChild.artifactType.name componentChild.disabled componentChild.serviceInstance.id componentChild.componentType.name componentChild.lifecycleProperties.lifecycleState.name componentChild.lifecycleProperties.lifecycleSubstate.name componentChild.id
toFinalize Use this view componentfinali ze
lifecycleProperties.lifecycleState.name componentlifec ycle
lifecycleProperties.lifecycleSubstate.name
Use this view to add/update service components from the parent service component.
to change the finalize flag for a component.
Use this view to change the lifecycle state and substate for a component.
componentroot componentRoot.name
componentRoot.displayName
componentRoot.description
componentRoot.iconUrl
componentRoot.detailedDescription
componentRoot.isCriticalSystemObject
componentRoot.ownedBy.name
componentRoot.state.name
componentRoot.artifactType.name
componentRoot.disabled
componentRoot.serviceInstance.id
componentRoot.componentType.name
componentRoot.lifecycleProperties.lifecycleState.name
componentRoot.lifecycleProperties.lifecycleSubstate.name
componentRoot.id
Use this view to add a root service component to a ServiceBluep rint or a ServiceInsta nce object.
HP Cloud Service Automation (4.10) Page 39 of 150
APIReference
View name Properties Description
disabledesign ServiceBlueprint.disabled Use this view
to enable or disable a ServiceBluep rint.
propertyinfo property.name
property.values.value
property.valueType.name
property.consumerVisible
property.displayName
propertyvalue property.name
property.values.value
property.consumerVisible
property.displayName
resourceBinding.isCriticalSystemObject resourcebinding info
resourceBinding.state.name
resourceBinding.artifactType.name
resourceBinding.disabled
resourceBinding.bindingState.name
resourceBinding.resourceOffering.name
resourceBinding.lifeCycleProperties.lifecycleState.name
resourceBinding.lifeCycleProperties.lifecycleSubstate.name
resourceBinding.resourceProvider.name
Retrieves a list of all the properties.U sed for creating new properties.
This view is useful if the need is only to update a property value.
Use this view to create/updat e a Resource Binding.
validproviders*
HP Cloud Service Automation (4.10) Page 40 of 150
resourceBinding.id
resourceBinding.validProvider.resourceBinding.id
resourceBinding.validProvider.resourceProvider.id
Use this view to retrieve or to update valid resource providers for a given resource binding.
APIReference
View name Properties Description
validprovidersp ools*
resourceBinding.id
resourceBinding.validProvider.resourceBinding.id
resourceBinding.validProvider.resourceProvider.id
resourceBinding.validProvider.validPool.id
Use this view to update valid resource providers and valid resource provider pools for a given resource binding.
* For the candidatepools, candidateproviders, validproviders and validproviderpools artifact views, while the provider selection is in progress the list of providers will be returned. Once a provider is selected no list will be returned.
HP Cloud Service Automation (4.10) Page 41 of 150

Chapter 2: Availablevalues API

Description
Use this API to retrieve the list of available values for a dynamic property.
Base URL
https://<host>:<port>/csa/rest
Details
URI
Method POST
Parameters
Request Body
Returns 200 - Ok
/availablevalues/<property_id>
property_id is an option model property, and is part of service design, offering and subscription artifacts.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See Get
userIdentifier for the steps required to get the userIdentifier value.
Ampersand (&) separated name=value pairs, where the value on the left side of the equal sign (=)represents the parameter name configured for a dynamic property, and the value on the right side is the value the user selected from the parent property. For example, a request body might contain: first=parent1value&countparam=mycount.
400 - Not authorized 404 - Not found 500 - Server exception
Example use context
From the subscriber portal a property is selected from a drop down list. The values of any associated dynamic properties must be spontaneously populated - they are dynamic and therefore cannot be populated in advance.
Example
The following URL was sent:
https://<host>:<port>/csa/rest/availablevalues/90e763a43ddc18e5013ddc2f134c0088 ?userIdentifier=90d96588360da0c701360da0f1d5f483
The following was sent in the request body:
HP Cloud Service Automation (4.10) Page 42 of 150
APIReference
first=parent1Value
The following response was returned:
<Property>
<id>90e763a43ddc18e5013ddc2f134c0088</id> <name>child1</name> <displayName>child1</displayName> <dynamicValueEnabled>true</dynamicValueEnabled> <dynamicScriptName>sample_jsp.jsp</dynamicScriptName> <dynamicScriptParameters>
first=[CLIENT:parent1] </dynamicScriptParameters> <availableValues>
<value>value1</value>
<displayName>value1 displayName</displayName>
<description>value1 description</description> </availableValues> ...
</Property>
HP Cloud Service Automation (4.10) Page 43 of 150

Chapter 3: Catalog API

Description
Use this API to get information related to CSA catalogs.
Base URL
https://<host>:<port>/csa/rest

URIs

The following URIs are appended to the base URL:
Catalog
A catalog is the collection of services available to a consumer.
URI Method Parameters Description
/catalog GET userIdentifier, scope, detail "List catalogs" on page 47
/catalog/<catalog_id> GET userIdentifier, scope, detail "Get catalog details" on page
49
Category
Categories allow you to classify service offerings in a service catalog.
URI Method Parameters Description
/catalog/<catalog_id>/category POST userIdentifier "Create catalog categories"
on page 50
/catalog/<catalog_ id>/category/<category_id>
/catalog/<catalog_ id>/category/<category_id>
PUT userIdentifier "Update catalog categories"
on page 52
DELETE userIdentifier "Delete catalog category" on
page 53
Offering
An offering allows you to define service designs that are published to a service catalog.
HP Cloud Service Automation (4.10) Page 44 of 150
APIReference
URI Method Parameters Description
/catalog/<catalog_ id>/offering
/catalog/<catalog_ id>/offering/<offering_id>
GET userIdentifier, scope,
detail, hasApproval
GET userIdentifier, scope,
detail
"List offerings in the catalog" on page 54
"Get offering details" on page 55
Request
A request is created whenever a user initiates, changes, or deletes a subscription.
URI Method Parameters Description
/catalog/<catalog_id>/request GET userIdentifier, scope,
detail, submitter
/catalog/<catalog_id>/request POST userIdentifier "Submit a request" on
/catalog/<catalog_ id>/request/<request_id>
/catalog/<catalog_ id>/request/<request_id>/cancel
GET userIdentifier, scope,
detail
GET userIdentifier "Cancel a request" on
"List requests in the catalog" on page 56
page 58
"Get request details" on page 60
page 63
/catalog/<catalog_ id>/request/<request_id>
DELETE userIdentifier "Retire a request" on
Approval
An approval is created when the approval manager approves a request.
URI Method Parameters Description
/catalog/<catalog_ id>/approval
/catalog/<catalog_ id>/approval/<approval_ id>
/catalog/<catalog_ id>/approval/<approval_ id>
/catalog/<catalog_ id>/approval/<approval_ id>
GET userIdentifier, scope,
detail, approver, returnRetired
GET userIdentifier, scope,
detail
PUT userIdentifier "Update approval decision
DELETE userIdentifier "Retire an approval" on page 75
"List approvals in the catalog" on page 64
"Get approval details" on page 65
using an external approval system" on page 65
page 63
HP Cloud Service Automation (4.10) Page 45 of 150
APIReference
URI Method Parameters Description
/catalog/<catalog_ id>/approval/<approval_ id>/approver
PUT userIdentifier "Update approval decision
using CSA approval process" on page 66
Approval policy
URI Method Parameters Description
/catalog/<catalog_id>/policy/<policy_ id>/setCatalogApprovalPolicy
/catalog/<catalog_id>/policy/<policy_ id>/setSOApprovalPolicy
POST userIdentifier "Update catalog approval
policies" on page 68
POST userIdentifier "Update service offerings
approval policy" on page 69
Subscription
A subscription is created when a consumer requests a service offering and includes all of the options selected by the consumer when the subscription was initiated.
URI Method Parameters Description
/catalog/<catalog_ id>/subscription
/catalog/<catalog_ id>/subscription/<subscription_ id>
GET userIdentifier, scope,
detail, requestor
GET userIdentifier, scope,
detail
"List subscriptions in the catalog" on page 71
"Get subscription details" on page 72
Resource Subscription
URI Method Parameters Description
/catalog/<catalog_ id>/resourceSubscription
GET userIdentifier,
scope, detail
"Get resource subscription details" on page 76
Instance
An instance is created when a request is approved and includes details about the requested services such as the status of services, IP addresses, etc.
HP Cloud Service Automation (4.10) Page 46 of 150
APIReference
URI Method Parameters Description
catalog/<catalog_id>/instance GET userIdentifier, scope,
detail, requestor
catalog/<catalog_ id>/instance/<instance_id>
GET userIdentifier, scope,
detail

List catalogs

Details
URI
Method GET
Parameters
/catalog
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
"List instances in the catalog" on page 74
"Get instance details" on page 75
detail=[required|basic|standard|template|full]
Optional; default is basic. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
Returns 200 - Ok
401 - Not authorized 500 - Server exception
Examples
Use the following URL:
https://<host>:<port>/csa/rest/catalog ?userIdentifier=90d9652b35f46a930135f35b327e00a0&scope=base&detail=basic
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <CatalogList>
<count>12</count> <limit>0</limit> <catalog>
<id>402895e566cb32ss0136cb831752000f</id>
HP Cloud Service Automation (4.10) Page 47 of 150
APIReference
</catalog> <catalog> ...
<objectId>402895e566cb32ss0136cb831752000f</objectId> <createdOn>2012-04-19T09:23:04.913-06:00</createdOn> <updatedOn>2012-04-19T09:23:04.913-06:00</updatedOn> <isCriticalSystemObject>false</isCriticalSystemObject> <description>Default catalog for the organization.</description> <name>consumer_catalog_a</name> <displayName>Consumer Catalog A</displayName> <state>
<id>90d96588364da0c701370da0ss320037</id> <objectId>90d96588364da0c701370da0ss320037</objectId> <createdOn>2012-04-19T09:22:25.943-06:00</createdOn> <isCriticalSystemObject>true</isCriticalSystemObject> <description>Active</description> <iconUrl>/csa/images/categories/artifact_state/active.png</iconUrl> <name>ACTIVE</name> <displayName>Active</displayName> <disabled>false</disabled> <categoryType>
<id>90d96588364da0c701370da0ss320038</id> <objectId>90d96588364da0c701370da0ss320038</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ARTIFACT_STATE</name> <displayName>Artifact State</displayName> <extensible>false</extensible>
</categoryType> </state> <artifactType>
<id>90d96588364da0c701370da0ss320039</id>
<objectId>90d96588364da0c701370da0ss320039</objectId>
<createdOn>2012-04-19T09:22:26.050-06:00</createdOn>
<isCriticalSystemObject>true</isCriticalSystemObject>
<description>Catalog</description>
<iconUrl>/csa/images/categories/artifact_type/catalog.png</iconUrl>
<name>CATALOG</name>
<displayName>Catalog</displayName>
<disabled>false</disabled>
<categoryType>
<id>90d96588364da0c701370da0ss320030</id> <objectId>90d96588364da0c701370da0ss320030</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ARTIFACT_TYPE</name> <displayName>Artifact Type</displayName> <extensible>false</extensible>
</categoryType> </artifactType> <disabled>false</disabled>
HP Cloud Service Automation (4.10) Page 48 of 150
APIReference
</catalog> ... </CatalogList>

Get catalog details

Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<catalog_id>
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
Use the following URL:
https://<host>:<port>/csa/rest/catalog/402895e566cb32ss0136cb831752000f ?userIdentifier=90d9652b35f46a930135f35b327e00a0&scope=base&detail=required
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Catalog>
<id>402895e345cb67dd0136ss331752000f</id> <objectId>402895e345cb67dd0136ss331752000f</objectId> <isCriticalSystemObject>false</isCriticalSystemObject> <name>Catalog_Consumer_A</name> <displayName>Consumer Catalog A</displayName> <state>
HP Cloud Service Automation (4.10) Page 49 of 150
APIReference
</state> <artifactType>
</artifactType> <disabled>false</disabled>
</Catalog>
<id>90d96567360da0c701360ss0ef470038</id> <objectId>90d96567360da0c701360ss0ef470038</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ACTIVE</name> <displayName>Active</displayName> <disabled>false</disabled> <categoryType>
<id>90d67588360da0c701360ss0ef420037</id> <objectId>90d67588360da0c701360ss0ef420037</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ARTIFACT_STATE</name> <displayName>Artifact State</displayName> <extensible>false</extensible>
</categoryType>
<id>90d96586760da0c701360da0ssd2001d</id> <objectId>90d96586760da0c701360da0ssd2001d</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>CATALOG</name> <displayName>Catalog</displayName> <disabled>false</disabled> <categoryType>
<id>90d67588360da0c701360da0ssb40017</id> <objectId>90d67588360da0c701360da0ssb40017</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ARTIFACT_TYPE</name> <displayName>Artifact Type</displayName> <extensible>false</extensible>
</categoryType>

Create catalog categories

Details
URI
Method POST
Parameters
HP Cloud Service Automation (4.10) Page 50 of 150
/catalog/<catalog_id>/category
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
APIReference
URI
/catalog/<catalog_id>/category
Returns 200 - Ok
401 - Not authorized 404 - Object not found 500 - Server exception
In the request body:
l Any category specified in the request body that already exists will be left unchanged. l displayName is required. l iconUrl and descriptionare optional, and will be set to null if not specified.
Example
The following URL was sent to create an approval policy with two named approvers:
https://<host>:<port>/csa/rest/catalog/90e72e323c88421f013c8d7fad120076/category
?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent in the request:
<Catalog>
<catalogCategory>
<displayName>Example first Catalog Category</displayName> <iconUrl>/catalog/category/x.png</iconUrl>
<description>description for catalog category</description> </catalogCategory> <catalogCategory>
<displayName>Example second category</displayName>
</catalogCategory>
</Catalog>
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Catalog>
<id>8a81818f3d02fb7e013d0308894a0004</id> <isCriticalSystemObject>false</isCriticalSystemObject> <description>Default catalog for the organization.</description> <iconUrl>
/csa/images/library/briefcase-consumer_default_img-60.png </iconUrl> <name>Catalog_QA_ORG</name> <displayName>QA Org Catalog</displayName> ... <catalogCategory> ... </catalogCategory> ... <catalogCategory>
<id>8a81818f3d128500013d1341a5d3000e</id>
<isCriticalSystemObject>false</isCriticalSystemObject>
HP Cloud Service Automation (4.10) Page 51 of 150
APIReference
<name>EXAMPLE_SECOND_CATEGORY</name>
<displayName>Example second category</displayName>
<disabled>false</disabled> </catalogCategory> <catalogCategory> ... </catalogCategory> ... <catalogCategory>
<id>8a81818f3d128500013d1341a5c6000d</id>
<isCriticalSystemObject>false</isCriticalSystemObject>
<description>description for catalog category</description>
<iconUrl>/catalog/category/x.png</iconUrl>
<name>EXAMPLE_FIRST_CATALOG_CATEGORY</name>
<displayName>Example first Catalog Category</displayName>
<disabled>false</disabled> </catalogCategory> <catalogCategory> ... </catalogCategory> ...
</Catalog>

Update catalog categories

Details
URI
Method PUT
Parameters
Returns 200 - Ok (Indicates the REST call executed without error. See XML return content
Note thatany CatalogCategory elements not specified in the request body will be left unchanged.
Example
The following URL was sent:
/catalog/<catalog_id>/category/<category_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
for details on categories updated.) 401 - Not authorized 404 - Object not found 500 - Server exception
https://<host>:<port>/csa/rest/catalog/8a81818f3d02fb7e013d0308894a0004/ category/8a81818f3d128500013d1341a5c6000d ?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent in the request:
HP Cloud Service Automation (4.10) Page 52 of 150
APIReference
<CatalogCategory>
<displayName>Changing first example category name</displayName> <iconUrl>/catalog/category/x.png</iconUrl> <description>New description for first example category</description>
</CatalogCategory>
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Catalog>
<id>8a81818f3d02fb7e013d0308894a0004</id> <isCriticalSystemObject>false</isCriticalSystemObject> <description>Default catalog for the organization.</description> <iconUrl>
/csa/images/library/briefcase-consumer_default_img-60.png </iconUrl> <name>Catalog_QA_ORG</name> <displayName>QA Org Catalog</displayName> ... <catalogCategory> ... </catalogCategory> ... <catalogCategory>
<id>8a81818f3d128500013d1341a5c6000d</id>
<isCriticalSystemObject>false</isCriticalSystemObject>
<description>description for catalog category</description>
<iconUrl>/catalog/category/x.png</iconUrl>
<name>CHANGING_FIRST_EXAMPLE_CATEGORY_NAME</name>
<displayName>Changing first example category name</displayName>
<disabled>false</disabled> </catalogCategory> ...
</Catalog>

Delete catalog category

Details
URI
Method DELETE
Parameters
Returns 200 - Ok (Indicates the REST call executed without error. See XML return content
HP Cloud Service Automation (4.10) Page 53 of 150
/catalog/<catalog_id>/category/<category_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
for details on category deleted.) 401 - Not authorized 404 - Object not found 500 - Server exception
APIReference
Example
The following URL was sent:
https://<host>:<port>/csa/rest/catalog/8a81818f3d02fb7e013d0308894a0004/ category/8a81818f3d128500013d1341a5c6000d ?userIdentifier=90d96588360da0c701360da0f1d5f483
The XML return content is basic catalog information as returned with the POST and PUT methods and most notably, will not include the category just deleted.

List offerings in the catalog

Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<catalog_id>/offering
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|view]
Optional; default is base.
detail=basic
Optional; The only valid value is basic.
hasApproval=[true|false]
Optional; default is false. If true, then hasApproval attribute is returned. If false, then the attribute is not returned.
401 - Not authorized 500 - Server exception
Examples
The following URL was sent to get a list of offerings in a catalog using the default values for scope (base) and detail (basic):
https://<host>:<port>/csa/rest/catalog/402895e33732af18013732b6f435006boffering? userIdentifier=90d9652b67ss6a930135f35b327e00a0
The following XML was returned in the response:
HP Cloud Service Automation (4.10) Page 54 of 150
APIReference
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceOfferingList>
<count>3</count> <limit>0</limit> <ServiceOffering
<id>90e763db3dd1a9a4013dd1e16aa16c95</id> <objectId>90e763db3dd1a9a4013dd1e16aa16c95</objectId> <createdOn>2013-04-03T14:50:43.873-07:00</createdOn> <updatedOn>2013-04-03T14:50:43.873-07:00</updatedOn> <isCriticalSystemObject>false</isCriticalSystemObject> <description>3 Level Option for testing service offerings Integration Servic
e Offering</description>
</artifactType> <serviceBlueprint> <detailedDescription>3 Level Option for testing service offerings Integratio
n Service Offering</detailedDescription>
<iconUrl>/csa/images/library/compliance.png</iconUrl> <name>ServiceOffering for ApprovalPolicy</name> <displayName>ServiceOffering for ApprovalPolicy</displayName> <state> … </state> <artifactType> … </artifactType> <disabled>false</disabled>
<offeringState> … </offeringState> </ServiceOffering> <ServiceOffering> … </ServiceOffering> <ServiceOffering> … </ServiceOffering>
</ServiceOfferingList>

Get offering details

Details
URI
Method GET
/catalog/<catalog_id>/offering/<offering_id>
Use "Catalog API" on page 44 to get the catalog ID and "List offerings in the
catalog" on the previous page to get the offering ID.
HP Cloud Service Automation (4.10) Page 55 of 150
APIReference
URI
Parameters
Returns 200 - Ok
/catalog/<catalog_id>/offering/<offering_id>
Use "Catalog API" on page 44 to get the catalog ID and "List offerings in the
catalog" on the previous page to get the offering ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
Use the following URL:
https://<host>:<port>/csa/rest/catalog/402895e33732af18013732b6f435006b/ offering/402895e337326d300137327ce1e30074 ?userIdentifier=90d9652b67ss6a930135f35b327e00a0
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceOffering>
<id>402895e337326d300137327ce1e30074</id> <objectId>402895e337326d300137327ce1e30074</objectId> <createdOn>2012-05-09T10:44:34.147-06:00</createdOn> <updatedOn>2012-05-09T11:48:26.170-06:00</updatedOn>
...
</ServiceOffering>

List requests in the catalog

Deprecation Notice
The GET/catalog/<catalog_id>/request URI has been deprecated. Use URI /user/myrequest instead as using the deprecated URI will not allow viewing requests created by users who previously had access to the catalog, but no longer have access.
HP Cloud Service Automation (4.10) Page 56 of 150
APIReference
Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<catalog_id>/request
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|view]
Optional; default is base.
detail=basic
Optional; The only valid value is basic.
submitter=<user_name>
Required; user name must be valid and must be authorized to view the request.
returnRetired=[true|false]
Optional; default is false.
401 - Not authorized 500 - Server exception
Examples
The following URL was sent:
https://localhost:8444/csa/rest/catalog/8a8181853810699a0138106dcebc0011/reques t/ ?userIdentifier=8a8181853810699a01381076be5400a0
The following XML was returned in the response:
<ServiceRequestList>
<count>21</count> <limit>0</limit> <ServiceRequest>
<id>8a8181853810699a01381079190800a7</id> <objectId>8a8181853810699a01381079190800a7</objectId> <createdOn>2012-06-21T12:16:08.073-07:00</createdOn> <updatedOn>2012-06-21T12:16:50.787-07:00</updatedOn> <isCriticalSystemObject>false</isCriticalSystemObject> <description>SD2 Offering</description> <detailedDescription>desc - SD2 offering</detailedDescription> <iconUrl>/csa/images/library/application.png</iconUrl> <name>request 1</name>
HP Cloud Service Automation (4.10) Page 57 of 150
APIReference
<displayName>request 1</displayName> <state>
<id>90d96588360da0c701360da0ef470038</id> <objectId>90d96588360da0c701360da0ef470038</objectId> <createdOn>2012-06-21T11:51:43.267-07:00</createdOn> <isCriticalSystemObject>true</isCriticalSystemObject> <description>Active</description> <iconUrl>/csa/images/categories/artifact_state/active.png</iconUrl> <name>ACTIVE</name> <displayName>Active</displayName> <disabled>false</disabled> <categoryType>
<id>90d96588360da0c701360da0ef420037</id> <objectId>90d96588360da0c701360da0ef420037</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>ARTIFACT_STATE</name> <displayName>Artifact State</displayName> <extensible>false</extensible>
</categoryType> </state> ...
</ServiceRequest>
</ServiceRequestList>

Submit a request

Details
URI
Method POST
Parameters
Returns 200 - Ok
Examples
/catalog/<catalog_id>/request
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception
Use the following URL:
HP Cloud Service Automation (4.10) Page 58 of 150
APIReference
https://<host>:<port>/csa/rest/catalog/90540a9734f502880134f502c82e0011/request ?userIdentifier=90d9667ss5f46a930135f35b327e00a0
The following XML was sent in the request:
<ServiceRequest>
<description>description - request BE </description> <name>Request BE - Order server</name> <displayName>Request BE</displayName> <artifactContext>
<id>8a8181853824bc1d013824c3ae350078</id> </artifactContext> <requestedAction>
<name>ORDER</name>
<property>
<name>START_DATE</name> <values>
<value>2012-06-26T10:58:58.233-08:00</value>
</values> </property> <property>
<name>END_DATE</name>
<values>
<value>2012-06-30T10:58:58.233-08:00</value>
</values> </property> <property>
<name>SERVICE_NAME</name>
<values>
<value>SERVICE_NAME - request BE</value>
</values> </property> <property>
<name>SERVICE_DESCRIPTION</name>
<values>
<value>service_desc request BE</value>
</values> </property> <property>
<name>OPTION_MODEL</name>
<values>
<optionModel>
<name>SD2</name> <optionSets>
<name>42FBA7E6-17EF-7B1A-C4DD-0A5CB0246E55</name> <options>
<name>D914556A-6F6A-1BE0-035E-0A5CB021BE9B</name> <property>
<name>INT</name> <values>
HP Cloud Service Automation (4.10) Page 59 of 150
APIReference
</property>
</requestedAction>
</ServiceRequest>
<value>33</value>
</values> </property> <property>
<name>BOOLEAN</name>
<values>
<value>true</value>
</values> </property> <property>
<name>STR</name>
<values>
<value>YY</value>
</values> </property>
</options> </optionSets> <optionSets>
<name>D6A80E16-2977-4111-14B9-0A5E5D5B2F56</name>
<options>
<name>18CA9979-7C9D-F5AC-06B5-0A5E5D5B3B51</name>
</options> </optionSets>
</optionModel>
</values>
The following XML was returned in the response:
<ServiceRequest>
<id>8a818185382a26cc01382abf331c037e</id> <isCriticalSystemObject>false</isCriticalSystemObject> <disabled>false</disabled>
</ServiceRequest>

Get request details

Details
URI
Method GET
/catalog/<catalog_id>/request/<request_id>
Use "Catalog API" on page 44 to get the catalog ID and "List requests in the
catalog" on page 56 to get the request ID.
HP Cloud Service Automation (4.10) Page 60 of 150
APIReference
URI
Parameters
Returns 201 - Ok, object returned
/catalog/<catalog_id>/request/<request_id>
Use "Catalog API" on page 44 to get the catalog ID and "List requests in the
catalog" on page 56 to get the request ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
401 - Not authorized 404 - Not found 500 - Server exception
Example
The following URL was sent:
https://localhost:8444/csa/rest/catalog/8a8181853810699a0138106dcebc0011/request /8a8181853810699a01381079190800a7/ ?userIdentifier=8a8181853810699a01381076be5400a0
The following XML was returned:
<ServiceRequest>
<id>8a8181853810699a01381079190800a7</id> <objectId>8a8181853810699a01381079190800a7</objectId> <createdOn>2012-06-21T12:16:08.073-07:00</createdOn> <updatedOn>2012-06-21T12:16:50.787-07:00</updatedOn> <createdBy>
<id>8a8181853810699a01381076be5400a0</id> <objectId>8a8181853810699a01381076be5400a0</objectId> <isCriticalSystemObject>false</isCriticalSystemObject> <name>consumer1</name>
<disabled>false</disabled> </createdBy> <updatedBy>
<id>90d96588360da0c701360da0f1d5f483</id>
<objectId>90d96588360da0c701360da0f1d5f483</objectId>
<isCriticalSystemObject>true</isCriticalSystemObject>
<name>admin</name>
HP Cloud Service Automation (4.10) Page 61 of 150
APIReference
<displayName>admin</displayName>
<disabled>false</disabled> </updatedBy> <isCriticalSystemObject>false</isCriticalSystemObject> <description>SD2 Offering</description> <detailedDescription>desc - SD2 offering</detailedDescription> <iconUrl>/csa/images/library/application.png</iconUrl> <name>request 1</name> <displayName>request 1</displayName> <catalogItem>
<id>8a8181853810699a01381079202c00d7</id>
<createdOn>2012-06-21T12:16:09.900-07:00</createdOn>
<updatedOn>2012-06-21T12:16:09.900-07:00</updatedOn>
<createdBy>
<id>8a8181853810699a01381076be5400a0</id> <objectId>8a8181853810699a01381076be5400a0</objectId> <isCriticalSystemObject>false</isCriticalSystemObject> <name>consumer1</name>
<disabled>false</disabled> </createdBy> ... <priceCategory>
<id>90d9650a36897af90136897bc93e0016</id>
<objectId>90d9650a36897af90136897bc93e0016</objectId>
<createdOn>2012-06-21T11:51:43.633-07:00</createdOn>
<isCriticalSystemObject>true</isCriticalSystemObject>
<description>SETUP</description>
<iconUrl>/csa/images/categories/price/setup.png</iconUrl>
<name>SETUP</name>
<displayName>SETUP</displayName>
<disabled>false</disabled>
<categoryType>
</categoryType> </priceCategory> <fixedPrice>3000.0</fixedPrice> <unitPrice>0.0</unitPrice>
</basePrice>
</ServiceRequest>
<id>90d9650a36897af90136897bc7c70014</id> <objectId>90d9650a36897af90136897bc7c70014</objectId> <isCriticalSystemObject>false</isCriticalSystemObject> <name>PRICE_CATEGORY</name> <displayName>Price Category</displayName> <extensible>false</extensible>
HP Cloud Service Automation (4.10) Page 62 of 150
APIReference

Cancel a request

Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<catalog_id>/request/<request_id>/cancel
Use "Catalog API" on page 44 to get the catalog ID and "List requests in the
catalog" on page 56 to get the request ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception

Retire a request

Details
URI
/catalog/<calalog_id>/request/<request_id>
Use "Catalog API" on page 44 to get the catalog ID and "List requests in the
catalog" on page 56 to get the request ID.
Method DELETE
Parameters
Returns 200 - Ok
HP Cloud Service Automation (4.10) Page 63 of 150
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception
APIReference

List approvals in the catalog

Deprecation Notice
The GET/catalog/<catalog_id>/approval URI has been deprecated. Use URI /user/myapproval instead as using the deprecated URI will not allow access to new functionality including the ability to list all approvals from all catalogs for a specified approver.
Details
URI
Method GET
Parameters
/catalog/<catalog_id>/approval
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree|view]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned. If the value is view, then the view parameter is required.
detail=[required|basic|standard|template|full]
Optional; default is basic. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
approver=<user_name>
Optional; the name of the approver.
returnRetired=[true|false]
Optional; default is false.
Caution: The users specified by userIdentifierand approvermust be in the same organization.
Returns 200 - Ok
401 - Not authorized 500 - Server exception
HP Cloud Service Automation (4.10) Page 64 of 150
APIReference

Get approval details

Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<calalog_id>/approval/<approval_id>
Use "Catalog API" on page 44 to get the catalog ID and "List requests in the
catalog" on page 56 to get the approval ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
401 - Not authorized 404 - Not found 500 - Server exception

Update approval decision using an external approval system

Details
URI
Method PUT
Parameters
HP Cloud Service Automation (4.10) Page 65 of 150
/catalog/<calalog_id>/approval/<approval_id>
Use "Catalog API" on page 44 to get the catalog ID and "List approvals in the
catalog" on the previous page to get the approval ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
APIReference
URI
Body ApprovalProcess instance required inrequest body.
Returns 200 - Ok
/catalog/<calalog_id>/approval/<approval_id>
Use "Catalog API" on page 44 to get the catalog ID and "List approvals in the
catalog" on the previous page to get the approval ID.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
The following URL was sent to approve a subscription request:
https://<host>:<port>/csa/rest/catalog/90540a9734f502880134f502c82e0011/ approval/65920b6356n204770943t567ss2r1503 ?userIdentifier=90d9667ss5f46a930135f35b327e00a0
The following XML was sent in the request:
<ApprovalProcess>
<approvalResult>
<name>APPROVED</name>
</approvalResult>
</ApprovalProcess>
The following URL was sent to reject a subscription request:
https://<host>:<port>/csa/rest/catalog/
The following XML was sent in the request:
<ApprovalProcess>
<approvalResult>
<name>REJECTED</name> </approvalResult> <approvalComment>comment</approvalComment>
</ApprovalProcess>

Update approval decision using CSA approval process

Details
URI
Method PUT
/catalog/<calalog_id>/approval/<approval_id>/approver
Use "Catalog API" on page 44 to get the catalog ID and "List approvals in the
catalog" on page 64 to get the approval ID.
HP Cloud Service Automation (4.10) Page 66 of 150
APIReference
URI
Parameters
Body ApprovalProcess instance required in request body.
Returns 200 - Ok
/catalog/<calalog_id>/approval/<approval_id>/approver
Use "Catalog API" on page 44 to get the catalog ID and "List approvals in the
catalog" on page 64 to get the approval ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
The following URL was sent to approve a subscription request:
https://<host>:<port>/csa/rest/catalog/90540a9734f502880134f502c82e0011/ approval/65920b6356n204770943t567ss2r1503/approver ?userIdentifier=90d9667ss5f46a930135f35b327e00a0
The following XML was sent in the request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Approver>
<person>
<userName>approver0@hp.com</userName> <organization>
<name>CSA_CONSUMER</name>
</organization> </person> <approverResult>
<name>APPROVED</name> </approverResult>
</Approver>
The following URL was sent to reject a subscription request:
https://<host>:<port>/csa/rest/catalog/90540a9734f502880134f502c82e0011/ approval/65920b6356n204770943t567ss2r1503/approver ?userIdentifier=90d9667ss5f46a930135f35b327e00a0
The following XML was sent in the request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Approver>
<person>
<userName>approver0@hp.com</userName>
HP Cloud Service Automation (4.10) Page 67 of 150
APIReference
<organization>
<name>CSA_CONSUMER</name>
</organization> </person> <approverResult>
<name>REJECTED</name> </approverResult> <approvalComment>comment</approvalComment>
</Approver>

Update catalog approval policies

Use this API to associate an approval policy with the specified catalog.
Details
URI
Method POST
Parameters
Response Body
Returns 200 - Ok
/catalog/<calalog_id>/policy/<policy_id>/setCatalogApprovalPolicy
Use "Catalog API" on page 44 to get the catalog ID. Use "List organization's
approval policies" on page 105to getan organization's approval policy IDs.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
The response body will be an ApprovalPolicyVO of base/full.
401 - Not authorized 404 - Object not found 500 - Server exception
Examples
The following URL was sent:
https://<host>:<port>/csa/rest/catalog/8a81818f3d4251ed013d46c2b7f602bc/ policy/8a81818f3d4251ed013d4259f57c0008/setCatalogApprovalPolicy? userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ApprovalPolicyList>
<count>2</count> <limit>0</limit> <approvalPolicy>
HP Cloud Service Automation (4.10) Page 68 of 150
APIReference
<id>8a81818f3d4251ed013d46cc859002c1</id> ... <approvalTemplate xsi:type="namedApproverApprovalTemplateVO">
<id>8a81818f3d4251ed013d46cc31ed02be</id>
<name>EXAMPLE_APPROVAL_POLICY_March 7, 2013 9:40:19 PM UTC </name> ... <automaticApproval>false</automaticApproval> <automaticPeriodDuration>0</automaticPeriodDuration> <minApprovalRequired>0</minApprovalRequired>
<approvalLevel>1</approvalLevel> </approvalTemplate> ... <catalog>
<id>8a81818f3d4251ed013d46c2b7f602bc</id>
...
<name>SOFTWARE_CATALOG</name>
... </catalog>
</approvalPolicy> <approvalPolicy>
<id>8a81818f3d4251ed013d46cc85e402c2</id>
... <approvalTemplate>
...
<name>USER_CONTEXT_APPROVAL_TEMPLATE_QAORG</name>
...
<automaticApproval>false</automaticApproval>
<automaticPeriodDuration>0</automaticPeriodDuration>
<minApprovalRequired>0</minApprovalRequired>
<approvalLevel>1</approvalLevel> </approvalTemplate> ...> <catalog>
<id>8a81818f3d4251ed013d46c2b7f602bc</id>
...
<name>SOFTWARE_CATALOG</name>
... </catalog>
</approvalPolicy>
</ApprovalPolicyList>

Update service offerings approval policy

Use this API to update the approval policy for multiple service offerings published in the specified catalog.
HP Cloud Service Automation (4.10) Page 69 of 150
APIReference
Details
URI
Method POST
Parameters
Request Body
Response Body
Returns 200 - Ok
Examples
/catalog/<calalog_id>/policy/<policy_id>/setSOApprovalPolicy
Use "Catalog API" on page 44 to get the catalog ID. Use "List offerings in the
catalog" on page 54to geta catalog's service offering IDs, and "Get offering details" on page 55to get a service offering's policy ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
The request body contains the list of service offering IDs that are to be updated.
The response body will be a MessageListVO with success and failure messages.
401 - Not authorized 404 - Object not found 500 - Server exception
The following URL was sent:
https://<host>:<port>/csa/rest/catalog/8a81818f3d4251ed013d46c2b7f602bc/ policy/8a81818f3d4251ed013d46cc8590012c/setSOApprovalPolicy? userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was sent in the request body:
<ServiceOfferingList>
<ServiceOffering>
<id>8a81818f3d4251ed013d427c75e5005d<id>
</ServiceOffering> <ServiceOffering>
<id>8a81818f3d4251ed013d427c75e127c3<id>
</ServiceOffering> <ServiceOffering>
<id>12345<id>
</ServiceOffering>
</ServiceOfferingList>
The following XML was returned:
HP Cloud Service Automation (4.10) Page 70 of 150
APIReference
<messageList>
<messages>Updated approval policy of action of ORDER for service offering with
id 8a81818f3d4251ed013d427c75e5005d </messages>
<messages>Updated approval policy of action of MODIFY_SUBCRIPTION for service
offering with id 8a81818f3d4251ed013d427c75e127c3</messages>
<messages>Failed to set approval policy for service offering with id 12345. Th e service offering is not found. </messages> </messageList>

List subscriptions in the catalog

Deprecation Notice
The GET/catalog/<catalog_id>/subscription URI has been deprecated. Use URI /user/mysubscription instead as using the deprecated URI will not allow viewing subscriptions created by users who previously had access to the catalog, but no longer have access.
Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<catalog_id>/subscription
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|view]
Optional; default is base.
detail=basic
Optional; The only valid value is basic.
requestor=<user_name>
Optional; user name must be valid and must be authorized to view the request.
401 - Not authorized 500 - Server exception
Examples
The following URL was sent:
https://<host>:<port>/csa/rest/catalog/402895e33732af18013732b6f435006b/ subscription?userIdentifier=90d9652b67ss6a930135f35b327e00a0
HP Cloud Service Automation (4.10) Page 71 of 150
APIReference
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceSubscriptionList>
<count>6</count> <limit>0</limit> <ServiceSubscription>
<id>90d957ea3806fa7e013807acc79000b3</id> <iconUrl>/csa/images/library/serviceOfferingDefault58.png</iconUrl> <name>MY SR</name> <displayName>MY SR</displayName> <state>...</state> <artifactType>
<name>SUBSCRIPTION</name>
... </artifactType> <disabled>false</disabled> <serviceOffering>...</serviceOffering> <subscriptionStatus>...</subscriptionStatus> <initiatingServiceRequest>...</initiatingServiceRequest> ...
</ServiceSubscription>
...
</ServiceSubscriptionList>

Get subscription details

Details
URI
Method GET
Parameters
/catalog/<catalog_id>/subscription/<subscription_id>
Us "Catalog API" on page 44 to get the catalog ID and "List subscriptions in the
catalog" on the previous page to get the subscription ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
HP Cloud Service Automation (4.10) Page 72 of 150
APIReference
URI
Returns 200 - Ok
/catalog/<catalog_id>/subscription/<subscription_id>
Us "Catalog API" on page 44 to get the catalog ID and "List subscriptions in the
catalog" on the previous page to get the subscription ID.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
The following URL was sent:
https://<host>:<port>/csa/rest/catalog/402895e33732af18013732b6f435006b/ subscription/90d957ea3806fa7e013807acc79000b3 ?userIdentifier=90d9652b67ss6a930135f35b327e00a0
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceSubscription>
<id>90d957ea3806fa7e013807acc79000b3</id> <name>MY SR</name> <displayName>MY SR</displayName> <optionModel>...</optionModel> <serviceInstance>...</serviceInstance> <serviceOffering>...</serviceOffering> <subscriptionStatus>...</subscriptionStatus> <initiatingServiceRequest>...</initiatingServiceRequest> <basePrice xsi:type="recurrentPricingVO">...</basePrice> <basePrice xsi:type="initialPricingVO">...</basePrice> <totalPrice xsi:type="recurrentPricingVO">...</totalPrice> <totalPrice xsi:type="initialPricingVO">...</totalPrice> <pricingModel>...</pricingModel> <associatedRequest>
<id>90e396c83a4cfd80013a4d06e29702bc</id>
<name>Test Modify subscription</name> </associatedRequest> <associatedRequest>
<id>90e396c83a4cfd80013a4d017e740003</id>
<name>Test2 Modify subscription</name> </associatedRequest> ...
</ServiceSubscription>
HP Cloud Service Automation (4.10) Page 73 of 150
APIReference

List instances in the catalog

Deprecation Notice
The GET/catalog/<catalog_id>/instance URI has been deprecated. Use URI /user/myinstance instead as using the deprecated URI will not allow viewinginstances created by users who previously had access to the catalog, but no longer have access.
Details
URI
Method GET
Parameters
Returns 200 - Ok
Examples
/catalog/<catalog_id>/instance
Use "List catalogs" on page 47 to get the catalog ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|view]
Optional; default is base.
detail=basic
Optional; The only valid value is basic.
requestor=<user_name>
Optional; user name must be valid and must be authorized to view the request.
401 - Not authorized 500 - Server exception
The following URL was sent:
https://<host>:<port>/csa/rest/catalog/402895e33732af18013732b6f435006b/ instance?userIdentifier=90d9652b67ss6a930135f35b327e00a0
The following XML was returned:
<ServiceInstanceList>
<count>6</count> <limit>0</limit> <ServiceInstance>
<id>90d957ea3806fa7e01380f957d11070a</id> <name>MYSD_June 5, 2012 5:19:51 PM UTC</name>
HP Cloud Service Automation (4.10) Page 74 of 150
APIReference
<displayName>MYSD</displayName> <state></state> <serviceInstanceState>...</serviceInstanceState>
... </ServiceInstance> ...
<ServiceInstanceList>

Get instance details

Details
URI
Method GET
Parameters
Returns 200 - Ok
/catalog/<catalog_id>/instance/<instance_id>
Use "Catalog API" on page 44 to get the catalog ID and "List instances in the
catalog" on the previous page to get the instance ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
401 - Not authorized 404 - Not found 500 - Server exception

Retire an approval

Details
URI
Method DELETE
HP Cloud Service Automation (4.10) Page 75 of 150
/catalog/<catalog_idid>/approval/<approval_id>
APIReference
URI
Parameters
Returns 200 - Ok
Caution: The approval is retired regardless of whether it was rejected or approved.
/catalog/<catalog_idid>/approval/<approval_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception

Get resource subscription details

Details
URI
/catalog/<catalog_id>/resourceSubscription/<resource_subscription_ id>
Method GET
Parameters
Returns 200 - Ok
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
scope=[base|baseplusone|subtree]
Optional; default is base. If value is base, then the object is returned. If value is baseplusone, then the object and its first level children are returned. If value is subtree, then the object and all of its descendants are returned.
detail=[required|basic|standard|template|full]
Optional; default is full. See "Values for the detail parameter" on page 147. Some API calls do not support all possible values for this parameter.
401 - Not authorized 500 - Server exception
HP Cloud Service Automation (4.10) Page 76 of 150

Chapter 4: Export API

Description
Use this API to export a supported artifact as a content archive.Supported artifacts include resource environments, resource offerings, service designs, service offerings, and catalogs.
Base URL
https://<host>:<port>/csa/rest
Details
URI
/export/<artifact_id>
Method GET
Parameters
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
Returns 200 - Ok
401 - Bad request 404 - Not found 500 - Server exception
Note that the directory the archive will be downloaded to is defined by the REST client or browser in use.
Artifact archives are structured as following.
l Resource environment archive contains:
n Resource environment XML n Manifest XML
l Resource offering archive contains:
n Resource offering XML n Icons used for customizing resource offering n Manifest.XML
l Service design archive contains:
n Service design XML n Resource offering XMLs n Icons used for customizing resource offerings and service design n Dynamic option JSP files n Manifest XML
HP Cloud Service Automation (4.10) Page 77 of 150
APIReference
l Service offing archive contains:
n Service offering XML n Service design XML n Resource offering XMLs n Icons used for customizing service offering, service design, and resource offerings n Dynamic option JSP files n Manifest XML
l Catalog archive contains:
n Catalog XML n Service offering XMLs n Service design XMLs n Resource offering XMLs n Resource environment XMLs n Icons used for customizing catalog, service offerings, service designs, and resource
offerings
n Dynamic option JSP files n Manifest XML
l Component palette archive contains:
n Component palette XML n Service component type XMLs n Service component template XMLs n Resource offering type XMLs n Artifact relationship XMLs n Icon used for customizing component palette, service component types and templates n Manifest XML
Example
The following URL was sent to export a catalog:
https://<host>:<port>/csa/rest/export/8a81818f3d02fb7e013d0308894a0004 ?userIdentifier=90d96588360da0c701360da0f1d5f483
The following response headers were returned, and include the name of the downloaded archive zip file, CATALOG_QA_Org_Catalog_8a81818f3d02fb7e013d0308894a0004.zip:
Status Code: 200 OK Cache-Control: must-revalidate, post-check=0, pre-check=0 Content-Disposition: attachment;filename="CATALOG_QA_Org_Catalog_8a81818f3d02fb7 e013d0308894a0004" Content-Type: application/zip;charset=UTF-8 Date: Tue, 26 Feb 2013 00:09:36 GMT Expires: 0 Pragma: public Server: Apache-Coyote/1.1 Transfer-Encoding: chunked content-transfer-encoding: binary
HP Cloud Service Automation (4.10) Page 78 of 150

Chapter 5: Import API

Description
Use this API to import artifacts from a CSAcontent archive.CSA archives are created via the export REST API, the content archive tool, or the CSA management console. The import operation imports the primary artifact and all associated artifacts.
Base URL
https://<host>:<port>/csa/rest
Details
URI
Method POST
/import
HP Cloud Service Automation (4.10) Page 79 of 150
APIReference
URI
Parameters
/import
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
file=<multipart_representation_of_service_offering_zip_file>
Required; type 'Multipart/Form-Data' CSA archive zip to be imported. Note that the directorythe file will be imported from is defined by the REST client or browser in use. Typically the file parameter will not include a directory path.
update=[true|false]
Optional; default is false. If true,any existingartifacts of the same type and with the same name will be overwritten; otherwise the artifactsare created.Cannot be used withupdatePreserveExisting parameter.
updatePreserveExisting=[true|false]
Optional; default is false.If true, any existingartifacts of the same type with the same name will be preserved (not overwritten) and renamed. Existing references to these artifactswill automatically use the renamed artifacts. New artifacts are created from the archive. Cannot be used withupdate parameter.
orgForCatalogImport=<organization_name>
Required for import of catalog archive; the name of the organization to be used when creating the imported catalog.
associateProviders=[true|false]
Optional; default is false. If true,resource providers in the archive are bound to existing resource offerings and resource environments of the same provider type and display name in the database.
validateType=[COMPONENT_PALETTE|CATALOG|SERVICE_OFFERING|SERVICE_ BLUEPRINT|RESOURCE_OFFERING|RESOURCE_ENVIRONMENT]
Optional; if specified,content archive is verified to be of the specified type. ||
Returns 200 -Updated
400 - Bad request 404 - Not found 500 - Server exception
Caution: Component palette import isan update operation, and so associateProviders and updatePreserveExisting parameters will be ignored.
The following headers must be set when using this API to upload the content archive:
l Content-type: multipart/form-data l Content-Disposition: form-data; name="file"
HP Cloud Service Automation (4.10) Page 80 of 150
APIReference
l Content-Type: application/octet-stream
Example
The following URL was sent to import the contents of thespecified archive.
https://<host>:<port>/csa/rest/import?userIdentifier=90d96588360da0c701360da0f1d 5f483&update=true&file=SERVICE_OFFERING_SO_ONE_ 90cec2ff3c81b896013c81b8c1780097.zip
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ImportOperationResult>
<additionalSummaryMessages>
Service offering SO ONE imported successfully. (Id=90cec2ff3dc1d73b013dc1df0
b750028)
</additionalSummaryMessages> <additionalSummaryMessages>
Service design SD ONE imported successfully. (Id=90cec2ff3dc1d73b013dc1df09d
b0018)
</additionalSummaryMessages> <importResultRecord>
ea933ec5-ad7b-42b6-b47c-965ff76f7693 </importResultRecord> <importStatus>SUCCESS</importStatus> <importSummary>
Import of Service offering archive successful. </importSummary>
</ImportOperationResult>
HP Cloud Service Automation (4.10) Page 81 of 150

Chapter 6: Importzip API

Deprecation Notice

The GET /importzip API has been deprecated. Use/import instead as using the deprecated API will not include new functionality.
Description
Use this API to import an artifact from a CSA artifact archive.CSA archives are created via the export REST API, the content archive tool, or the CSA management console.The import operation imports the primary artifact and all associated artifacts.
Base URL
https://<host>:<port>/csa/rest
Details
URI
Method POST
/importzip
HP Cloud Service Automation (4.10) Page 82 of 150
APIReference
Parameters
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
file=<file_name>
Required; multipart CSA archive zip to be imported. Note that the directorythe file will be imported from is defined by the REST client or browser in use. Typically the file parameter will not include a directory path.
forceCreation=[true|false]
Optional; default is false.If true, any existingartifacts of the same type with the same name will be preserved (not overwritten) and renamed. Existing references to these artifactswill automatically use the renamed artifacts.New artifacts are created from the archive. Cannot be used withupdate parameter.
Caution: Producessame results as updatePreserveExisting.Allows for backward compatibility.
update=[true|false]
Optional; default is false. If true, any existingartifacts of the same type and with the same name will be overwritten; otherwise the artifactsare created.Cannot be used withupdatePreserveExisting parameter.
updatePreserveExisting=[true|false]
Optional; default is false.If true, any existingartifacts of the same type with the same name will be preserved (not overwritten) and renamed. Existing references to these artifactswill automatically use the renamed artifacts. New artifacts are created from the archive. Cannot be used withupdate parameter.
orgForCatalogImport=<organization_name>
Required for import of catalog archive; the name of the organization to be used when creating the imported catalog.
associateProviders=[true|false]
Optional; default is false. If true, resource providers in the archive are bound to existing resource offerings and resource environments of the same provider type and display name in the database.
validateType=[COMPONENT_PALETTE | CATALOG | SERVICE_OFFERING | SERVICE_DESIGN | RESOURCE_OFFERING | RESOURCE_ENVIRONMENT]
Optional; if specified, content archive is verified to be of the specified type.
Returns 200 -Updated
400 - Bad request 404 - Not found 500 - Server exception
Caution: Component palette import isan update operation, and so associateProviders and
HP Cloud Service Automation (4.10) Page 83 of 150
APIReference
updatePreserveExisting parameters will be ignored.
The following headers must be set when using this API to upload the content archive:
l Content-type: multipart/form-data l Content-Disposition: form-data; name="file" l Content-Type: application/octet-stream
Example
The following URL was sent:
https://localhost:8444/csa/rest/importzip
?userIdentifier=90d96588360da0c701360da0f1d5f483&file= SERVICE_DESIGN_Simple_Compute_Linux_90cec2023cc75f8a013cc7643ad00034.zip
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<importMessageList>
<messages>Service design Simple Compute Linux imported successfully.
(Id=90cec2ff3dd11298013dd1139eb7004f)</messages>
<messages>Resource offering SA Offering imported successfully.
(Id=90cec2ff3dd11298013dd113992d000d)</messages>
<messages>Resource offering uCMDB Offering imported successfully.
(Id=90cec2ff3dd11298013dd113977d0008)</messages>
<messages>Resource offering vCenter Offering imported successfully.
(Id=90cec2ff3dd11298013dd1139a4f0016)</messages>
</importMessageList>
HP Cloud Service Automation (4.10) Page 84 of 150

Chapter 7: Import_result API

Use this API to view detailed result informationfrom importing a content archive. See "Import API"
on page 79 fordetails on importing a content archive.
Base URL
https://<host>:<port>/csa/rest
Details
URI
Method GET
Parameters
Returns 200- Ok
/import_result/<importResultRecord_id>
importResultRecord IDs are returned by the "Import API" on page 79"Import
API" on page 79
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
format=HTML
Optional; returns results as HTML rather than the default XML
400 - Bad request 404 - Not found 500 - Server exception
Example
The following URL was sent:
https://<host>:<port>/csa/rest/import_result/ea933ec5-ad7b-42b6-b47c-965ff76f769 3
?userIdentifier=90d96588360da0c701360da0f1d5f483
The following XML was returned:
<ImportResult>
<importResultLogEntry>
<limit>0</limit> <artifactDescription>SO ONE</artifactDescription> <artifactDisplayName>SO ONE</artifactDisplayName> <artifactName>
SO_ONE_February 11, 2013 7:08:05 PM UTC </artifactName> <artifactType>SERVICE_OFFERING</artifactType>
HP Cloud Service Automation (4.10) Page 85 of 150
APIReference
<importOperation>Error</importOperation>
</importResultLogEntry> <importResultLogEntry>
<artifactDescription>SD ONE</artifactDescription> <artifactDisplayName>SD ONE</artifactDisplayName> <artifactName>SD_ONE_February 11, 2013 7:03:41 PM UTC</artifactName> <artifactType>SERVICE_BLUEPRINT</artifactType> <importOperation>Error</importOperation>
</importResultLogEntry> <importSummary>
Import of Service offering archive successful.
</importSummary> <status>SUCCESS</status> <timeOfImport>March 31, 2013 7:19:01 PM UTC</timeOfImport> <userInformation>admin</userInformation>
</ImportResult
HP Cloud Service Automation (4.10) Page 86 of 150

Chapter 8: Lifecycle engine API

Description
Use this API to work with lifecycle actions.Base URL
Base URL
https://<host>:<port>/csa/rest
URIs
The following URIs are appended to the base URL:
URI Method Parameters Description
/lifecycleengine GET userIdentifier,
serviceInstanceId
/lifecycleengine/<lifecycle_ action_id>
/lifecycleengine/execute POST userIdentifier "Schedule lifecycle transition for
GET userIdentifer "Get details for a lifecycle execution
"Get latest lifecycle execution record for a service instance" on page 89
record" below
service instance" on page 89

Get details for a lifecycle execution record

Details
URI
Method GET
Parameters
Returns 200 - Ok
/lifecycleengine/<lifecycle_action_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
Use the following URL:
HP Cloud Service Automation (4.10) Page 87 of 150
APIReference
https://<host>:<port>/csa/rest/lifecycleengine/90d96588360da0c701360da0f25400c2 ?userIdentifier=90s96588670da0c701360da0f1d540a1
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LifecycleExecutionRecord>
<callbackPending>false</callbackPending> <executionState>
<id>90d96588360da0c701360da0f25400c2</id> <objectId>90d96588360da0c701360da0f25400c2</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>READY</name> <disabled>false</disabled> <categoryType>
<id>90d96588360da0c701360da0f25200c1</id> <objectId>90d96588360da0c701360da0f25200c1</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>LIFECYCLE_EXECUTION_STATE</name> <extensible>false</extensible>
</categoryType> </executionState> <reverse>false</reverse> <serviceInstance>
<id>90d96588372d758101372d75aeb90087</id>
<objectId>90d96588372d758101372d75aeb90087</objectId>
<isCriticalSystemObject>false</isCriticalSystemObject>
<disabled>false</disabled> </serviceInstance> <targetState>
<id>90d96588360da0c701360da0f23700bb</id>
<objectId>90d96588360da0c701360da0f23700bb</objectId>
<isCriticalSystemObject>true</isCriticalSystemObject>
<name>DEPLOYED</name>
<disabled>false</disabled>
<categoryType>
<id>90d96588360da0c701360da0f21300ae</id> <objectId>90d96588360da0c701360da0f21300ae</objectId> <isCriticalSystemObject>true</isCriticalSystemObject> <name>LIFECYCLE_STATE</name> <extensible>false</extensible>
</categoryType> </targetState>
</LifecycleExecutionRecord>
HP Cloud Service Automation (4.10) Page 88 of 150
APIReference

Get latest lifecycle execution record for a service instance

Details
URI
Method GET
Parameters
Returns 200 - Ok
/lifecycleengine
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
serviceInstanceId=<service_instance_id>
Required; the ID of the service instance.
401 - Not authorized 404 - Not found 500 - Server exception

Schedule lifecycle transition for service instance

Details
URI
Method POST
/lifecycleengine/execute
Parameters
Returns 200 - Ok
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 404 - Not found 500 - Server exception
Examples
Use the following URL:
https://<host>:<port>/csa/rest/lifecycleengine/execute ?userIdentifier=90s96588670da0c701360da0f1d540a1
The following XML was sent in the request:
HP Cloud Service Automation (4.10) Page 89 of 150
APIReference
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <LifecycleExecutionRequest>
<reverse>false</reverse> <serviceComponentId>90d96588372d758101372d75aebb009f</serviceComponentId> <serviceInstanceId>90d96588372d758101372d75aeb90087</serviceInstanceId> <targetStateName>DEPLOYED</targetStateName>
</LifecycleExecutionRequest>
HP Cloud Service Automation (4.10) Page 90 of 150

Chapter 9: Login API

Description
Use this API to provide credentials for CSA REST APIs.
Base URL
https://<host>:<port>/csa/rest

URIs

The following URIs are appended to the base URL:
URI Method Parameters Description
/login/<organization_ name>/<user_name>
/login/<organization_ name>/userLookup
See "orgInformation API" on page 117for getting an organzation's credentials.
GET none "Get userIdentifier" below
GET userName "Get userIdentifier for user name with
slash" on the next page

Get userIdentifier

Details
URI
Method GET
Returns 200 - Ok
/login/<organization_name>/<user_name>/
Where <organization_name> and <user_name> are your credentials for logging in to
HP Cloud Service Automation.
401 - Not authorized 500 - Server exception
Note: Unlike most API calls, the arguments (organization name and user name) are part of the URL path rather than parameters.
Caution: If the trailing slash is not included, a portion of the user name might be truncated
HP Cloud Service Automation (4.10) Page 91 of 150
APIReference
when the user name includes non-alphanumeric characters. A best practice is to always include a trailing slash.
Example
To get the userIdentifier, we used the following URL:
https://<host>:<port>/csa/rest/login/MyOrganization/admin/
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <person>
<id>90s96588670da0c701360da0f1d540a1</id> <!-- This is userIdentifier --> ... <!-- Remaining XML is not relevant for this example. -->
</person>
The value for userIdentifier is the first <id> value returned in the XML.

Get userIdentifier for user name with slash

Details
URI
Method GET
Parameters
Returns 200 - Ok
Example
To get the userIdentifier, we used the following URL:
https://<host>:<port>/csa/rest/login/MyOrganization/userLookup ?userName=admin/domain
/login/<organization_name>/userLookup
userName=<user_name>
Required; the user name you want to use as credentials for CSA.
401 - Not authorized 404 - Not found 500 - Server exception
The following XML was returned in the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <person>
<id>90s96588670da0c701360da0f1d540a1</id> <!-- This is userIdentifier --> ... <!-- Remaining XML is not relevant for this example. -->
</person>
HP Cloud Service Automation (4.10) Page 92 of 150
APIReference
The value for userIdentifier is the first <id> value returned in the XML.
HP Cloud Service Automation (4.10) Page 93 of 150

Chapter 10: Notification API

Description
Use this API to retrieve the notification objects associated with<party_id>, or to send a notification to users or organizations.
Base URL
https://<host>:<port>/csa/rest

URIs

The following URIs are appended to the base URL:
URI Method Parameters Description
/notification/party/<party_ id>
/notification/party POST userIdentifier "Send notification" on page 96
GET userIdentifier,
maxResults
"View list of notification objects" below

View list of notification objects

Details
URI
Method GET
Parameters
/notification/party/<party_id>
Where the party ID is the UUID of a person, organization, or group. See How to find a party ID.
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
maxResults=<n>
Optional; wherenis the number of notification objects to return. Notification objects are ordered by createdOn date with most recent first. By default all notification objects will be returned.
HP Cloud Service Automation (4.10) Page 94 of 150
APIReference
URI
Returns 200 - Ok
/notification/party/<party_id>
Where the party ID is the UUID of a person, organization, or group. See How to find a party ID.
401 - Not authorized 500 - Server exception
Examples
The following URL was sent:
https://<host>:<port>/csa/rest/notification/party/BFA0DB53DA414B90E04059106D1A24 B5 ?userIdentifier=BFA0DB53DA414B90E04059106D1A24B5
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <NotificationList>
<notification>
<notifContentBody>Your service subscription for {0} is now active. To vi ew the details or make modifications, go to the {1} and click the Subscriptions tab.</notifContentBody>
<notifSubject>Your subscription is now active</notifSubject>
<notifactionId>90d957ea3806fa7e01380f95d38d073a</notifactionId>
<recepientId>BFA0DB53DA414B90E04059106D1A24B5</recepientId>
<recepientName>consumer</recepientName>
<senderContextArtifactName>CSA_CONSUMER</senderContextArtifactName>
<senderContextArtifactTypeName>ORGANIZATION</senderContextArtifactTypeNa me>
<tokens><tokenSequence>0</tokenSequence><value>my request</value></token s>
<tokens><tokenSequence>1</tokenSequence><value>CSA Consumer</value></tok ens>
...
</notification> ...
</NotificationList>

Send notification

Details
URI
Method POST
HP Cloud Service Automation (4.10) Page 95 of 150
/notification/party/<party_id>
APIReference
URI
Parameters
Returns 200 - Ok
/notification/party/<party_id>
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. This user should be a consumer user who has the necessary permissions for the data you want to work with. See "Get userIdentifier" on page 91 for the steps required to get the userIdentifier value.
401 - Not authorized 500 - Server exception
Request body format
<Notification>
<subject>Notification Subject goes in here</subject> <contentBody>Enter any text here, optionally including tokens: token0 = {0}.
Token1 = {1}</contentBody>
<!-- Each recipient must have an id and type. Only PERSON and ORGANIZATION a re valid types. Notifications will be sent to valid recipients and an error mess age returned for the invalid ones. Response code 200 OK will be returned if ther e is at least one valid recipient.
-->
<recipient>
<id>UUID of the recipient</id>
<type>PERSON</type> </recipient> <recipient>
<id>UUID of organization</id>
<type>ORGANIZATION</type> </recipient> <!-- tokens must be specified if your contentBody contains tokens. No token
validation is done.
-->
<tokens>
<tokenSequence>0</tokenSequence>
<value>Token 0 content</value> </tokens> <tokens>
<tokenSequence>1</tokenSequence>
<value>Token 1 content</value> </tokens>
</Notification>
Examples
The following URL was sent:
HP Cloud Service Automation (4.10) Page 96 of 150
APIReference
https://<host>:<port>/csa/rest/notification/party?userIdentifier=90cec3a03a93ef8 9013a93f07b880001
The following XML was sent in the request (note that the second recipient.id is bad):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Notification>
<subject>Test Subject</subject> <contentBody>Test content body, token0 = {0}. Token1 = {1}</contentBody> <recipient>
<id>90cec3a03a93ef89013a93f07b880001</id>
<type>PERSON</type> </recipient> <recipient>
<id>bad org id</id>
<type>ORGANIZATION</type> </recipient>
<tokens>
<tokenSequence>0</tokenSequence>
<value>Token 0 test content</value> </tokens> <tokens>
<tokenSequence>1</tokenSequence>
<value>Token 1 test content</value> </tokens>
</Notification>
The following response header status code was returned: 200 OK
The following XML was returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <NotificationPostResponse>
<count>1</count> <errorMessage>Please enter a valid value for the recipient user id = bad org
id</errorMessage>
<notification>
<notifContentBody>Test content body, token0 = {0}. Token1 = {1}</notifCo
ntentBody>
<notifCreatedOn>2012-11-14T10:25:06.021-07:00</notifCreatedOn>
<notifSubject>Test Subject</notifSubject>
<notifactionId>90cec39c3ae64d82013afff3e9c3002c</notifactionId>
</recepientArtifactTypeId>
90d96588360da0c701360da0ef03002c </recepientArtifactTypeId> <recepientArtifactTypeName>PERSON</recepientArtifactTypeName> <recepientEmailAddr>
acctgconsumer@econ-csa.com </recepientEmailAddr> <recepientId>90cec3a03a93ef89013a93f07b880001</recepientId> <recepientName>acctgconsumer</recepientName> <senderContextArtifactId>
HP Cloud Service Automation (4.10) Page 97 of 150
APIReference
90cec3a03a93ef89013a93f07b880001 </senderContextArtifactId> <senderContextArtifactTypeId>
90d96588360da0c701360da0ef03002c </senderContextArtifactTypeId> <senderContextArtifactTypeName>
PERSON </senderContextArtifactTypeName> <source>EXTERNAL</source> <tokens>
<tokenSequence>1</tokenSequence>
<value>Token 1 test content</value> </tokens> <tokens>
<tokenSequence>0</tokenSequence>
<value>Token 0 test content</value> </tokens>
</notification>
</NotificationPostResponse>
HP Cloud Service Automation (4.10) Page 98 of 150

Chapter 11: Organization API

Description
Use this API to view HP CSA organizations.
Base URL
https://<host>:<port>/csa/rest

URIs

The following URIs are appended to the base URL:
URI Method Parameters Description
/organization GET userIdentifier,
scope, detail
/organization/<organization_ id>
/organization/<organization_ id>/approvalPolicy
/organization/<organization_ id>/approvalPolicy
/organization/<organization_ id>/approvalPolicy/<policy_ id>
/organization/<organization_ id>/approvalPolicy/<policy_ id>
/organization/accessPoint GET orgName "Retrieve organization LDAP
GET userIdentifier,
scope, detail
GET userIdentifer "List organization's approval
POST userIdentifer "Create approval policy" on page
PUT userIdentifer "Update approval policy" on
DELETE userIdentifer "Delete approval policy" on page
"View a list of organizations" on the next page
Note: The user identified by userIdentifier must have admin access.
"View an organization" on page 102
policies" on page 105
107
page 110
112
access point information" on page 113
/organization/offering PUT userIdentifier,
queryType, newReleases
HP Cloud Service Automation (4.10) Page 99 of 150
"List most requested, recently requested, or new offerings" on page 114
APIReference

View a list of organizations

Details
URI
Method GET
Parameters
Returns 200 - Ok
/organization/
userIdentifier=<user_id>
Required; the user ID you want to use as credentials for this API call. See "Get
userIdentifier" on page 91 for the steps required to get the userIdentifier value.
Note: The user identified by userIdentifier must have admin access.
scope=base
Optional; the only valid value is base.
detail=basic
Optional; The only valid value is basic.
401 - Not authorized 500 - Server exception
Example
The following URL was sent:
https://localhost:8444/csa/rest/organization/ ?userIdentifier=90d96588360da0c701360da0f1d5f483&scope=base&detail=basic
The following XML was returned:
<OrganizationList>
<count>3</count>
<limit>0</limit> <organization>
<id>8a8181853810699a0138106dcdd00003</id> <objectId>8a8181853810699a0138106dcdd00003</objectId> <createdOn>2012-06-21T12:03:47.920-07:00</createdOn> <updatedOn>2012-06-21T12:04:10.597-07:00</updatedOn> <isCriticalSystemObject>false</isCriticalSystemObject> <description>desc - CSA organization</description> <iconUrl>/csa/images/library/Earth_48.png</iconUrl> <name>CSA</name> <displayName>CSA</displayName> <state>
<id>90d96588360da0c701360da0ef470038</id>
HP Cloud Service Automation (4.10) Page 100 of 150
Loading...