usaspending-api icon indicating copy to clipboard operation
usaspending-api copied to clipboard

Can't get the financial_spending/object_class endpoint to work

Open bsweger opened this issue 8 years ago • 1 comments

When doing a GET to https://api.usaspending.gov/api/v2/financial_spending/object_class/?fiscal_year=2017&funding_agency_id=036, I keep getting an error message that says Missing one or more required query parameters: fiscal_year, funding_agency_id

I see this message in the browser and also when using Postman. Am I doing it wrong? 😀

screen shot 2017-07-06 at 10 07 30 pm

bsweger avatar Jul 07 '17 02:07 bsweger

https://github.com/fedspendingtransparency/usaspending-api/blob/dev/usaspending_api/accounts/urls_financial_spending.py

https://github.com/fedspendingtransparency/usaspending-api/blob/dev/usaspending_api/accounts/views/financial_spending.py

What's the difference between the minor object class and the object class? The endpoint you're using requires an additional parameter, major_object_class_code. You could try ...spending/major_object_class/...

That's linked with the ObjectClassFinancialSpendingViewSet class/view.

I'm not involved with this project so that's just a guess on my part.

matthewmc avatar Nov 28 '17 04:11 matthewmc