Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ryan's feedback -- Good stuff! #484

Open
Ryandaydev opened this issue Jun 8, 2017 · 0 comments
Open

Ryan's feedback -- Good stuff! #484

Ryandaydev opened this issue Jun 8, 2017 · 0 comments

Comments

@Ryandaydev
Copy link

Ryandaydev commented Jun 8, 2017

Great job, very interesting API.

Some general feedback on this API:

Stuff I like

  • I like the addition of the key signup page right on the API doco, rather than pointing over to the api.data.gov. (Might be useful to mention here that they can re-use their API.DATA.GOV key.)

  • Good choice of typical API standards: UTF-8, JSON (also CSV available), ISO 8601/UTC dates.

  • Nice job including pagination.

Stuff To Think About

  • I'm not sure that having data on the end of the URL is necessary. It seems superfluous.

  • I would probably take agencies/<agency name> out of the URL path and pass it through the query string, i.e, /reports?agency_name=interior&api_key=DEMO_KEY1. The reason I suggest that is that the API is not really about agencies themselves (which is reflected in the fact that there is not an agencies endpoint). So it seems like the agency is really a query filter. However if future plans are to have a /agencies endpoint it would make sense to keep it there.

  • The API is returning an array, rather than a JSON object containing an array. This is one that contradicts the GSA API Standards, which is not the end of the world. But I also think the value of returning a JSON object is that it gives a useful wrapper for metadata about the result. A good usage in your case would be returning information about pagination, since you include that option.

Stuff to add in the future
This is a great start, so I know you'll keep improving it.

  • Add an endpoint for /reports/{id} using the report ID, e.g. /v1/reports/60716

  • After you add that endpoint, add a hypermedia link as an attribute of each report object, e.g,

{ "id": 60716, "report_name": "today", "report_agency": "justice", "date_time": "2017-04-07T14:00:00.000Z", "link": https://api.gsa.gov/analytics/dap/v1/reports/60716, "data": { "visits": "4240" }, "created_at": "2017-04-07T04:23:55.792Z", "updated_at": "2017-04-07T04:23:55.792Z" }

@Ryandaydev Ryandaydev changed the title Good stuff! Ryan's feedback -- Good stuff! Jun 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant