REST API
This chapter describes how to work with the Oracle Communications Operations Monitor REST API.
A simple REST API facilitates access to much of the information generated by Operations Monitor.
REST is a way of implementing Remote Procedure Call (RPC) systems on top of HTTP. REST APIs are stateless, since they don't use mechanisms of application state keeping that are traditionally employed together with HTTP, such as cookies or sessions. Everything necessary for keeping the application state must be encoded into the HTTP requests. REST APIs are structured around addressable resources, that means all information, that is provided or manipulated by the API, is addressable with HTTP URLs. Conceptually, resources are like the files and directories of a file system, organized into a tree of parents and children.
From the generally used HTTP methods GET, POST, PUT, and DELETE, Operations Monitor's REST API only uses the GET method, as the interface is intended to only query information from Operations Monitor.
Note:
The remote application needs to authenticate itself with the administrator password over the standard HTTP Basic mechanism.
Note:
REST API searches are not guaranteed to be real-time without advanced hardware sizing.
Example call:
$ curl -L -u admin:<passwd> https://10.1.0.81/r/users/00493077715680/calls/recent {"data": [ {"state_msg": "Finished", "code": 200, "dst_codecs": "PCMU,PCMA,iLBC,telephone-event", "src_codecs": "PCMU,PCMA,telephone-event,iLBC", "pid": 1250018007, "url": "\/r\/users\/00493077715680\/calls\/1250018007:16739", [...] } [...] ]}
Note:
Oracle recommends to replace the self-signed certificate delivered with the software with a certificate signed by a certificate authority. If you are using self-signed certificate, it is possible that the connection fails as the certificate could not be verified. You have to either install the certificate of the signing CA or provide a method to use the tool directly.
For curl, you could pass the certificate as follows:
curl --cacert <file with the certificate> -L -u admin:<passwd> https://10.1.0.81/r/users/00493077715680/calls/recent