-
Notifications
You must be signed in to change notification settings - Fork 35
API guide
All the core RCB Cyclops micro services offer the same HTTP RESTful API interface. You can rely on this structure to be always present, therefore you can write your own applications or visual interfaces on top of them, where it doesn't matter whether it is UDR, CDR or Billing micro service, as they all work in the same fashion.
In order to guarantee that all API queries are performant (based on administrator's wishes), all responses are paginated. Which means that if your query execution contains 20'000 records, but administrator specified page size limit of 5'000, you will only get a subset of data. However, you will also see the following metadata:
- displayedRecords - number of returned records
- totalRecords - number of total records
- pageNumber - what page are you looking at
- pageSize - what is the page limit size
If you are running autoscaler or are scaling in/out containers, effectively spawning new instances on peak loads, you can easily parallelise these queries and ask for more than just one page at the time. You will still need to collect all the data for queries you want to execute manually and traverse all the pages, in order to have a guarantee that micro services will have desired performance.
Mutated APIs encoding domain specific processes are documented in Rating-Charging-Billing subpage, where low level APIs reflecting the underlying storage subsystem are available down below.
If you want to see the list of persisted measurements that are available to you, simply query:
In order to request a certain measurement to be displayed (with pagination support):
All the fields and tags you have stored for a particular measurement are accessible and you can utilise them in order to query for a specific subset of data, like for example an account like this:
If you see that what you've received is just a first page of many, you can simply add page:
Optionally you can also specify from and to parameters, either both of them, or just one:
- http://address:port/measurement/name**?from=1451650521**
- http://address:port/measurement/name**?to=1467375357**
- http://address:port/measurement/name**?from=1451650521&to=1467375357**
The timestamp format is a well known Unix time, where the API interface expects seconds.
As was already hinted in the previous example, all the queries are with the standard URL encoding, allowing for more than just one parameter to be provided. You can therefore very easily query for combination of different parameters, effectively slicing data based on provided fields/tags.
At any time you can request statistics about the individual micro services, telling you how many times a certain endpoint was queried, as well as what is the running average of latency in fulfilling certain API requests. Keep in mind that by accessing this statistics they get reseted and therefore start counting from zero again. You can use this to build an overall picture about the performance characterisation of your RCB Cyclops deployment.
In case that you need to programatically access the list of currently supported endpoints:
To see what version of the RCB Cyclops micro service you are running, visit this endpoint:
