This chapter covers the REST APIs for request scheduling and user preference management.
Note:
For the SSA Plug-in release 12.1.0.9, a new framework is introduced for the REST APIs which is referred to as the v2 framework. The new framework consists of a different approach and signatures, as a result of which the REST APIs also differ when compared to the earlier framework. The earlier framework (v1) is deprecated and users are suggested to move to the v2 REST APIs and EM CLI verbs.In v2, REST APIs for the Self Service Portal application are generally used by the SSA users. These REST APIs are generally in the .../ssa/...
format. For example, /em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/
. REST APIs for administrative functions (i.e., .../admin/...
format) are REST APIs that configure the SSA Portal setup, such as creating zones, templates, etc., which are generally performed by Cloud or SSA Administrators. The SSA user REST APIs are covered in this chapter.
This chapter contains the sections listed below. The first two sections provide summaries of all the v2 and v1 REST APIs covered in this chapter, whereas the following sections provide the user preference and request scheduling resource details and their REST APIs.
The table below shows a summary of all the User preference and Request scheduling REST APIs covered in this chapter for the v2 framework.
Table 52-1 Summary of User Preference and Request Scheduling REST APIs for V2
Resource | Data Model | GET | POST | PUT | DELETE |
---|---|---|---|---|---|
Common REST Entities |
Not applicable |
Not supported |
Not supported |
Not supported |
|
Catalog |
Not applicable |
Not supported |
Not supported |
Not supported |
|
Service Types |
Not applicable |
Not supported |
Not supported |
Not supported |
|
Service Collection |
Not supported |
Not supported |
|||
Service Offering |
Not supported |
Not supported |
Not supported |
||
Request Metadata |
Not supported |
Not supported |
Not supported |
||
Service Requests |
Not supported |
Not supported |
Not supported |
||
Service Request |
Not applicable |
Not supported |
|||
Service Instances |
Not supported |
Not supported |
|||
Quota Usage |
Not applicable |
Not supported |
Not supported |
Not supported |
|
User Preferences |
Not applicable |
Not supported |
Not supported |
Not supported |
|
General User Preferences |
Not applicable |
Not supported |
Not supported |
||
Services User Preferences |
Not applicable |
Not supported |
Not supported |
Not supported |
|
Service Family User Preferences |
Not applicable |
Not supported |
Not supported |
||
Service Type User Preferences |
Not applicable |
Not supported |
Not supported |
Note:
In the table above, ”supported” indicates that the operation is supported on the resource. However, there is no example in the chapter for this operation.The table below shows a summary of all the User preference and Request scheduling REST APIs covered in this chapter for the v1 framework.
Table 52-2 Summary of User Preference and Request Scheduling REST APIs for V1
Resource | Data Model | GET | POST | PUT | DELETE |
---|---|---|---|---|---|
General Preferences |
Not supported |
Not supported |
|||
Service Preferences |
Not supported |
Supported |
Not supported |
||
Database Preferences |
Not applicable |
Not supported |
Not supported |
||
Middleware Preferences |
Not applicable |
Not supported |
Not supported |
||
Testing Preferences |
Not applicable |
Not supported |
Not supported |
||
Service Request Collection |
Not supported |
Not supported |
Not supported |
||
Service Request Entity |
Not supported |
Note:
In the table above, ”supported” indicates that the operation is supported on the resource. However, there is no example in the chapter for this operation.This section describes the common REST entities to the cloud framework resources. These entities are specific to the new Cloud Framework (CFW) v2.
Cfw resource is the base class for cloud framework resources. This resource fields that are common to all singular resources.
Table 52-3 Cfw Resource Data Model
Field | Type | Description |
---|---|---|
description |
String |
Description of the resource. |
createdOn |
String |
Date of creation. |
createdBy |
String |
Details of the creator. |
modifiedOn |
String |
Date of last modification. |
modifiedBy |
String |
Details of the modifier. |
owner |
String |
Indicates the owner of the resource. |
e-Tag |
String |
Indicates the Etag. |
lastModified |
String |
Details of the last modification. |
canonicalLink |
Cfw Link |
Indicates the canonical link of the resource. |
Cfw link is the base class for the link to a resource.
Table 52-4 Cfw Link Data Model
Field | Type | Description |
---|---|---|
href |
String |
Indicates the URI or URI template. If the value is a URI template, then the templated property should be true. |
templated |
Boolean |
Is |
rel |
String |
Indicates the name of the link relation that the consumer may lookup as a secondary key (in addition to the type property) to retrieve actual link details, e.g. |
profile |
String |
Indicates the Json-schema describing the resource expected when deferring the target resource. |
method |
String |
The method for requesting the target of the link. |
mediaType |
String |
Description of the link target. |
Cfw value descriptor defines the dynamic data.
Table 52-5 Cfw Value Descriptor Data Model
Field | Type | Description |
---|---|---|
id |
String |
Indicates the ID. |
name |
String |
Indicates the name. |
value |
String |
Indicates the value. |
defaultValue |
String |
Indicates the default value. |
description |
String |
Provides a description. |
displayName |
String |
Provides the display name. |
required |
Boolean |
Signifies if required or not. |
secret |
Boolean |
Signifies if it is a secret or not. |
type |
String |
Indicates the type. |
unitOfmeasurement |
String |
Indicates the unit of measurement. |
values |
List |
Provides the list of values. |
subvalues |
List<CfwValueDescriptor> |
Provides the list of sub-values. |
subtype |
String |
Provides the type of elements in the values. |
This section covers the Catalog APIs for SSA user.
The table below lists the supported operations for the Catalog APIs.
Table 52-6 Supported operations for Catalog APIs
Method | URI | Description |
---|---|---|
GET |
/em/websvcs/restful/extws/cloudservices/cfw/API |
Returns links to available REST API catalogs. |
GET |
/em/websvcs/restful/extws/cloudservices/cfw/API/v2 |
Returns links to REST API catalog by user type. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/API |
Returns user REST API catalog. |
This section contains examples of the Catalog APIs. The following REST API examples are covered:
The table below shows the GET configuration for viewing details of the available REST API catalogs.
Table 52-7 GET Request Configuration for Viewing Details of the Available REST API Catalogs
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/cfw/API |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "items": [ { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/cfw/API/v1", "description": "API Summary for version V1" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/cfw/API/v2", "description": "API Summary for version V2" } ], "totalResults": 2 }
The table below shows the GET configuration for viewing details of the REST API catalog by user type.
Table 52-8 GET Request Configuration for Viewing Details of the REST API Catalog by User Type
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/cfw/API/v2 |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "items": [ { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/API", "description": "APIs for Self Service Application for version V2", "type": "SSA" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/admin/cfw/v2/API", "description": "APIs for administrative functions for version V2", "type": "Admin" } ], "goBack": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/cfw/API", "totalResults": 2 }
The table below shows the GET configuration for viewing details of the user API catalog.
Table 52-9 GET Request Configuration for Viewing Details of the User API Catalog
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/API |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "items": [ { "totalResults": 5, "resource": "services", "APIs": [ { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services", "method": "GET", "description": "Get all the service offerings" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services", "method": "POST", "description": "Create a service" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{ id}", "method": "GET", "templated": true, "description": "Get details of a service" }, { "href": "https://bxx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{ id}/metadata", "method": "GET", "templated": true, "description": "Get the metadata for a service" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{ id}/metrics", "method": "PUT", "templated": true, "description": "Get the metrics for a service" } ] }, { "totalResults": 11, "resource": "userpreferences", "APIs": [ { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences", "method": "GET" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/general", "method": "GET", "description": "Get the general user preferences" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/general/metadata", "method": "GET", "description": "Get the metadata for general user preferences" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services", "method": "GET", "description": "Get the service user preferences" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services/{service-family}", "method": "GET", "templated": true, "description": "Get the user preferences for a service family" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services/{service-family}/metadata", "method": "GET", "templated": true, "description": "Get the metadata for user preference at family level" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services/{service-family}/{service-type}", "method": "GET", "templated": true, "description": "Get the user preferences for a service type" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services/{service-family}/{service-type}/metadata", "method": "GET", "templated": true, "description": "Get the metadata for user preference at service type level" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/general", "method": "PUT", "description": "Update general user preference" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services/{service-family}", "method": "PUT", "templated": true, "description": "Update family level user preferences" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userprefer ences/services/{service-family}/{service-type}", "method": "PUT", "templated": true, "description": "Update service type level user preferences" } ] }, { "totalResults": 4, "resource": "servicerequests", "APIs": [ { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicereq uests", "method": "GET", "description": "Get service requests" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicereq uests/{id}", "method": "PUT", "templated": true, "description": "Reschedule the request" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicereq uests/{id}", "method": "GET", "templated": true, "description": "Get the details of request" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicereq uests/{id}", "method": "DELETE", "templated": true, "description": "Delete the request" } ] }, { "totalResults": 5, "resource": "serviceinstances", "APIs": [ { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceins tances", "method": "GET", "description": "Get the service instances" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceins tances/{id}", "method": "GET", "templated": true, "description": "Get details of a service instance" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceins tances/{id}/actions", "method": "GET", "templated": true, "description": "Get actions for a service instance" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceins tances/{id}/actions/{action-id}", "method": "GET", "templated": true, "description": "Get metadata details of action" }, { "href": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceins tances/{id}/actions/{action-id}", "method": "PUT", "templated": true, "description": "Perform the action on the service instance" } ] } ], "goBack": "https://xx.idc.example.com:4473/em/websvcs/restful/extws/cloudservices/API", "totalResults": 4 }
This section covers the Service type REST APIs.
The Service types REST API for SSA user is as follows.
The query parameter servicefamily
can be optionally used in the GET request to filter the output for the given service family type.
The table below shows the GET configuration for viewing details of Service types.
Table 52-10 GET Request Configuration for Viewing Details of Service Types
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicetypes |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name": "Service Types", "type": "Service Types Collection", "totalResults": 3, "cfwItems": [ { "name": "CFW_SAMPLEXAAS_REMOTESERVER_SERVICE", "displayName": "Cfw Sample RemoteServer XaaS", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY", "targetTypes": [ "Cfw_Xaas_DB_Service" ] }, { "name": "CFW_SAMPLEXAAS_SERVICE", "displayName": "Cfw Sample XaaS", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY", "targetTypes": [ "Cfw_Xaas_DB_Service", "cfw_xaas_storage_service" ] }, { "name": "CFW_SAMPLEXAAS_SERVICE_FOR_NOMEM", "displayName": "Cfw Sample XaaS - Other Service", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY", "targetTypes": [ "Cfw_Xaas_DB_Service_for_nomem" ] } ], "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicetypes" }, "selfLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicetypes" } }
The Services resource is defined by the Service collection resource, Service offering resource and the Request metadata resource. These resource are explained below.
The following topics are covered in this section:
Service collection resource is an extension of the oracle.sysman.cfw.cloudAPI.common.CfwCollection resource.
Table 52-11 Service Collection Data Model
Field | Type | Description |
---|---|---|
name |
String |
Name of the collection. The value is "Services". |
type |
String |
Type of the collection. The value is "Services". |
totalResults |
Integer |
The total count of items. |
cfwItems |
List<ServiceOffering> |
Provides the list of |
canonicalLink |
Cfw link |
Indicates the canonical link. |
selfLink |
Cfw link |
Indicates the self link. |
Service offering resource is an extension of the oracle.sysman.cfw.cloudAPI.common.CfwResource resource. Service offering resource encapsulates the service offering that is available to the user using which the user can provision a service instance.
Table 52-12 Service Offering Data Model
Field | Type | Description |
---|---|---|
id |
String |
Indicates the ID of the service offering. |
name |
String |
Name of the service offering. |
displayName |
String |
Display name of the service offering. |
guid |
String |
GUID of the service offering. |
serviceType |
String |
Indicates the service type. |
serviceFamily |
String |
Indicates the service family. |
description |
String |
Description of the service offering. |
modifiedOn |
String |
Indicates the date of the modification. |
lastModified |
String |
Indicates the date of the last modification. |
meta |
String |
Meta details of the service offering. |
canonicalLink |
Cfw link |
Indicates the canonical link. |
selfLink |
Cfw link |
Indicates the self link. |
Request metadata resource is an extension of the oracle.sysman.cfw.cloudAPI.common.CfwResource. Request metadata encapsulates the data required to create a service instance. This response returned is filled by user with appropriate values and is used as in "POST" paylaod required for creation of service instance.
Table 52-13 Request Metadata Data Model
Field | Type | Description |
---|---|---|
instanceName |
String |
Name of the service instance. |
schedule |
Schedule entity |
Schedule of the request. |
configurations |
List<CfwValueDescriptor> |
Provides the list of configurations. |
characteristics |
List<Characteristic> |
Provides the list of characteristics. |
The table below lists the supported operations for the Services resource.
Table 52-14 Supported operations for Services Resource
Method | URI | Description |
---|---|---|
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services |
Returns list of service offerings. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{serviceguid} |
Returns service offering details. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{serviceguid}/metadata |
Returns service offering metadata details. |
POST |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services |
Submits request for creation of Service instance. |
This section contains the REST APIs which are a part of the Services resource. The following REST API tasks are covered.
The table below shows the GET configuration for viewing details of the Services resource.
Table 52-15 GET Request Configuration for Viewing Details of the Services Resource
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name": "Services", "type": "Service", "totalResults": 4, "cfwItems": [ { "id": "1", "name": "ORACLE_NIMBULA_ORCHESTRATION_TEMPLATE", "displayName": "Orchestration", "guid": "04FA3C08D3F3398AE053CE74B10A52F3", "serviceType": "ORACLE_NIMBULA_ORCHESTRATION_SERVICE", "serviceFamily": "NIMBULA_INFRASTRUCTURE", "description": "Create a set of Oracle VM instances with customized configuration for multi-tier applications", "meta": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servies/04FA3C08D3F3398AE053CE74B10A52F3/metadata", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FA3C08D3F3398AE053CE74B10A52F3" } }, { "id": "2", "name": "ORACLE_NIMBULA_SIMPLE_ORCHESTRATION_TEMPLATE", "displayName": "Simple Orchestration", "guid": "04FA3C08D3F6398AE053CE74B10A52F3", "serviceType": "ORACLE_NIMBULA_ORCHESTRATION_SERVICE", "serviceFamily": "NIMBULA_INFRASTRUCTURE", "description": "Create one or more Oracle VM instances with default configuration and minimum inputs", "meta": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FA3C08D3F6398AE053CE74B10A52F3/metadata", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FA3C08D3F6398AE053CE74B10A52F3" } }, { "id": "44", "name": "MY DB Schema", "displayName": "MY DB Schema", "guid": "04FBAB67376E77D1E053CE74B10A9AA8", "serviceType": "SCHEMA", "serviceFamily": "DBAAS", "description": "My DB Schema", "meta": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FBAB67376E77D1E053CE74B10A9AA8/metadata", "canonicalLink": { 2.3 9 "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FBAB67376E77D1E053CE74B10A9AA8" } }, { "id": "41", "name": "My WebLogic Template", "displayName": "My WebLogic Template", "guid": "04FB7EEED9A03798E053CE74B10A753D", "serviceType": "WLAAS", "serviceFamily": "MIDDLEWARE_CFW", "description": "My Web Logic Template", "meta": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FB7EEED9A03798E053CE74B10A753D/metadata", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FB7EEED9A03798E053CE74B10A753D" } } ], "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/" }, "selfLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/" } }
The table below shows the GET configuration for viewing details of the Service offering resource.
Table 52-16 GET Request Configuration for Viewing Details of the Service Offering Resource
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{serviceguid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "id": "42", "name": "My Xaas Remote Server", "displayName": "My Xaas Remote Server", "guid": "04FBAB67376677D1E053CE74B10A9AA8", "serviceType": "CFW_SAMPLEXAAS_REMOTESERVER_SERVICE", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY", "description": "My Xaas Remote Server", "createdOn": "2014-10-09T10:13:34Z", "modifiedOn": "2014-10-09T10:13:34Z", "lastModified": "2014-10-09T10:13:34Z", "meta": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FBAB67376677D 1E053CE74B10A9AA8/metadata", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FBAB67376677D 1E053CE74B10A9AA8" } }
The table below shows the GET configuration for viewing details of the Request metadata.
Table 52-17 GET Request Configuration for Viewing Details of the Request Metadata
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{serviceguid}/metadata |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "characteristics": [ { "displayName": "Self Service Zone", "name": "ORACLE.SYSMAN.SXAAS.CFW_SAMPLEXAAS_RSRC_POOL", "possibleValues": [ { "name": "my_paaszone", "value": "1C3A932A9089BBEC27A63EF389C7DF24" } ] } ], "configurations": [ { "name": "temp_param2", "type": "STRING", "value": "", "required": false, "secret": false }, { "name": "USER_NAME", "type": "STRING", "description": "User Name (cannot be any of Oracle default accounts) used to login to the requested database", "value": "", "required": false, "secret": false }, { "name": "temp_param1", "type": "STRING", "value": "", "required": false, "secret": false }, { "name": "USER_PASSWORD", "type": "STRING", "description": "User Password to login to the given User Name database account", "required": false, "secret": true } ], "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FBAB67376677D1E053CE74B10A9AA8/metadata" }, "selfLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/04FBAB67376677D1E053CE74B10A9AA8/metadata" }, "instanceName": "<user-input>" }
The table below shows the POST configuration for creating a Service instance.
Table 52-18 POST Request Configuration for Creating a Service Instance
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "name":"Xaas RemoteServer Request", "offeringId":"04FBAB67376677D1E053CE74B10A9AA8", "instanceName":"Xaas RemoteServer", "schedule": { "scheduleStartTime":"2015-01-12T16:48:10ZAmerica/Los_Angeles", "scheduleEndTime":"2015-31-12T16:48:10ZAmerica/Los_Angeles" }, "characteristics": [ { "name":"ORACLE.SYSMAN.SXAAS.CFW_SAMPLEXAAS_RSRC_POOL", "value":"1C3A932A9089BBEC27A63EF389C7DF24" } ], "configurations": [ { "name":"temp_param2", "value":"val2" }, { "name":"USER_NAME", "value":"user" }, { "name": "temp_param1", "value":"val1" }, { "name": "USER_PASSWORD", "value":"passwords" } ] } |
Request method |
POST |
A sample of the response received is shown below.
{ "requests":[ { "id":"16", "actionName":"CREATE", "canonicalLink":{ "href":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/1 6" } }, { "id":"17", "actionName":"DELETE", "canonicalLink":{ "href":"https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/1 7" } } ] }
This section provides the procedure to create a Service instance using REST APIs.
Follow the steps below to create a Service instance:
Perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/
. See, Section 52.6.5.1, "Viewing Details of the Services Resource".
The GET operation returns all the service offerings. Note the required service offering.
Perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/{serviceofferingid}/metadata
, using the service offering ID from the previous step. See, Section 52.6.5.3, "Viewing Details of the Request Metadata".
The GET operation returns the metadata of the service offering. Note the metadata fields.
Perform a POST operation on the URI - em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/services/
, by providing values for the metadata fields. See, Section 52.6.5.4, "Creating a Service Instance".
The POST generates a request for the creation of a Service instance. The request payload is expected to have the following fields with values set.
offeringId - A unique ID for identifying the Service instance.
name - A name for the Service instance.
schedule - This is an optional field and has two sub-fields, scheduleStartTime
and scheduleEndTime
. To schedule an instance for future use provide scheduleStartTime
value. Additionally, to set expiry or end time for the service instance set the scheduleEndTime.
instanceName - This field is dependent on the chosen service offering and may or may not be required.
configurations - This field is dependent on the chosen service offering and may or may not be required.
characteristics - This field is dependent on the chosen service offering and may or may not be required.
A user with the EM_SSA_USER role can reschedule and cancel requests that are in the scheduled state.
All the REST APIs will be available from the top level URI /extws/cloudservices/ssa/cfw/v1/.
The Service requests resource is an extension of oracle.sysman.cfw.cloudAPI.pojo.request.RequestSummary. A request enables a SSA user to initiate a task for immediate or future execution.
Table 52-19 Service Requests Data Model for V2
Field | Type | Description |
---|---|---|
requestType |
String |
Type of request. |
serviceFamily |
String |
Name of service family. |
serviceType |
String |
Name of service type. |
startDate |
String |
Start date of request. |
endDate |
String |
End date of request. |
lastModifiedDate |
String |
Date of last modification of request. |
timeZone |
String |
Time zone of the request. |
displayName |
String |
Display name of the request. |
actionName |
String |
Name of the request action. |
description |
String |
Description of the request. |
submissionDate |
String |
Date of submission of the request. |
submittedBy |
String |
Name of the user who submitted the request. |
executionLogs |
String |
Execution logs. |
status |
Request status |
Status of the request. |
Service Request Collection is a collection resource representing a Cloud Administrator's view of all the accessible Service Request resources. The following table describes the Service Request Collection data model for v1.
Table 52-20 Service Request Collection Data Model for V1
Field | Type | Description | Occurs |
---|---|---|---|
name |
String |
Display name of this collection resource. |
1 |
type |
String |
Type of this collection resource. |
1 |
hasMore |
Boolean |
Indicates whether there are more elements in the collection |
1 |
count |
Integer |
Number of elements returned. |
1 |
items |
Collection <ServiceRequestEntity> |
List of ServiceRequestEntity resources. In case no requests exist, items will be present but empty. |
1 |
canonicalLink |
URI |
A GET against this URI refreshes the client representation of this resource. |
1 |
selfLink |
URI |
Refers to the resource equivalent to the containing elements. |
1 |
Table 52-21 Service Request Entity Data Model for V1
Field | Type | Description | Occurs |
---|---|---|---|
id |
String |
The RequestId of the ServiceRequest. |
1 |
beginDate |
String |
The String representation of timestamp to which the new schedule has to be updated, in specified format. e.g 2013-10-02T16:14:41ZPST |
1 |
status |
String |
The status of service request |
1 |
name |
String |
Name of service request. |
1 |
serviceFamily |
String |
The service family of the request type. |
1 |
lastUpdatedTime |
String |
The string value of last modified timestamp, in specified format. |
1 |
lifeCycle |
String |
The life cycle of request. |
1 |
selfLink |
String |
A GET against this URI represents the client representation of this resource. |
1 |
canonicalLink |
String |
A GET against this URI represents the client representation of this resource |
1 |
The table below lists the operations that are supported in the Service requests resource.
Table 52-22 Supported Methods for Service Requests
Request Method | V2 Canonical Link | V1 Canonical Link | Description |
---|---|---|---|
GET |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/ |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/ |
Provides the list of all service requests. There are two query parameter types and status for v1. For v2, see Table 52-23, "Query Parameters for Service Requests in V2", for query parameters. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid} |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/<request-id> |
Provides the details of the service request ID. |
PUT |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid} |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/<request-id> |
Re-schedule the specified request to another schedule. The beginDate for the schedule is specified in the payload. |
DELETE |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid} |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/<service-request-id> |
Cancels specified Service Request. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid}/logs |
Not applicable |
Provides the service request logs. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid}/logs?stepid={stepid} |
Not applicable |
Returns request execution step log. |
The table below shows the query parameters supported for the GET request on the Service Requests resource in the v2 framework.
Table 52-23 Query Parameters for Service Requests in V2
Parameter | Input | Description | Required |
---|---|---|---|
servicetype |
Name of service type |
Returns service type specific information. |
Optional |
status |
Status of service request |
Returns status specific information. The possible values are:
|
Optional |
expanded |
Boolean; true or false |
If true, Possible values are true, and false. Any value apart from true or false is ignored and treated as false. |
Optional |
servicefamily |
Name of service family |
Returns service family specific information. |
Optional |
This section lists all a few REST API example scenarios. The following operations are covered in this section:
V2:
Querying the Service Requests Resource for Status=SUCCESS in V2
Querying the Service Requests Resource for Expanded=true and Expanded=false in V2
Rescheduling a Service Request that is in a Scheduled State in V1 and V2
V1:
Retrieving Top Level View of Service Requests for a Specific Service Family in V1
Retrieving Top Level View of Service Requests for a Specific Status in V1
Deleting a Service Request that is in a Scheduled State in V1
Deleting a Service Request that is in a Canceled State (or in a state other than scheduled) in V1
Table 52-24 GET Request Configuration for Viewing Details of Service Requests Resource in V1 and V2
Feature | Specification for V1 | Specification for V2 |
---|---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
None |
Request method |
GET |
GET |
A sample of the response received for v2 is shown below.
{ "name": "Request summary grouped by status", "totalResults": 17, "requestSummary": [ { "status": "NO_QUOTA_ERROR", "count": 1, "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=NO_QUOTA_ERROR&expanded=true" }, { "status": "EXECUTION_ERROR", "count": 1, "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=EXECUTION_ERROR&expanded=true" }, { "status": "SUCCESS", "count": 5, "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=SUCCESS&expanded=true" }, { "status": "CLEANUP_FAILED", "count": 1, "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=CLEANUP_FAILED&expanded=true" }, { "status": "SCHEDULED", "count": 9, "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=SCHEDULED&expanded=true" } ], "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests" }, "selfLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests" } }
A sample of the response received for v1 is shown below.
{ "name": "Service Requests", "type": "Service Request","count": 2, "items": [ { "id": "2", "name": "future_Create Sample XaaS Service#2", "beginDate": "2015-02-14T08:37:18Z India Standard Time", "status": "SCHEDULED", "selfLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2", "canonicalLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY" }, { "id": "1", "name": "eadeweqqw_Create Sample XaaS Service#1", "beginDate": "2015-02-10T07:49:24Z India Standard Time", "status": "EXECUTION_ERROR", "selfLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1", "canonicalLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY" } ], "selfLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequest?status=ALL", "canonicalLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/" }
The table below shows the GET configuration for querying the Service requests resource.
Table 52-25 GET Request Configuration for Querying a Service Request for Status=SUCCESS in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=SUCCESS |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "Request summary grouped by status", "totalResults" : 5, "requestSummary" : [ { "status" : "SUCCESS", "count" : 3, "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SUCCESS&expanded=true" }, { "status" : "SCHEDULED", "count" : 2, "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SCHEDULED&expanded=true" } ], "canonicalLink" : { "href" : 3.4 22 - - "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests" }, "selfLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SUCCESS" } }
The table below shows the GET configuration for querying the Service requests resource for expanded=true.
A similar approach is followed for expanded=false,
where the query change is made in the URI.
Table 52-26 GET Request Configuration for Querying a Service Request for Expanded=true in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?expanded=true |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received for expanded=true
is shown below.
{ "name" : "Service Requests", "type" : "Service Request", "totalResults" : 5, "cfwItems" : [ { "id" : "5", "name" : "Rst_rpc_14-09-11 09.52.58_11-Sep-14 21:53:06.663", "startDate" : "2014-09-11T16:23:06Z", "status" : "SUCCESS", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/5" }, "displayName" : "Rst_rpc_14-09-11 09.52.58_11-Sep-14 21:53:06.663" }, { "id" : "4", "name" : "Remove Sample XaaS Service_Xaas_Storage__11-Sep-14 21:52:58.553", "startDate" : "2017-07-12T23:48:10Z", "status" : "SCHEDULED", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/4" }, "displayName" : "Remove Sample XaaS Service_Xaas_Storage__11-Sep-14 21:52:58.553" }, { "id" : "3", "name" : "Rst_en_14-09-11 09.52.58_11-Sep-14 21:52:58.363", "startDate" : "2014-09-11T16:22:58Z", "status" : "SUCCESS", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/3" }, "displayName" : "Rst_en_14-09-11 09.52.58_11-Sep-14 21:52:58.363" }, { "id" : "2", "name" : "Rst_st_en_14-09-11 09.52.58_11-Sep-14 21:52:54.187", "startDate" : "2015-01-13T00:48:10Z", "status" : "SCHEDULED", "canonicalLink" : { "href" : 3.5 23 - - "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/2" }, "displayName" : "Rst_st_en_14-09-11 09.52.58_11-Sep-14 21:52:54.187" }, { "id" : "1", "name" : "Rst_14-09-11 09.52.58_11-Sep-14 21:52:49.360", "startDate" : "2014-09-11T16:22:49Z", "status" : "SUCCESS", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/1" }, "displayName" : "Rst_14-09-11 09.52.58_11-Sep-14 21:52:49.360" } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests" }, "selfLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?expanded=true" } }
A sample of the response received for expanded=false
is shown below.
{ "name" : "Request summary grouped by status", "totalResults" : 5, "requestSummary" : [ { "status" : "SUCCESS", "count" : 3, "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SUCCESS&expanded=true" }, { "status" : "SCHEDULED", "count" : 2, "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=SCHEDULED&expanded=true" } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests" }, "selfLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?expanded=false"
The table below shows the GET configuration for querying the Service requests resource for status=SUCCESS&expanded=false.
A similar approach is followed for status=SUCCESS&expanded=true,
where the query change is made in the URI.
Table 52-27 GET Request Configuration for Querying a Service Request for status=SUCCESS&expanded=false in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests?status=SUCCESS&expanded=false |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received for status=SUCCESS&expanded=false
is shown below.
{ "name" : "Request summary grouped by status", "totalResults" : 5, "requestSummary" : [ { "status" : "SUCCESS", "count" : 3, "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SUCCESS&expanded=true" }, { "status" : "SCHEDULED", "count" : 2, "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SCHEDULED&expanded=true" } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests" }, "selfLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SUCCESS&expanded=false" } }
A sample of the response received for status=SUCCESS&expanded=true
is shown below.
{ "name" : "Service Requests", "type" : "Service Request", "totalResults" : 3, "cfwItems" : [ { "id" : "5", "name" : "Rst_rpc_14-09-11 09.52.58_11-Sep-14 21:53:06.663", "startDate" : "2014-09-11T16:23:06Z", "status" : "SUCCESS", "canonicalLink" : { "href" : 3.7 "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere 25 quests/5" }, "displayName" : "Rst_rpc_14-09-11 09.52.58_11-Sep-14 21:53:06.663" }, { "id" : "3", "name" : "Rst_en_14-09-11 09.52.58_11-Sep-14 21:52:58.363", "startDate" : "2014-09-11T16:22:58Z", "status" : "SUCCESS", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/3" }, "displayName" : "Rst_en_14-09-11 09.52.58_11-Sep-14 21:52:58.363" }, { "id" : "1", "name" : "Rst_14-09-11 09.52.58_11-Sep-14 21:52:49.360", "startDate" : "2014-09-11T16:22:49Z", "status" : "SUCCESS", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/1" }, "displayName" : "Rst_14-09-11 09.52.58_11-Sep-14 21:52:49.360" } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests" }, "selfLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests?status=SUCCESS&expanded=true" } }
The GET request configuration for viewing details of a Service request is shown below.
Table 52-28 GET Request Configuration for Viewing Details of a Service Request in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "id": "44", "name": "dp_2b022961-c#44", "status": "SUCCESS", "serviceType": "CFW_SAMPLEXAAS_SERVICE", "serviceFamily": "Sample Services", "actionName": "Create Sample XaaS Service", "startDate": "2014-10-15T09:29:23Z", "createdOn": "2014-10-15T09:29:23Z", "createdBy": "SYSMAN", "owner": "SYSMAN", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/44" }, "executionLogs": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/44/logs" }
The DELETE request configuration for deleting a Service request is shown below.
Table 52-29 DELETE Request Configuration for Deleting a Service Request in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
DELETE |
A sample of the response received is shown below.
{ "message" : "[\"Request 31 deleted successfully\"]" }
The table below shows the PUT request configuration.
Table 52-30 PUT Request Configuration for Rescheduling a Service Request in a Scheduled State in V1 and V2
Feature | Specification for V1 | Specification for V2 |
---|---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2 |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "beginDate": "2013-10-02T16:14:41ZPST" } |
{"startDate":"2015-08-12T16:48:10ZAmerica/Los_Angeles"} |
Request method |
PUT |
PUT |
A sample of the response received for v2 is shown below.
{ "message" : "Request 2 rescheduled successfully." }
A sample of the response received for v1 is shown below.
Status 200 OK { message: "Service request 2 rescheduled successfully." }
The table below shows the GET request configuration for viewing the Service request logs.
Table 52-31 GET Request Configuration for Viewing the Logs of a Service Request in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid}/logs |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "submittedOn" : "2014-09-12T07:20:38Z", "steps" : [ { "stepName" : "CfwRequestInitCommand", "stepId" : "CfwRequestInitCommand", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/21/logs?stepid=CfwRequestInitCommand" }, { "stepName" : "CfwRequestPreProcessCommand", "stepId" : "CfwRequestPreProcessCommand", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/21/logs?stepid=CfwRequestPreProcessCommand" }, { "stepName" : "CfwRequestJobInvokerCommand", "stepId" : "CfwRequestJobInvokerCommand", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/21/logs?stepid=CfwRequestJobInvokerCommand" }, { "stepId" : "", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/21/logs?stepid=" }, { "stepName" : "CfwRequestPostProcessCommand", "stepId" : "CfwRequestPostProcessCommand", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/21/logs?stepid=CfwRequestPostProcessCommand" } ], "id" : "21" }
The table below shows the GET request configuration for querying the Service request logs.
Table 52-32 GET Request Configuration for Querying the Logs of a Service Request in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/{requestid}/logs?stepid=CfwRequestPreProcessCommand |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "id" : "21", "stepName" : "CfwRequestPreProcessCommand", "stepId" : "CfwRequestPreProcessCommand", "data" : "INFO:Request Pre-processing in progress.\nINFO:Preparing the inputs for Request Action: Create Sample XaaS Service\nINFO:Performing placment checks to identify the appropriate Service- Provider.\nINFO:Placement checks executed successfully.\nINFO:Request pre-processing successfully executed.", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicere quests/21/logs?stepid=CfwRequestPreProcessCommand" } }
The table below shows the GET request configuration.
Table 52-33 GET Request Configuration for Viewing Details of a Service Request for a Specific Service Family in V1
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests?type=mwaas |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { name: "Service Requests" type: "Service Request" count: 2 items: [2] 0: { id: "2" name: "request2_14153ee61c5_Create_20130925_123353" beginDate: "2013-09-25T12:48:50ZAsia/Calcutta" status: "Scheduled" lifeCycle: "Create Service Instance" selfLink: "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2" canonicalLink: "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2" serviceFamily: "MWAAS" } 1: { id: "1" name: "request1_14153ea0bb6_Create_20130925_122909" beginDate: "2013-09-25T12:44:03ZAsia/Calcutta" status: "Cancelled" lifeCycle: "Create Service Instance" selfLink: "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1" canonicalLink: "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1" serviceFamily: "MWAAS" } selfLink: "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests?status=ALL" canonicalLink: "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests" }
The table below shows the GET request configuration.
Table 52-34 GET Request Configuration for Viewing Details of a Service Request for with a Specific Status in V1
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/?status=SCHEDULED |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name": "Service Requests", "type": "Service Request", "count": 1, "items": [ { "id": "2", "name": "future_Create Sample XaaS Service#2", "beginDate": "2015-02-14T08:37:18Z India Standard Time", "status": "SCHEDULED", "selfLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2", "canonicalLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/2", "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY" } ], "selfLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequest?status=SCHEDULED", "canonicalLink": "https://cloudcompnay.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/" }
The table below shows the PUT request configuration.
Table 52-35 PUT Request Configuration for Rescheduling a Service Request that is in Cancelled State in v1
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1 |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "beginDate": "2013-10-02T16:14:41ZPST" } |
Request method |
PUT |
A sample of the response received is shown below.
Status : 400 Bad request {errorMessages: "Error occured while rescheduling. Verify that schedule is not in past and status is scheduled."}
The table below shows the DELETE request configuration.
Table 52-36 DELETE Request Configuration for Cancelling a Scheduled Service Request in V1
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1 |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
DELETE |
A sample of the response received is shown below.
Status 200 OK { message: "Service request 1 cancelled successfully." }
The table below shows the DELETE request configuration.
Table 52-37 DELETE Request Configuration for Deleting a Service Request in Cancelled State in V1
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/servicerequests/1 |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
DELETE |
A sample of the response received is shown below.
Status : 400 Bad request{errorMessages: "Error occured while cancelling. Only request with status SCHEDULED is cancellable."}
Service instances resources comprises of Service instance and Action entities. The data models of the Service instances resource and its associated entities is given below.
Table 52-38 Service Instance Data Model for V2
Field | Type | Description |
---|---|---|
guid |
String |
Guid of the service instance. |
serviceFamily |
String |
Name of the service family. |
serviceType |
String |
Name of the service type. |
status |
String |
Status of the service instance. |
displayname |
String |
Display name of the service instance. |
targetType |
String |
Target type of the service instance. |
Table 52-39 Action Data Model for V2
Field | Type | Description | Occurs |
---|---|---|---|
offeringId |
String |
Guid of the service. |
1 |
name |
String |
Name of the request. |
1 |
instanceName |
String |
Name of the service instance. |
0..1 |
schedule |
ScheduleEntity |
Schedule of the request. |
0..1 |
configurations |
List<CfwValueDescriptor> |
Configurations. |
0..1 |
characteristics |
List<Characteristic> |
List of characteristics. |
0..1 |
The supported request parameters and their descriptions are provided in the table below.
The table below provides information on the supported methods for Service instance resource.
Table 52-40 Supported methods for Service Instance Resource
Request Method | URI | Description |
---|---|---|
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/ |
Returns the service instances collection details. See Table 52-41, "Query Parameters for Service Instance in V2", for query parameters. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid} |
Returns the details of specified service instance. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/actions |
Returns actions available on the specified service instance. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/attributes |
Returns attributes for the specified service instance. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/actions/{actionid} |
Returns the action details and the action inputs required to execute the action on the specified service instance. |
PUT |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/ |
Executes the action on a given service instance. |
The table below shows the query parameters supported for the GET request on the Service instance resource in the v2 framework.
Table 52-41 Query Parameters for Service Instance in V2
Parameter | Input | Description | Required |
---|---|---|---|
servicetype |
Name of service type. |
Returns service type specific information. |
Optional |
status |
Status of service instance. |
Returns status specific information. The possible values are:
|
Optional |
expanded |
Boolean; true or false. |
ServiceInstanceCollection contains |
Optional |
This section provides the REST API examples of the Service instances resource. The following operations are covered in this section:
Viewing Details of the Attributes of a Service Instance in V2
Viewing Details of the Available Actions on a Service Instance in V2
Viewing Details of the Action Inputs Required To Execute an Action on a Service Instance in V2
The table below shows the GET request configuration.
Table 52-42 GET Request Configuration for Viewing Details of Service Instance Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "Service Instances Summary", "totalResults" : 7, "serviceInstanceSummary" : [ { "status" : "STATUS_UP", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?status=STATUS_UP&expanded=true", "count" : 3 }, { "status" : "PENDING_CREATION", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?status=PENDING_CREATION&expanded=true", "count" : 4 } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances" } }
The table below shows the GET request configuration for querying the Service instance resource based on the following parameters:
expanded=true
expanded=false
status=STATUS_UP
servicetype=CFW_SAMPLEXAAS_SERVICE
expanded=true,status=STATUS_UP
expanded=false,status=STATUS_UP,servicetype=CFW_SAMPLEXAAS_SERVICE
Table 52-43 GET Request Configuration for Querying Service Instance Resource in V2
Feature | Specification |
---|---|
URI for expanded=true |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?expanded=true |
URI for expanded=false |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?expanded=false |
URI for status=STATUS_UP |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?status=STATUS_UP |
URI for servicetype=CFW_SAMPLEXAAS_SERVICE |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?servicetype=CFW_SAMPLEXAAS_SERVICE |
URI for expanded=true&status=STATUS_UP |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?expanded=true&status=STATUS_UP |
URI for expanded=false,status=STATUS_UP,servicetype=CFW_SAMPLEXAAS_SERVICE |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances?expanded=fal se&status=STATUS_UP&servicetype=CFW_SAMPLEXAAS_SERVICE |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received for expanded=false
is shown below.
{ "name" : "Service Instances Summary", "totalResults" : 7, "serviceInstanceSummary" : [ { "status" : "STATUS_UP", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances?status=STATUS_UP&expanded=true", "count" : 3 }, { "status" : "PENDING_CREATION", "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances?status=PENDING_CREATION&expanded=true", "count" : 4 } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances" }, "selfLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances?expanded=false" } }
The table below shows the GET request configuration.
Table 52-44 GET Request Configuration for Viewing Details of a Service Instance in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "test", "targetName" : "test", "guid" : "CCA88E9507D4A9E2214935F956D83150", "serviceType" : "CFW_SAMPLEXAAS_SERVICE", "serviceFamily" : "CFW_SAMPLEXAAS_SERVICEFAMILY", "status" : "STATUS_UP", "targetType" : "Cfw_Xaas_DB_Service", "createdOn" : "2014-11-15T00:00:00ZAsia/Calcutta", "createdBy" : "SYSMAN", "owner" : "SYSMAN", "attributes" : { "href" : "https://xx.idc.example.com:14488/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances/CCA88E9507D4A9E2214935F956D83150/attributes" }, "canonicalLink" : { "href" : "https://xx.idc.example.com:14488/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances/CCA88E9507D4A9E2214935F956D83150" }, "selfLink" : { "href" : "https://xx.idc.example.com:14488/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicein stances/CCA88E9507D4A9E2214935F956D83150" } }
The table below shows the GET request configuration.
Table 52-45 GET Request Configuration for Viewing Details of the Attributes of a Service Instance in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/attributes |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "serviceInstanceGuid" : "CCA88E9507D4A9E2214935F956D83150", "attributes" : [ { "name" : "xaasServiceName", "type" : "STRING", "value" : "test" } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:14488/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/CCA88E9507D4A9E2214935F956D83150/attributes" }, "selfLink" : { "href" : "https://xx.idc.example.com:14488/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/CCA88E9507D4A9E2214935F956D83150/attributes" } }
The table below shows the GET request configuration.
Table 52-46 GET Request Configuration for Viewing Details of the Available Actions on a Service Instance in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/actions |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "totalResults" : 6, "selfLink" : { "href" : "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/2A2BD0D7C40F7C2814FA6788704E313 A/actions" }, "cfwItems" : [ { "name" : "DELETE", "id" : "82", "displayName" : "Remove Sample XaaS Service", "description" : "Removing my Sample XaaS service" }, { "name" : "START", "id" : "84", "displayName" : "Start Service", "description" : "Starts this service" }, { "name" : "STOP", "id" : "85", "displayName" : "Stop Service", "description" : "Stops this service" }, { "name" : "CLEANUP", "id" : "86", "displayName" : "Cleanup Sample XaaS Failed Request", "description" : "Cleanup Sample Xaas Failed Request" }, { "name" : "SYNCSTARTSERVICE", "id" : "87", "displayName" : "Sync Start Service", "description" : "Synchronous Action to Start Sample Service" }, { "name" : "SYNCSTOPSERVICE", "id" : "88", "displayName" : "Sync Stop Service", "description" : "Synchronous Action to Stop Sample Service" } ], "name" : "Actions", "type" : "Action", "canonicalLink" : { "href" : "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/2A2BD0D7C40F7C2814FA6788704E313 A/actions" } }
The table below shows the GET request configuration.
Table 52-47 GET Request Configuration for Viewing Details of the Action Inputs Required To Execute an Action on a Service Instance in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/actions/{actionid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "START", "id" : "94", "displayName" : "START", "actionInputs" : [ { "name" : "WorkLoads", "type" : "VECTOR", "description" : "WorkLoad Values", "required" : false, "secret" : false, "subvalues" : [ { "name" : "Small", "type" : "VECTOR", "description" : "Configuration Values for Small WorkLoad", "required" : false, "secret" : false, "subvalues" : [ { "name" : "DEPL_SIZE_IS_DEFAULT_KEY", "value" : "Y", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "CPU", "value" : "60", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "MEMORY", "value" : "4048", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "STORAGE", "value" : "500", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "XAAS_TEST", "value" : "NONE", "type" : "STRING", "required" : false, "secret" : false } ] }, { "name" : "Medium", "type" : "VECTOR", "description" : "Configuration Values for Medium WorkLoad", "required" : false, "secret" : false, "subvalues" : [ { "name" : "DEPL_SIZE_IS_DEFAULT_KEY", "value" : "N", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "CPU", "value" : "80", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "MEMORY", "value" : "8088", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "STORAGE", "value" : "750", "type" : "STRING", "required" : false, "secret" : false } ] }, { "name" : "Large", "type" : "VECTOR", "description" : "Configuration Values for Large WorkLoad", "required" : false, "secret" : false, "subvalues" : [ { "name" : "DEPL_SIZE_IS_DEFAULT_KEY", "value" : "Y", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "CPU", "value" : "60", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "MEMORY", "value" : "40448", "type" : "STRING", "required" : false, "secret" : false }, { "name" : "STORAGE", "value" : "500", "type" : "STRING", "required" : false, "secret" : false } ] } ] } ], "description" : "Starts this service" }
The table below shows the PUT request configuration.
Table 52-48 PUT Request Configuration for Executing an Action on a Service Instance in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "actionId":94, "configurations":[ { "name":"domainName", "type":"STRING", "description":"Domain Name", "required":true, "value":"/mwaas_rest_9_SSA_USER1/rest_9_SSA_USER1" }, { "name":"applicationName", "type":"STRING", "description":"Application Name", "required":true, "value":"test1" } ] } |
Request method |
PUT |
A sample of the response received is shown below.
{ "requests": [ { "id": "4", "actionName": "STOP", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/servicerequests/4" } } ] }
This section provides the procedure to execute an action on a Service instance using REST APIs.
Follow the steps below to execute an action on a Service instance:
Perform a GET operation on the URI - em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/actions
. See, Section 52.8.2.5, "Viewing Details of the Available Actions on a Service Instance in V2".
The GET operation returns all the supported actions that an user can execute on the specified Service instance. The Action name, Action ID, Display name and Description are provided for each action. Note the required Action ID.
Perform a GET operation on the URI - /em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}/actions/{actionid}
, using the Action ID from the previous step. See, Section 52.8.2.6, "Viewing Details of the Action Inputs Required To Execute an Action on a Service Instance in V2".
The GET operation returns all the action details and the action inputs. Some actions require action inputs to complete an action. Action inputs capture the data or input which is to be provided by the user while executing an action on an instance. Note the action inputs.
Perform a PUT operation on the URI - /em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/serviceinstances/{instanceid}
, using the action inputs from the previous step. See, Section 52.8.2.7, "Executing an Action on a Service Instance in V2".
The PUT operation executes the action on the Service instance. To execute the action, provide appropriate action input values as configurations
in the payload.
This section describes the quota usage REST APIs for SSA user.
The table below lists the supported operations for quota usage.
This section provides the REST API examples for Quota usage. The following examples are covered:
The table below shows the GET request configuration.
Table 52-50 GET Request Configuration for Viewing Details of Quota Usage
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/" }, "usages": [ { "serviceFamily": "CFW_SAMPLEXAAS_SERVICEFAMILY", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/CFW_SAMPLEXAAS_SERVICEFAMILY" } }, { "serviceFamily": "NIMBULA_INFRASTRUCTURE", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/NIMBULA_INFRASTRUCTURE" } }, { "serviceFamily": "DBAAS", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/DBAAS" } }, { "serviceFamily": "MIDDLEWARE_CFW", "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/MIDDLEWARE_CFW" } } ], "selfLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/" } }
The table below shows the GET request configuration.
Table 52-51 GET Request Configuration for Viewing Details of Quota Usage by Service Family
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/{servicefamily} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name": "Usages", "type": "Usages Collection", "totalResults": 4, "cfwItems": [ { "id": "sampleActionOpen", "name": "Storage", "type": "Others", "allowed": "10.0", "used": "3.0", "unit": "GB" }, { "name": "Cfw Sample XaaS - Other Service", "type": "Service Instances", "serviceType": "CFW_SAMPLEXAAS_SERVICE_FOR_NOMEM", "used": "0" }, { "name": "Cfw Sample XaaS", "type": "Service Instances", "serviceType": "CFW_SAMPLEXAAS_SERVICE", "used": "0" }, { "name": "Cfw Sample RemoteServer XaaS", "type": "Service Instances", "serviceType": "CFW_SAMPLEXAAS_REMOTESERVER_SERVICE", "used": "0" } ], "canonicalLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/CFW_SAMPLEXAAS_SERVICEFAMILY" }, "selfLink": { "href": "https://cloudcompany.com/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/quotausage/CFW_SAMPLEXAAS_SERVICEFAMILY" } }
This section describes the User preference resource in the v2 framework.
The table below shows the supported request methods on the User preference resource.
Table 52-52 Supported Request Methods for the User Preferences Resource in V2
Request Method | URI | Description |
---|---|---|
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/ |
Returns top level view of general and service specific preferences. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general |
Returns general user preferences. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general/metadata |
Returns metadata for general user preferences. |
PUT |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general |
Updates general preferences of the user. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services |
Returns the top level view of the service preferences. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily} |
Returns service family user preferences. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/metadata |
Returns metadata for the specified service family preferences. |
PUT |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily} |
Updates service family user preferences. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/{servicetype} |
Returns service type user preferences. |
GET |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/{servicetype}/metadata |
Returns metadata for the specified service type preferences. |
PUT |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/{servicetype} |
Updates service family preferences of the user. |
The following REST APIs are covered in this section. The following operations are covered in this section:
Viewing Details of the General User Preferences Resource for V2
Viewing Metadata of the General User Preferences Resource for V2
Viewing Details of the Services User Preferences Resource for V2
Viewing Details of the Service Family User Preferences Resource for V2
Viewing Metadata of the Service Family User Preferences for V2
Viewing Details of the Service Type User Preferences Resource for V2
Viewing Metadata of the Service Type User Preferences for V2
The table below shows the configuration for the GET request.
Table 52-53 GET Request Configuration for Viewing Details of the User Preferences Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "generalPreferences" : "https://blr2223141.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general", "servicePreferences" : "https://blr2223141.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services", "canonicalLink" : { "href" : "https://blr2223141.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences" } }
The table below shows the configuration for the GET request.
Table 52-54 GET Request Configuration for Viewing Details of the General User Preferences Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "General Preference", "type" : "General User Preferences", "preferences" : [ { "name" : "USER_LOCALE", "value" : "en", "type" : "STRING", "defaultValue" : "en", "displayName" : "English", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "REQUEST_STATUS", "type" : "VECTOR", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false }, { "name" : "REQUEST_NOTIFICATION", "value" : "false", "type" : "BOOLEAN", "defaultValue" : "false", "description" : "This allows the user to receive notifications for different statuses of the request.", "required" : false, "secret" : false }, { "name" : "NOTIFICATION_DAYS_1", "value" : "0", "type" : "INTEGER", "defaultValue" : "0", "description" : "Number of days before the first notification is sent to the user before the expiry date of the service instance.", "required" : false, "secret" : false }, { "name" : "NOTIFICATION_DAYS_2", "value" : "0", "type" : "INTEGER", "defaultValue" : "0", "description" : "Number of days before the second notification is sent to the user before the expiry date of the service instance.", "required" : false, "secret" : false }, { "name" : "DEFAULT_SERVICE", "value" : "MWAAS", "type" : "STRING", "defaultValue" : "IAAS", "description" : "This will be used as your default service after successful login to Self Service Portal.", "required" : false, "secret" : false }, { "name" : "EMAIL", "type" : "VECTOR", "description" : "This is the default Email address for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "QUOTA_THRESHOLD", "value" : "0.0", "type" : "FLOAT", "defaultValue" : "0.0", "description" : "Notifications will be sent to users when resources exceed the defined quota percentage.", "required" : false, "secret" : false }, { "name" : "QUOTA_NOTIFICATION", "value" : "false", "type" : "BOOLEAN", "defaultValue" : "false", "description" : "Receive quota related notification when the quota reaches the specified threshold.", "required" : false, "secret" : false }, { "name" : "INSTANCE_EXPIRY_NOTIFICATION", "value" : "false", "type" : "BOOLEAN", "defaultValue" : "false", "description" : "Enables user to receive notifications for Service Instances that are due to expire based on the notification period.", "required" : false, "secret" : false } ], "meta" : "https://blr2223141.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general/metadata", "canonicalLink" : { "href" : "https://blr2223141.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general" } }
The table below shows the configuration for the GET request.
Table 52-55 GET Request Configuration for Viewing Metadata of the General User Preferences Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general/metadata |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "General Preference", "type" : "General User Preferences", "preferences" : [ { "name" : "USER_LOCALE", "value" : "en", "type" : "STRING", "defaultValue" : "en", "displayName" : "English", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false, "possibleValues" : [ { "name" : "USER_LOCALE", "value" : "es_ES", "type" : "STRING", "defaultValue" : "en", "displayName" : "Spanish", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "ja", "type" : "STRING", "defaultValue" : "en", "displayName" : "Japanese", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "fr", "type" : "STRING", "defaultValue" : "en", "displayName" : "French", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "ko", "type" : "STRING", "defaultValue" : "en", "displayName" : "Korean", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "de", "type" : "STRING", "defaultValue" : "en", "displayName" : "German", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "zh_TW", "type" : "STRING", "defaultValue" : "en", "displayName" : "Traditional Chinese", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "zh_CN", "type" : "STRING", "defaultValue" : "en", "displayName" : "Simplified Chinese", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "en", "type" : "STRING", "defaultValue" : "en", "displayName" : "English", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "USER_LOCALE", "value" : "pt_BR", "type" : "STRING", "defaultValue" : "en", "displayName" : "Brazilian Portuguese", "description" : "This is the default Locale for receiving cloud notifications.", "required" : false, "secret" : false } ] }, { "name" : "REQUEST_STATUS", "type" : "VECTOR", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false, "possibleValues" : [ { "name" : "REQUEST_STATUS", "value" : "PARTIAL_SUCCEEDED", "type" : "VECTOR", "displayName" : "Partially Succeeded", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false }, { "name" : "REQUEST_STATUS", "value" : "ERROR", "type" : "VECTOR", "displayName" : "Error", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false }, { "name" : "REQUEST_STATUS", "value" : "CANCELLED", "type" : "VECTOR", "displayName" : "Cancelled", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false }, { "name" : "REQUEST_STATUS", "value" : "EXECUTING", "type" : "VECTOR", "displayName" : "Running", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false }, { "name" : "REQUEST_STATUS", "value" : "SUCCESS", "type" : "VECTOR", "displayName" : "Success", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false }, { "name" : "REQUEST_STATUS", "value" : "SCHEDULED", "type" : "VECTOR", "displayName" : "Scheduled", "description" : "Request Status For Which Notifications Are Enabled", "required" : false, "secret" : false } ] }, { "name" : "REQUEST_NOTIFICATION", "value" : "false", "type" : "BOOLEAN", "defaultValue" : "false", "description" : "This allows the user to receive notifications for different statuses of the request.", "required" : false, "secret" : false }, { "name" : "NOTIFICATION_DAYS_1", "value" : "0", "type" : "INTEGER", "defaultValue" : "0", "description" : "Number of days before the first notification is sent to the user before the expiry date of the service instance.", "required" : false, "secret" : false }, { "name" : "NOTIFICATION_DAYS_2", "value" : "0", "type" : "INTEGER", "defaultValue" : "0", "description" : "Number of days before the second notification is sent to the user before the expiry date of the service instance.", "required" : false, "secret" : false }, { "name" : "DEFAULT_SERVICE", "value" : "MWAAS", "type" : "STRING", "defaultValue" : "IAAS", "description" : "This will be used as your default service after successful login to Self Service Portal.", "required" : false, "secret" : false }, { "name" : "EMAIL", "type" : "VECTOR", "description" : "This is the default Email address for receiving cloud notifications.", "required" : false, "secret" : false }, { "name" : "QUOTA_THRESHOLD", "value" : "0.0", "type" : "FLOAT", "defaultValue" : "0.0", "description" : "Notifications will be sent to users when resources exceed the defined quota percentage.", "required" : false, "secret" : false }, { "name" : "QUOTA_NOTIFICATION", "value" : "false", "type" : "BOOLEAN", "defaultValue" : "false", "description" : "Receive quota related notification when the quota reaches the specified threshold.", "required" : false, "secret" : false }, { "name" : "INSTANCE_EXPIRY_NOTIFICATION", "value" : "false", "type" : "BOOLEAN", "defaultValue" : "false", "description" : "Enables user to receive notifications for Service Instances that are due to expire based on the notification period.", "required" : false, "secret" : false } ], "canonicalLink" : { "href" : "https://xxx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general/metadata" } }
The table below shows the configuration for the PUT request.
Table 52-56 PUT Request Configuration for Updating the General User Preferences in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/general |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "preferences":[ { "value":"MWAAS", "name":"DEFAULT_SERVICE" }, { "value":"false", "name":"REQUEST_NOTIFICATION" } ] } |
Request method |
PUT |
A sample of the response received is shown below.
{ "message" : "General preferences updated successfully." }
The table below shows the configuration for the GET request.
Table 52-57 GET Request Configuration for Viewing Details of the Services User Preferences Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "preferences" : [ { "name" : "MIDDLEWARE_CFW", "type" : "Service Family User Preferences", "required" : false, "secret" : false, "meta" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/MIDDLEWARE_CFW/metadata", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/MIDDLEWARE_CFW" } }, { "name" : "NIMBULA_INFRASTRUCTURE", "type" : "Service Family User Preferences", "required" : false, "secret" : false, "meta" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/NIMBULA_INFRASTRUCTURE/metadata", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/NIMBULA_INFRASTRUCTURE" } }, { "name" : "DBAAS", "type" : "Service Family User Preferences", "required" : false, "secret" : false, "meta" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/DBAAS/metadata", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/DBAAS" } }, { "name" : "CFW_SAMPLEXAAS_SERVICEFAMILY", "type" : "Service Family User Preferences", "required" : false, "secret" : false, "meta" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/metadata", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY" } } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services" } }
The table below shows the configuration for the GET request.
Table 52-58 GET Request Configuration for Viewing Details of the Service Family User Preferences Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
The table below shows the configuration for the GET request.
Table 52-59 GET Request Configuration for Viewing Metadata of the Service Family User Preferences in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/metadata |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "CFW_SAMPLEXAAS_SERVICEFAMILY", "type" : "Service Type User Preferences", "preferences" : [ { "name" : "SAMPLE_PREFERENCE_1", "value" : "test", "type" : "STRING", "defaultValue" : "Sample Value 1", "description" : "Type of the Supported Files", "required" : false, "secret" : false } ], "subPreferences" : [ { "name" : "CFW_SAMPLEXAAS_SERVICE_FOR_NOMEM", "type" : "Service Type User Preferences", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/metadata/CFW_SAMPLEXAAS_SERVICE_FOR_NOMEM" } }, { "name" : "CFW_SAMPLEXAAS_SERVICE", "type" : "Service Type User Preferences", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/metadata/CFW_SAMPLEXAAS_SERVICE" } }, { "name" : "CFW_SAMPLEXAAS_REMOTESERVER_SERVICE", "type" : "Service Type User Preferences", "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/metadata/CFW_SAMPLEXAAS_REMOTESERVER_SERVICE" } } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/metadata" } }
The table below shows the configuration for the PUT request.
Table 52-60 PUT Request Configuration for Updating the Service Family User Preferences in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "preferences":[ { "value":"test", "name":"SAMPLE_PREFERENCE_1" } ] } |
Request method |
PUT |
A sample of the response received is shown below.
{ "message" : "User service preferences updated successfully." }
The table below shows the configuration for the GET request.
Table 52-61 GET Request Configuration for Viewing Details of the Service Type User Preferences Resource in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/{servicetype} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "CFW_SAMPLEXAAS_SERVICE", "type" : "Service Type User Preferences", "preferences" : [ { "name" : "SAMPLE_PREFERENCE_1", "value" : "UPD_ST_Rest_14-09-06 11.59.34", "type" : "STRING", "defaultValue" : "Sample Value 1", "description" : "Type of the Supported Files", "required" : false, "secret" : false } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/CFW_SAMPLEXAAS_SERVICE" } }
The table below shows the configuration for the GET request.
Table 52-62 GET Request Configuration for Viewing Metadata of the Service Type User Preferences in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/{servicetype}/metadata |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "name" : "CFW_SAMPLEXAAS_SERVICE", "type" : "Service Type User Preferences", "preferences" : [ { "name" : "SAMPLE_PREFERENCE_1", "value" : "test", "type" : "STRING", "defaultValue" : "Sample Value 1", "description" : "Type of the Supported Files", "required" : false, "secret" : false } ], "canonicalLink" : { "href" : "https://xx.idc.example.com:24503/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/CFW_SAMPLEXAAS_SERVICEFAMILY/CFW_SAMPLEXAAS_SERVICE/metadata" } }
The table below shows the configuration for the PUT request.
Table 52-63 PUT Request Configuration for Updating the Service Type User Preferences in V2
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v2/userpreferences/services/{servicefamily}/{servicetype} |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "preferences":[ { "value":"UPD_ST_Rest_14-09-07 12.03.39", "name":"SAMPLE_PREFERENCE_1" } ] } |
Request method |
PUT |
A sample of the response received is shown below.
{ "message" : "User service preferences updated successfully." }
An SSA user (with the EM_SSA_USER
role) can set user preferences (both general and service specific) using Cloud REST APIs.
This is the top level resource and is used to get the following preferences:
General Preferences
Service Preferences: This includes My Database Preferences, My Middleware Preferences, and My Tests Preferences
The URI (canonicalLink) for user preferences is em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/.
A GET request to this URI provided a top level view of the general and service specific preferences. The table below shows the GET request configuration on this URI.
Method | Query Parameters | Request Payload | URI | Description |
---|---|---|---|---|
GET |
NA |
NA |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/ |
Gives a top level view of the general and service specific preferences. |
Table 52-65 GET Request Configuration for Viewing Details of My Preferences Resource
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "servicePreferences":"/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services", "canonicalLink":"/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/"
This represents the general user preferences that are applicable across all service types.
Table 52-66 General Preferences Data Model
Field | Type | Description | Occurs |
---|---|---|---|
emailAddress |
String |
This is the default email address for receiving cloud notifications. |
0..1 |
locale |
String |
This is the default locale for receiving cloud notifications. The default locale is English. Supported values include:
|
0..1 |
request |
RequestEntity |
Request notification values. |
0..1 |
instanceExpiry |
InstanceExpiryEntity |
Instance expiry notification values. |
0..1 |
quota |
QuotaEntity |
Instance expiry notification values. |
0...1 |
quotaThreshold |
Integer |
Notifications will be sent to users when resources exceed the defined quota percentage. |
0..1 |
defaultServiceType |
String |
This is the default service after successful login to Self Service Portal.If not specified, this is defaulted to servers. Supported service type values include: IAAS (Servers), DBAAS (Databases), MWAAS (Middleware) , TAAS (Tests) |
0..1 |
canonicalLink |
URI |
A GET against this URI refreshes the client representation of this resource. |
1 |
The following composite resource attribute data model are described in this section.
RequestEntity
InstanceExpiryEntity
QuotaEntity
The following table describes the RequestEntity data model:
Table 52-67 RequestEntity Data Model
Field | Type | Description | Occurs |
---|---|---|---|
requestNotifications |
boolean |
This allows the user to receive notifications for different statuses of the request. |
0..1 |
requestStatus |
List<String> |
The list of request statuses for which notifications are enabled. Supported request status values are:
|
The following table describes the InstanceExpiryEntity data model:
Table 52-68 InstanceExpiryEntity Data Model
Field | Type | Description | Occurs |
---|---|---|---|
instanceExpiryNotifications |
boolean |
Enables user to receive notifications for service instances that are scheduled to expire based on the notification period. |
0..1 |
daysBeforeFirstNotification |
Integer |
The number of days before the first notification is sent to the user before the expiry date of the service instance. |
0..1 |
daysBeforeSecondNotification |
Integer |
The number of days before the second notification is sent to the user before the expiry date of the service instance. |
0..1 |
The following table describes the QuotaEntity data model:
The following table shows the supported methods:
Method | Query Parameters | Request Payload | URI | Description |
---|---|---|---|---|
GET |
NA |
NA |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/general |
Gives the general preferences for an SSA user. |
PUT |
NA |
GeneralPreferences |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/general |
Updates the general preferences for an SSA user. |
The table below provides the configuration for a GET request to know the general preferences for an SSA user.
Table 52-71 GET Request Configuration for Viewing Details of General Preferences for an SSA User
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/general/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
{ "emailAddress": "john.smith@cloudcompany.com", "locale": "English", "request": { "requestNotifications": true, "requestStatus": ["SUCCESS","INCOMPLETE"] } "instanceExpiry": { "instanceExpiryNotifications": true, "daysBeforeFirstNotification": 10, "daysBeforeSecondNotification": 5 }, "quota": { "quotaNotifications": true, "quotaThreshold": 80.0 }, "defaultServiceType": "Servers", "canonicalLink": "em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/general" }
The table below provides the configuration for a PUT request to update the general preferences for an SSA user.
Table 52-72 PUT Request Configuration for Updating the General Preferences for an SSA User
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/general/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body to update a single field |
{ "emailAddress": "john.smith@cloudcompany.com", "locale": "en", "defaultServiceType": "IAAS", } |
Body to update all fields |
{ "emailAddress": "john.smith@cloudcompany.com", "locale": "en", "request": { "requestNotifications": true, "requestStatus": ["SCHEDULED","INCOMPLETE"] }, "instanceExpiry": { "instanceExpiryNotifications": true, "daysBeforeFirstNotification": 10, "daysBeforeSecondNotification": 5 }, "quota": { "quotaNotifications": true, "quotaThreshold": 80 }, "defaultServiceType": "IAAS" } |
Body to update Notification fields |
{ "request": { "requestNotifications": true, "requestStatus": ["SCHEDULED","INCOMPLETE"] } } |
Body to update instance expiry notification fields |
{ "instanceExpiry": { "instanceExpiryNotifications": true, "daysBeforeFirstNotification": 10, "daysBeforeSecondNotification": 5 } } |
Body to update quota notification fields |
{ "quota": { "quotaNotifications": true, "quotaThreshold": 80 } } |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { message: "General Preferences updated successfully." }
This section describes the following:
The Service Preferences resource represents the user preferences of an SSA user per service family.
Table 52-74 Supported Methods (II)
Method | Query Parameters | Request Payload | URI | Description |
---|---|---|---|---|
GET |
NA |
NA |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services |
This gives the top level view of service preferences for all service families. |
GET |
NA |
NA |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/ services/<servicefamily> |
Gives user preferences of SSA user for a specific service family. |
PUT |
NA |
ServicePreferences |
em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/ services/< servicefamily > |
Updates the user preferences of SSA user for a specific service family. |
This fetches the set of user preferences metadata relevant to the respective service family.Using this, the user can identify the user preferences available for each service family and the possible values of each.
Table 52-75 ServicePreferenceMetaData Data Model
Field | Type | Description | Occurs |
---|---|---|---|
canonicalLink |
URI |
A GET against this URI refreshes the client representation of this resource. |
1 |
servicePreferencesMeta |
Collection<ValueDescriptor> |
The set of user preferences metadata relevant to the respective service type. |
0..1 |
Some of the resource entities in this specification contain the following composite resource attributes:
This represents a value (string representation) and their description (caption). The following table describes the data model:
This represents a simple entity having a name, value and description. The following table describes the data model:
This describes the metadata regarding the type of value that can be set upon an associated object. The following table describes the data model.
Table 52-78 ValueDescriptor Data Model
Field | Type | Description | Occurs |
---|---|---|---|
name |
String |
Name of the datum being described. |
1 |
displayName |
String |
Display name of the datum being described. |
0..1 |
description |
String |
Description of the datum referred. |
0..1 |
currentValue |
String |
Current value of the datum being described. |
0..1 |
isRequiredAttribute |
boolean |
True if the value of the datum is required. |
0..1 |
possibleValues |
Collection<ValueEntity> |
Optional list of valid values of the datum being described. |
0..1 |
description |
String |
Description of the datum referred. |
0..1 |
This section describes the REST API examples of the Service Preferences resource.
The table below shows the GET request configuration for getting top level view of service preferences for all service families.
Table 52-79 GET Request Configuration for Viewing Details of Service Preferences Resource
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { DBAAS: { displayName: "My Database Preferences" description: "User preferences for Database services" canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas" } MWAAS: { displayName: "My Middleware Preferences" description: "User preferences for Middleware services" canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas" } TAAS: { displayName: "My Tests Preferences" description: "User preferences for Testing as a Service (TaaS)" canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/taas" } canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services" }
This section details the REST API examples for My Database Preferences resource which specifies the preferences for database services.
The table below shows the configuration for the GET request.
Table 52-80 GET Request Configuration for Viewing Details of the DBaaS User Preferences Metadata
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas/metadata |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { servicePreferencesMetadata: { items: { name: "defaultPaasZone" displayName: "Default PaaS Infrastructure Zone" description: "Default PaaS Infrastructure Zone" currentValue: "" isRequiredAttribute: false possibleValues: { value: "dbaas_west_coast_zone" } } } canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas/ metadata" }
The table below shows the PUT request configuration.
Table 52-81 PUT Request Configuration for Updating the DBaaS User Preferences
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "servicePreferences": { "items":[ { "name": "defaultPaasZone", "value": "dbaas_west_coast_zone" } ] } } |
Request method |
PUT |
A sample of the response received is shown below.
Status 200 OK { message: Service Preferences updated successfully." }
The table below shows the PUT request configuration.
Table 52-82 PUT Request Configuration for Setting a Blank DBaaS User Preference Setting
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "servicePreferences": { "items":[ { "name": "defaultPaasZone", "value": "" } ] } } |
Request method |
PUT |
A sample of the response received is shown below.
Status 200 OK { message: Service Preferences updated successfully." }
The table below shows the GET request configuration.
Table 52-83 GET Request Configuration for Viewing the DBaaS User Preference Setting
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/dbaas" servicePreferences: { items: { name: "defaultPaasZone" value: "dbaas_west_coast_zone" } } }\
This section shows the REST API examples of user preferences for Middleware services:
The table below shows the GET request configuration.
Table 52-84 GET Request Configuration for Viewing the MWaaS User Preferences Metadata
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas/metadata/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { servicePreferencesMetadata: { items: { name: "defaultPaasZone" displayName: "Default PaaS Infrastructure Zone" description: "Default PaaS Infrastructure Zone" currentValue: "" isRequiredAttribute: false possibleValues: { value: "mwaas_east_coast_zone" } } } canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas/ metadata" }
The table below shows the PUT request configuration.
Table 52-85 PUT Request Configuration for Updating MWaaS User Preferences
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "servicePreferences": { "items":[ { "name": "defaultPaasZone", "value": "mwaas_east_coast_zone" } ] } } |
Request method |
PUT |
A sample of the response received is shown below.
Status 200 OK { message: Service Preferences updated successfully." }
The table below shows the PUT request configuration.
Table 52-86 PUT Request Configuration for Setting a Blank MWaaS User Preference Setting
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
{ "servicePreferences": { "items":[ { "name": "defaultPaasZone", "value": "" } ] } } |
Request method |
PUT |
A sample of the response received is shown below.
Status 200 OK { message: Service Preferences updated successfully." }
The table below shows the GET request configuration.
Table 52-87 GET Request Configuration for Viewing MWaaS User Preference Settings
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas/ |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/mwaas" servicePreferences: { items: { name: "defaultPaasZone" value: "mwaas_west_coast_zone" } } }
This section details the REST API examples of user preferences for Testing as a Service (TaaS).
The table below shows the GET request configuration.
Table 52-88 GET Request Configuration for Viewing TaaS User Preferences Metadata
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/taas/metadata |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= Content-Type: application/json |
Body |
None |
Request method |
GET |
A sample of the response received is shown below.
Status 200 OK { servicePreferencesMetadata: { items: { name: "defaultInstanceRootPassword" displayName: "Default Instance Root Password" description: "The password that will be set as default root password to new environment and test driver instance." currentValue: "" isRequiredAttribute: false } } canonicalLink: "/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/taas/m etadata" }
The table below shows the PUT request configuration.
Table 52-89 PUT Request Configuration for Updating TaaS User Preferences
Feature | Specification |
---|---|
URI |
/em/websvcs/restful/extws/cloudservices/ssa/cfw/v1/mypreferences/services/taas |
Request headers |
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI= |
Body |
{ "servicePreferences": { "items":[ { "name": "defaultInstanceRootPassword", "value": "AQPY8bgHk" } ] } } |
Request method |
PUT |
A sample of the response received is shown below.
Status 200 OK { message: "Service Preferences updated successfully." }