Route: /api/v2/federal_accounts/<PK>/spending_by_award/
Method: GET
This route takes a federal_account DB ID and returns the data reqired to visualized the Award Table
{
"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