Mocking Oracle Billing and Revenue Management (BRM) TMF Rest API services

Chintan
3 min readMay 5, 2021

TMForum open APIs are bunch rest APIs specifications developed collaboratively with industry experts in order to support Open digital architecture (ODA). https://projects.tmforum.org/wiki/display/API/Open+API+Table?_ga=2.65661741.204302112.1620197783-1945859912.1582096225

Oracle Billing and revenue management (BRM) product has released various rest APIs compliant with TMP open API spec. Most of the details are available in oracle docs. https://docs.oracle.com/en/industries/communications/billing-revenue/12.0/brm-rest-api/index.html

“BRM rest services manager” is the component responsible to expose TMF compliant rest end points to work with BRM solution. In order to actually access these APIs, one has to deploy complete BRM solution.

The intent of this write up is to demonstrate how to deploy a mock server and mocking these APIs in order to build interfaces without actually deploying complete BRM solution.

I will be using mock-server to mock the already available APIs. Details of mock-server available in https://www.mock-server.com/#what-is-mockserver. However there can be various other mocking tools available, i have just chosen this tool as an example.

Running mock-server

  1. download mockserver-netty-5.11.1-jar-with-dependencies.jar from Maven Central
  2. java -jar <path to mockserver-netty-5.11.1-jar-with-dependencies.jar> -serverPort <port>

Adding BRM open API spec as expectations

The idea is to directly get the open API documentation from oracle docs. This will help, when there are additional APIs support added to BRM product we can directly verify them.

Using curl command :

curl -v -X PUT “http://localhost:9999/mockserver/openapi" -d ‘{ “specUrlOrPayload”: “https://docs.oracle.com/en/industries/communications/billing-revenue/12.0/brm-rest-api/openapi.json" }’

Using postman:

Launching mock-server UI to verify APIs and expectations

Run URL in any browser, http://<mock-server host>:<mock-server port>/mockserver/dashboard

It should launch the UI, Scroll down to see all api’s available,

you can expand each API and see complete structure,

Calling mock API

As an example in order to mock the usage API, use the URL as http://<mock-server host>:<mock-server port>/usage?limit=2

You should be able to see the full response.

Next step: How to get meaning full data similar to BRM and as well as verifying extension. I am trying this will post soon.

--

--

Chintan
0 Followers

Tech profesional, experianced in delivering complex solutions for telecommunications and smart utilities industry using latest tech like IoT, Cloud, Analytics.