BetaNYC / budgetBuddy

An API for more intuitive access to NYC Budget Data, current and historical

Home Page:http://budgetbuddy.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Calls

akilism opened this issue · comments

Taken from: https://github.com/BetaNYC/budgetBuddy/blob/master/apiCalls.txt

Some API Questions:

Our Hierarchy looks like:
year/operatingBudget/agency/unitOfAppropriation/responsibilityCenter/budgetCode/objectclass/object

  • Should we include all subordinate data when a given level is queried?
  • Should we have a flag for whether the results are roll-up for that level, or include subordinate data?

GET /:year/op - citywide totals with agency totals rolled up.
GET /:year/op/detail - full drill down - this is basically the whole database... no?

GET /:year/op/:agency - just has the totals for the agency and roll ups for the next lower element in the hierarchy
GET /:year/op/:agency/detail - full drill down

GET /:year/op/:agency/:uoa - just this UOA and its children (responsibility centers)
GET /:year/op/:agency/:uoa/detail - full drill down

...and so on...

Year to Year comparisons?

GET /:year/op/:agency/history?since=2012

Rollup Object Classes at the agency level:

GET /:year/op/:agency/?objectClass=01 This will return the sum of all object class 01 values in this agency
//how do we query multiples?

My personal preference is that the GET /:year/op request would return the full data and that there should be a different URL for the rolled up totals. GET /:year/op/total

Don't forget the API version number.

Built in GET /api/v1/:year/op/summary to my /server2 app. "summary" seems more descriptive than "total" in Akil's comment above.

I would like this request to return the agency count and total budget for NYC, then have the array of agencies as a child.

You all still need any help here?

Hello! This issue looks like it still needs help!
It's been clicked on 60 times through the Civic Issue Finder on http://www.codeforamerica.org/.
Can this issue be closed or does it still need some assistance?

If you wrote this issue, you can always update the labels for specifying tasks, add more info in the description to make it easier to contribute, or re-write the title to make more contributors interested in helping out.
If you are an open source contributor, ask and see how you can help by commenting or check out more open issues in this repo at https://github.com/BetaNYC/budgetBuddy/issues.

Just doing a little 🌱 open source gardening 🌱 of Brigade projects!
For more info/tools for creating civic issues, check out Got Issues Thank you!