Last active
August 2, 2017 19:21
-
-
Save russellbodine/7fd4d1a58d36eea09c79fcc2f81153a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Retrieve all toptier agencies data | |
| Route: api/v2/references/toptier_agencies/ | |
| Method: GET | |
| This route sends a request to the backend to retrieve an agency. | |
| EXAMPLE RESULTS | |
| ``` | |
| {'results': [ | |
| { | |
| 'agency_id': 4, | |
| 'abbreviation': 'tta_abrev', | |
| 'agency_name': 'tta_name', | |
| 'active_fy': '2017', | |
| 'active_fq': '2', | |
| 'outlay_amount': '2.00', | |
| 'obligated_amount': '2.00', | |
| 'budget_authority_amount': '2.00', | |
| 'current_total_budget_authority_amount': '3860000000.00' | |
| 'percentage_of_total_budget_authority': '1.21231' | |
| }, | |
| ... | |
| ] | |
| ``` | |
| RESULT VARS (all values are returned as STRINGS or NONE) | |
| * agency_id: Agency Id (for querys to the agency endpoint) | |
| * abbreviation: The agency's acronym | |
| * agency_name: Agency name (most important) | |
| * active_fy: most recent fiscal year data is provided for that agency | |
| * active_fq: most recent fiscal quarter data is provided for that agency | |
| * outlay_amount: Agency's outlay amount | |
| * obligated_amount: Agency's obligated amount | |
| * budget_authority_amount: Agency total budget authority | |
| * current_total_budget_authority_amount: Govenment total budget authority for the respective fiscal year | |
| * percentage_of_total_budget_authority: budget_authority_amount/currnet_total_budget_amount | |
| ERRORS | |
| if agency id does not exist or agency has no corrisponding submissions, a response of 'results': [] | |
| if total_budget_authority_amount is not in the db, it and percentage_of_total_budget_authority are returned as "-1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment