[APIM][Analytics] REST API for Analytics Graphs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[APIM][Analytics] REST API for Analytics Graphs

Fazlan Nazeem
Hi all,

With API manager C5 development, are planning to come up with a new web app for analytics which will include all stats graphs, which were previously in publisher and store. With this effort, all stats graphs will be moved from publisher and store to the analytics app. Depending on the role of the user who logs into this app, we will filter which gadgets will be shown. 

The statistic data writing model will still be the same, where DAS will write summarized data to the stats DB which will be then read by the charts in the analytics app of API manager through a REST api. Note that this is not the DAS REST api, but an MSF4j microservice which will reside on API Manager.

We have about 17 charts in API Manager 2.1.0. These charts can be categorized into three categories: Api, Application and Subscription. We will anyway have to review and finalize whether we are going to replicate the same set of graphs in C5 as well. This discussion is about the REST API for the analytics app.

Currently, I have the following design in mind.



Each chart will have its own resource with specific query params for filtering.   

https://localhost:9292/api/am/analytics/v1.0/charts/subscription/api_subscriptions

 

 

RESPONSE FORMAT


Each chart's response will be mapped into separate DTOs. For this, we could have a parent-child relationship modeled in swagger so that we do not duplicate fields. 



Any feedback?


--
Thanks & Regards,

Fazlan Nazeem
Senior Software Engineer
WSO2 Inc
Mobile : <a href="tel:%2B94%20%280%29%20773%20451194" value="+94773451194" target="_blank">+94772338839

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [APIM][Analytics] REST API for Analytics Graphs

Fazlan Nazeem
+ architecture

On Mon, Jun 5, 2017 at 11:33 AM, Fazlan Nazeem <[hidden email]> wrote:


On Mon, Jun 5, 2017 at 9:30 AM, Nuwan Dias <[hidden email]> wrote:
Shall we get rid of the word "charts" from the URL? This API is for querying data, which may or may not be used in a chart. So using the world "chart" in the URL is not right IMO.

Noted. Will get rid of that it.  

For almost all the resources of this API we will need to provide the date range as input. And the input on each resource may vary, therefore I don't think we can have a generic resource like Rukshan says. It will end up like a function which expects an input of type Object and perform various logic based on the type of Object it receives. This I think will end up with a too complicated resource.

On Sat, Jun 3, 2017 at 8:30 PM, Rukshan Premathunga <[hidden email]> wrote:
Hi Fazlan,

What is the advantages with the above suggested 3 resources(Api, Application and Subscription)? In this case i think it will be hard to introduce new chart without modifying the REST API.
Personally i would like to have a REST API with just one resource with template chart name

ex:
https://localhost:9292/api/am/analytics/v1.0/charts/{chart_name}

In this case we can extend the charts and introduce new chart without modifying or generating REST API Implementation again.

Also for the response i think it is better to have a chart oriented data like VizGrammar[1] or similar. Because in this case we can implement new chart easily. 
Also i think this approach will not limit custom dashboard implementation capabilities. 

WDYT?


Thanks and Regards


On Fri, Jun 2, 2017 at 2:12 PM, Fazlan Nazeem <[hidden email]> wrote:
Hi all,

With API manager C5 development, are planning to come up with a new web app for analytics which will include all stats graphs, which were previously in publisher and store. With this effort, all stats graphs will be moved from publisher and store to the analytics app. Depending on the role of the user who logs into this app, we will filter which gadgets will be shown. 

The statistic data writing model will still be the same, where DAS will write summarized data to the stats DB which will be then read by the charts in the analytics app of API manager through a REST api. Note that this is not the DAS REST api, but an MSF4j microservice which will reside on API Manager.

We have about 17 charts in API Manager 2.1.0. These charts can be categorized into three categories: Api, Application and Subscription. We will anyway have to review and finalize whether we are going to replicate the same set of graphs in C5 as well. This discussion is about the REST API for the analytics app.

Currently, I have the following design in mind.



Each chart will have its own resource with specific query params for filtering.   

https://localhost:9292/api/am/analytics/v1.0/charts/subscription/api_subscriptions

 

 

RESPONSE FORMAT


Each chart's response will be mapped into separate DTOs. For this, we could have a parent-child relationship modeled in swagger so that we do not duplicate fields. 



Any feedback?


--
Thanks & Regards,

Fazlan Nazeem
Senior Software Engineer
WSO2 Inc
Mobile : <a href="tel:%2B94%20%280%29%20773%20451194" value="+94773451194" target="_blank">+94772338839



--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
<a href="tel:+94%2071%20182%202074" value="+94711822074" target="_blank">+94711822074



--
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
Phone : <a href="tel:+94%2077%20777%205729" value="+94777775729" target="_blank">+94 777 775 729



--
Thanks & Regards,

Fazlan Nazeem
Senior Software Engineer
WSO2 Inc
Mobile : <a href="tel:%2B94%20%280%29%20773%20451194" value="+94773451194" target="_blank">+94772338839



--
Thanks & Regards,

Fazlan Nazeem
Senior Software Engineer
WSO2 Inc
Mobile : <a href="tel:%2B94%20%280%29%20773%20451194" value="+94773451194" target="_blank">+94772338839

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Loading...