REST-API Data Access

For accessing the end-points of this API, you will need JWT tokens from the Management Portal and send it with each request in the header. In order for your token to allow access to the Rest-Api you will need to add the resource name of rest-api (ie - res_RestApi) in the oauth client details of the Management Portal(MP).


For example, if you want a client named dashboard to have access to the REST API just add this line to the OAuth client credentials csv file of MP. For more information look at this file -

dashboard;res_RestApi;my-secret-token-to-change-in-production;SUBJECT.READ,PROJECT.READ,SOURCE.READ,SOURCETYPE.READ,MEASUREMENT.READ;client_credentials;;;1800;3600;{};true


You can change the secret, scope, name, etc according to your needs. For more info, read the OAuth configuration here . Note that OAuth clients can also be configured via the Management Portal UI.

After the OAuth Client is configured just request a new Access token from Management Portal at path  '<management_portal_url>/oauth/token' using the Client credentials grant type and the above configured client id and secret. This token will grant access to the REST-API resources.


The Rest-api is capable of reading bins.csv file generated while restructuring the HDFS file system. See hdfs_restructure.sh. This file gives a summary of records being received by the Radar Platform. Please place it in the /usr/local/tomcat/bin/radar/bins.csv for it to be readable by the RestApi. This is available at the end-point <your-server-address>:<port>/api/status/hdfs and can be obtained as a JSON format response.