The only warranties for HP products andservices are set forth in the express warr anty statements accompanyingsuch products andservices. Nothingherein should be
construedas constitutingan additional warranty. HP shall not be l iable for technical or editorial errors or omissi ons contained herein.
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.
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:
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
Contents3
HP CSA 4.x API Reference Introduction8
Chapter 1: Artifact API9
URIs9
Artifact9
Group9
ResourceProvider10
Service Offering10
Artifact types10
Create an artifact11
View an artifact12
Update an artifact14
Delete an artifact17
Retrieve a predefined view for an artifact17
Retrieve resolved properties for an artifact19
List active groups associated with an organization22
Add groups to an organization23
Update group display name, distinguished name25
Delete or disassociate group from an organization26
List resource providers27
Add document to service offering28
Delete document from service offering30
Update document in service offering31
Publish service offerings to catalog31
Unpublish service offerings from catalog33
Retrieve artifact state and status35
Artifact views36
Chapter 2: Availablevalues API42
Chapter 3: Catalog API44
HP Cloud Service Automation (4.10)Page 3 of 150
APIReference
Contents
URIs44
Catalog44
Category44
Offering44
Request45
Approval45
Approval policy46
Subscription46
Resource Subscription46
Instance46
List catalogs47
Get catalog details49
Create catalog categories50
Update catalog categories52
Delete catalog category53
List offerings in the catalog54
Get offering details55
List requests in the catalog56
Deprecation Notice56
Submit a request58
Get request details60
Cancel a request63
Retire a request63
List approvals in the catalog64
Deprecation Notice64
Get approval details65
Update approval decision using an external approval system65
Update approval decision using CSA approval process66
Update catalog approval policies68
Update service offerings approval policy69
List subscriptions in the catalog71
HP Cloud Service Automation (4.10)Page 4 of 150
APIReference
Contents
Chapter 4: Export API77
Chapter 5: Import API79
Chapter 6: Importzip API82
Deprecation Notice71
Get subscription details72
List instances in the catalog74
Deprecation Notice74
Get instance details75
Retire an approval75
Get resource subscription details76
Deprecation Notice82
Chapter 7: Import_result API85
Chapter 8: Lifecycle engine API87
Get details for a lifecycle execution record87
Get latest lifecycle execution record for a service instance89
Schedule lifecycle transition for service instance89
Chapter 9: Login API91
URIs91
Get userIdentifier91
Get userIdentifier for user name with slash92
Chapter 10: Notification API94
URIs94
View list of notification objects94
Send notification96
Chapter 11: Organization API99
URIs99
View a list of organizations100
View an organization102
List organization's approval policies105
Create approval policy107
Update approval policy110
HP Cloud Service Automation (4.10)Page 5 of 150
APIReference
Contents
Chapter 12: orgInformation API117
Chapter 13: Processinstances API118
Delete approval policy112
Retrieve organization LDAP access point information113
List most requested, recently requested, or new offerings114
URIs118
Process Instance structure118
Retrieve a process instance119
Create a process instance121
Update a process instance122
Execute a process instance125
Chapter 14: Search API126
Chapter 15: User API127
URIs127
Request127
Approval127
Subscription128
Instance129
List service requests for subscription129
List active requests for user130
Get count of requests for user132
Cancel multiple service requests133
Delete multiple service requests134
List approvals for approver136
Get count of approvals for user137
Delete multiple approval requests137
List subscriptions for user138
Get count of subscriptions for user140
Get list of recent or expiring soon subscriptions for user141
Delete multiple subscriptions141
List instances for user143
HP Cloud Service Automation (4.10)Page 6 of 150
APIReference
Contents
Chapter 16: Utilization API145
Chapter 17: Values for the detail parameter147
Chapter 18: Values for the scope parameter148
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 HPCloud Service Automation API Quick Start for information on communication with CSA
using RESTful calls.
Caution: This document includes information only on the RESTAPIs introduced in CSA 3.x,
and that are still available in CSA 4.x. Information on RESTAPIs 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
URIMethodParametersDescription
/artifactPOSTuserIdentifier"Create an artifact" on page 11
/artifact/<artifact_id>GETuserIdentifier,
scope, detail, view
/artifact/<artifact_id>PUTuserIdentifier,
scope, view
/artifact/<artifact_id>DELETE userIdentifier"Delete an artifact" on page 17
/artifact/fastview/<artifact_
id>
/artifact/<artifact_
id>/resolveProperties
GETuserIdentifier,view"Retrieve a predefined view for
GETuserIdentifier,
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
URIMethodParametersDescription
/artifact/<organization_
id>/group
/artifact/<organization_
id>/group
GETuserIdentifier "List active groups associated with
an organization" on page 22
POSTuserIdentifier "Add groups to an organization" on
page 23
HP Cloud Service Automation (4.10)Page 9 of 150
APIReference
URIMethodParametersDescription
/artifact/<organization_
id>/group/<grou_id>
/artifact/<organization_
id>/group/<group_id>
PUTuserIdentifier "Update group display name,
distinguished name" on page 25
DELETE userIdentifier "Delete or disassociate group from an
organization" on page 26
ResourceProvider
URIMethodParametersDescription
/artifactGETuserIdentifier, artifactType"List resource providers" on page 27
/artifact/<catalog_id>/publishPOSTuserIdentifier "Publish service offerings to
/artifact/<catalog_id>/unpublishPOSTuserIdentifier "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.
POSTuserIdentifier "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 typeGETPOSTPUTDELETE
Approval processX
HP Cloud Service Automation (4.10)Page 10 of 150
APIReference
Artifact typeGETPOSTPUTDELETE
Approval templateX
ApproverX
CatalogXXXX
DocumentXXX
GroupX
Named approver approval templateX
OrganizationXXXX
PersonX
Resource bindingXX
Resource environmentX
Resource offeringXXX
Resource poolXXXX
Resource providerXXXX
Resource subscriptionXX
Service componentXXXX
Service blueprintXXXX
Service instanceXX
Service offeringXXXX
Service requestX
SubscriptionX
Create an artifact
Details
URI
MethodPOST
HP Cloud Service Automation (4.10)Page 11 of 150
/artifact
APIReference
URI
Parameters
Returns200 - 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
MethodGET
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.
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 themerge 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 fora
specificpropertye.g., _property_values_action_=merge.
Returns200 - Ok
401 - Not authorized
404 - Not found
500 - Server exception
Note: To completely update the artifact, i.e., replace the persistent artifact, do notuse the view
or merge parameters andinclude all artifact content in the request body. Note that if only a
portion of the artifiact contentis 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 36for 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
APIReference
This example shows how to change the finalize flag of a component using the view parameter.
The following URL was sent:
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:
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 typeDetails
Resource
provider
Service designCan 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 ina 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 12API be used. Performance intensive
applications might stillchoose to use the following API.
HP Cloud Service Automation (4.10)Page 17 of 150
APIReference
Details
URI
MethodGET
Parameters
Returns200 - 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 theID of any artifact that has an accesspoint.
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.
A propertycan have a source binding configuredthat indicates its value is to be retrieved from a
property on another artifact. The REST API discussed here provides a mechanism toretrieve 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
APIReference
There are two approaches to retrieving resolved properties:
l Retrieve all properties
l Retrieve a single named property
Details
URI
MethodGET
Parameters
Returns200 - 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:
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
MethodDELETE
Parameters
Returns200 - 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
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:
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
APIReference
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())
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
<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
APIReference
Retrieve artifact state and status
Details
URI
/artifact/state/<artifact_id>
MethodGET
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
Returns200 - 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
APIReference
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
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
APIReference
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.
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
APIReference
View namePropertiesDescription
artifactinfostate.name
artifactType.name
disabled
ownedBy.name
basicinfoid
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.
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.
APIReference
View namePropertiesDescription
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
MethodPOST
Parameters
Request
Body
Returns200 - 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.
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.
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.
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
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.
APIReference
URI
/catalog/<catalog_id>/category
Returns200 - 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 descriptionare 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:
<id>8a81818f3d02fb7e013d0308894a0004</id>
<isCriticalSystemObject>false</isCriticalSystemObject>
<description>Default catalog for the organization.</description>
<iconUrl>
<displayName>Changing first example category name</displayName>
<iconUrl>/catalog/category/x.png</iconUrl>
<description>New description for first example category</description>
<id>8a81818f3d02fb7e013d0308894a0004</id>
<isCriticalSystemObject>false</isCriticalSystemObject>
<description>Default catalog for the organization.</description>
<iconUrl>
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
MethodGET
Parameters
Returns200 - 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):
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
APIReference
URI
Parameters
Returns200 - 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
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
APIReference
Details
URI
MethodGET
Parameters
Returns200 - 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.
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 "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
APIReference
URI
Parameters
Returns201 - 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
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.
MethodDELETE
Parameters
Returns200 - 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
APIReference
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
MethodGET
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.
Returns200 - Ok
401 - Not authorized
500 - Server exception
HP Cloud Service Automation (4.10)Page 64 of 150
APIReference
Get approval details
Details
URI
MethodGET
Parameters
Returns200 - 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
MethodPUT
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.
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:
<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
MethodGET
Parameters
Returns200 - 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.
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.
The GET/catalog/<catalog_id>/instance URI has been deprecated. Use URI /user/myinstance
instead as using the deprecated URI will not allow viewinginstances created by users who
previously had access to the catalog, but no longer have access.
Details
URI
MethodGET
Parameters
Returns200 - 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.
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
MethodDELETE
HP Cloud Service Automation (4.10)Page 75 of 150
/catalog/<catalog_idid>/approval/<approval_id>
APIReference
URI
Parameters
Returns200 - 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
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>
MethodGET
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.
Returns200 - 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
APIReference
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
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 CSAcontent 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
MethodPOST
/import
HP Cloud Service Automation (4.10)Page 79 of 150
APIReference
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.
Required; type 'Multipart/Form-Data' CSA archive zip to be imported. Note that
the directorythe 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 existingartifacts of the same type and with
the same name will be overwritten; otherwise the artifactsare created.Cannot be
used withupdatePreserveExisting parameter.
updatePreserveExisting=[true|false]
Optional; default is false.If true, any existingartifacts of the same type with the
same name will be preserved (not overwritten) and renamed. Existing references
to these artifactswill automatically use the renamed artifacts. New artifacts are
created from the archive. Cannot be used withupdate 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.
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
MethodPOST
/importzip
HP Cloud Service Automation (4.10)Page 82 of 150
APIReference
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 directorythe
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 existingartifacts of the same type with the
same name will be preserved (not overwritten) and renamed. Existing references
to these artifactswill automatically use the renamed artifacts.New artifacts are
created from the archive. Cannot be used withupdate parameter.
Caution: Producessame results as updatePreserveExisting.Allows for
backward compatibility.
update=[true|false]
Optional; default is false. If true, any existingartifacts of the same type and with
the same name will be overwritten; otherwise the artifactsare created.Cannot be
used withupdatePreserveExisting parameter.
updatePreserveExisting=[true|false]
Optional; default is false.If true, any existingartifacts of the same type with the
same name will be preserved (not overwritten) and renamed. Existing references
to these artifactswill automatically use the renamed artifacts. New artifacts are
created from the archive. Cannot be used withupdate 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.
<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
APIReference
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:
URIMethod ParametersDescription
/notification/party/<party_
id>
/notification/partyPOSTuserIdentifier"Send notification" on page 96
GETuserIdentifier,
maxResults
"View list of notification objects"
below
View list of notification objects
Details
URI
MethodGET
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; wherenis 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
APIReference
URI
Returns200 - 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.
<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>
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