Oracle CRMOD – REST API

In R27, Oracle has released much awaited “REST API” to develop Custom Extensions on CRMOD application. This blog article covers overview of REST API, comparing it with SOAP and discussing the benefits.

1. REST – Introduction
• REST stands for Representational State Transfer and is an architectural style that makes use of existing technology and protocols of the Web, such as HTTP and JSON.
• A REST API allows you to send data requests and receive responses over an HTTP interface.
• REST requests and responses include a header and a body.
• The header defines the operating parameters of the interaction and contains metadata, such as HTTP methods (GET, POST, PATCH, and DELETE) or encoding information.
• The body contains data that you want to transmit over the network, to use it according to the instructions in the header. The body can also remain empty.

2. CRMOD REST API – Overview
In R27, Oracle published REST API to facilitate developing custom extensions to Oracle CRM On Demand by using the GET, POST, PATCH, and DELETE HTTP methods.
REST

3. REST API – Fundamentals

3.1 Requests: CRMOD REST API request can include the following information:
• A request URL
• Object Name
• HTTP Method Name (create, retrieve, update, or delete)
• Header information – fields, content type, format,..
• Optional query/filter parameters
• Optional sorting parameters

3.2 Responses: The response can include the following information:
• A HTTP status code
• The response body

3.3 Authentication:
• To send REST API requests and receive REST API responses, we must be successfully signed in to Oracle CRM On Demand
• If we are not signed in to Oracle CRM On Demand and, try to send a REST API request, then the REST request is redirected to the Oracle CRM On Demand login page
• REST API call inherits the same Data Access & Visibility settings of the logged in user

3.4 REST API Request Rate Limits
• CRMOD’s REST API resources can be shared by multiple users
• CRMOD limits the number of REST API requests that a user can simultaneously execute during a defined time period
• By default, the REST Request Rate Limit is 30 requests for each minute
• The calculation of the REST request rate begins with a user’s first request and refreshes every minute
• If a user session expires, or if the user signs in again, then the calculation begins again from the minute of the first request

3.5 REST API Privilege
• To send requests and manage RESTful Services Integration, your user role must include the privilege: Restful Services Integration
• Contact Oracle Customer Care to enable the privilege

4. REST API – Comparison with SOAP

4.1 Objects/Operations Support:
• All the Core & Child Objects supported by SOAP are supported by REST
• Service APIs – Only Mapping Service equivalent (Describe) is supported in REST. Others such as Deleted Item, IEQ,.. are not supported
• No Support for Administrative Services
• Upsert Operation is not supported

4.2 Others:
• The Oracle CRM On Demand REST API supports only JSON encoding for the request body
• The Oracle CRM On Demand REST API resource can be accessed by both the default tag name and the custom tag name that you create. For example, if Accounts has a custom tag name, Companies, then Accounts can be accessed by both of the following URLs:
http://server/OnDemand/user/Rest/027/Accounts.
http://server/OnDemand/user/Rest/027/Companies
• Finder parameter is supported only for top level objects
• Special Search Fields – Some field names are prefixed with CI_ to denote that they are special fields that provide better search functionality
• The Oracle CRM On Demand REST API uses Oracle CRM On Demand authentication. You must be successfully signed in to Oracle CRM On Demand to send REST API requests and receive REST API responses.
• Oracle CRM On Demand REST API to be used for interactive operations with Oracle CRM On Demand. For Oracle CRM On Demand bulk operations, use Web services

5. REST API – Benefits:Using REST API we can develop extensions that runs within CRMOD (Web link, web applet, web tab,..) using Client Side Technologies such as JavaScript and host them with in CRMOD using Client Side Extensions (CSE). The following are the benefits,
• REST requests can only be triggered from within CRMOD and the authentication & access control is automatically handled by CRMOD based on the user profile from which the request is triggered. No need to explicitly pass the SSO Token/User credentials in the REST request. This results in improved security and performance of web services calls
• Web services allotments cost can be reduced using the CSE based solutions
• REST API is much simpler & faster compared to SOAP
• Saves initial & ongoing maintenance costs associated with Hardware & Software (Application Server) required to deploy Java/.Net based solutions
• CSE components reside within CRMOD app and hence offers the following additional advantages,
o Web Services calls respond faster since the request are initiated from the same server rather than third party hosting server
o CSE Components and web services calls inherits the security practices of CRMOD
• While designing and developing CSE based solutions, leading responsive design frameworks such as (Bootstrap, WebIx, Sencha,..) can be used to develop the custom web pages. With this, all custom web pages can be accessible using desktops, mobiles and tablets

6. Technical Competency Required:
• Basic Knowledge on REST
• Advanced Java Script
• Angular
• Knowledge on HTML or any of the UI Development frameworks such as WebIx, Bootstrap,..
• Client Side Extensions
• Knowledge on CRMOD Data Model

I hope this article provided a high level insights to REST API to get started with it. Happy Scripting!!