Route: /api/v2/federal_accounts/<PK>/spending_by_award_count/
Method: GET
This route takes a federal_account DB ID and returns the data reqired to visualized the Award Count values.
filter: Defines how the awards are filtered. The filter object is defined here.
https://gist.github.com/nmonga91/ba0e172b6d3f2aaf50f0ef1bb5d708bc#recipient-location
{
"time_period": "year"
"filters": {
"object_classes": [
{
"major_object_class_name": "Personnel compensation and benefits",
"object_class_names": ["Full-time permanent", "Other than full-time permanent", ...]
},
{
"major_object_class_name": "Other"
}
],
"program_activites": [1, 2, 3],
"time_period": [
{
"start_date": "2001-01-01",
"end_date": "2001-01-31"
}
]
}
}
{
"results":
{"contracts": 0, "grants": 0, "direct_payments": 0, "loans": 0, "other": 0}
Possible HTTP Status Codes:
- 400 : Missing parameters or limit is not a valid, positive integer
- 500 : All other errors
{
"detail": "Sample error message"
}
https://github.com/fedspendingtransparency/usaspending-website/wiki/Award-Search-Visualizations