code-gov-api icon indicating copy to clipboard operation
code-gov-api copied to clipboard

Get Agency Dashboard Data with Smaller Fetch Request

Open DanielJDufour opened this issue 7 years ago • 3 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] It appears that the dashboard is populated by data from this endpoint: https://api.code.gov/status.json, which amounts to over 100kb

Describe the solution you'd like A clear and concise description of what you want to happen. I'd like to receive the information to populate the dashboard and only that information. It seems that the status.json returns information about errors, too. Perhaps, there can be a new /dashboard.json endpoint that only returns the required information?

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. I could parse the return and create a static json file that I put it in the code-gov-data repo. The front-end site would then fetch that parsed json file, rather than the original from the status.json endpoint.

Additional context Add any other context or screenshots about the feature request here. image

I'm going to lazy load this information, so it won't drag down the site performance. This isn't an urgent request.

DanielJDufour avatar Nov 03 '18 01:11 DanielJDufour

Hello I would like to help with this issue. Could you please provide me with some info?

E01T avatar Jan 12 '19 12:01 E01T

@DanielJDufour, can you assist here. Is this still needed? Thanks!

jcastle-zz avatar Jan 28 '19 15:01 jcastle-zz

Hi, @E01T. Happy to provide some answers to you =) Basically, we need someone to create a new API endpoint using our current framework (express) that returns a trimmed down version of the status.json endpoint filtering out unnecessary information for display purposes.

This provides a good example of the data required by the dashboard web component.

https://github.com/GSA/compliance-dashboard-web-component/blob/master/example-data.json

Let me know if you have any more questions :-)

DanielJDufour avatar Jan 28 '19 21:01 DanielJDufour