Mirror of Oracle documentation

Converted for search and offline reading. Authoritative source: Oracle. Diagrams and some complex tables are simplified — check the PDF when in doubt.

7 UI Platform Services

The user interface for the Merchandising solutions has some common components that you may want to use in building custom workflows related to managing user notifications.

These ReST services are packaged as part of the Merchandising solution’s Enterprise Archive (EAR) file. Installation of the ReST web services is therefore done by default.

Security

Services are secured using the J2EE-based security model.

  • Realm-based User Authentication: This verifies users through an underlying Realm. The username and password are passed using HTTP basic authentication.

  • Role-based Authorization: This assigns users to roles; authenticated users can access the services within the Merchandising suite.

  • The communication between the server and client is encrypted using one-way SSL. In non-SSL environments the encoding defaults to BASE-64 so it is highly recommended that these ReST services are configured to be used in production environments secured with SSL connections.

Standard Request and Response Headers

The UI platform ReSTful web services have the following standard HTTP headers:

NameValueRequiredDescription
Acceptapplication/json
OR
application/xml
Optional.
If a response payload is
expected instead of just
an appropriate HTTP
status code
Tells the server the MIME-type
of the resource.
Accept-Version1.8.3YesDepicts which version of the
Platform Services is expected.
Accept-VersioningfalseNoSpecified in the service request
to bypass version validation
Accept-Languageen-USNoDefaulted by most clients to the
destination locale
Content-Typeapplication/json
OR
application/xml
Optional.
If a request payload is
expected. Helps the
server determine how to
parse the request.
Informs the server during PUT
or POST requests, of the
format of the payload being
sent.
AuthorizationBase64 encoded
credentials string
YesAuthenticates a user agent with
the server

Depending on the type of the operation or HTTP method, the corresponding response header is updated in the HTTP response with the following codes:

7-1

  • GET/READ : 200

  • PUT/CREATE : 201 created

  • POST/UPDATE : 204

  • DELETE : 204

Standard Error Response

Example response payload in case of service error is depicted below:

   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <messagesRDOes>
     <messagesRDO>
        <message>REST Service Version Mismatch</message>
        <messageType>ERROR</messageType>
        <status>BAD_REQUEST</status>
    </messagesRDO>
   </messagesRDOes>
  • Message: The error message - translated.

  • MessageType: Value of ‘ERROR’ is returned.

  • Status: For a bad request or error, the status is BAD_REQUEST.

  • The http error code for an error response is 400

List of ReST Services

The ReST services exposed by the UI platform are accessible from the below URL for Merchandising cloud services. The URL to use is:

https://rex.retail.<Region Name>.ocs.oraclecloud.com/<Customer Subnamespace>/
RmsPlatformServices/services/private/*

Notifications

DescriptionURLHTTP
Method
Creating Notifications/Notifications/createPOST
Updating Notifications/Notifications/updatePUT
Deleting Notifications/Notifications/delete/{id}DELETE
Fetch Notifications/Notifications/fetch?appCode={appCode}GET
Get number of unread
Notifications
/Notifications/fetch/unreadCount?appCode={appCode}GET
Search Notifications/Notifications/search?appCode={appCode}GET

7-2

DescriptionURLHTTP
Method
Filter Notifications -
Return list of
/Notifications/filter/listPOST
Notifications
Filter Notifications -
Return grouped list of
Notifications
/Notifications/filter/groupPOST
Filter Notifications -
Return a summarized
list of Notifications
/Notifications/filter/summarizePOST
Count Notifications
matching the filter
/Notifications/filter/countPOST
Persist the Criteria/Notifications/criteriaPOST
Fetch the Criteria/Notifications/fetch/criteria?appCode={appCode}GET
Fetch Recipients/Notifications/fetch/recipients/{id}GET
Fetch Notification
Context
/Notifications/fetch/context/{id}GET
Fetch Notification Time
Periods
/Notifications/fetch/timeperiods?appCode={appCode}GET
Fetch Notification
Hierarchy Levels
/Notifications/fetch/hierarchylevels?appCode={appCode}GET
Fetch Notification
Types
/Notifications/fetch/notificationtypes?
appCode={appCode}
GET
Status update for
multiple Notifications
/Notifications/update/multiple/statusPUT
Delete multiple
Notifications
/Notifications/delete/multiplePOST

7-3


In this guide