Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catherinedevlin/4d26ba73a6ae7a013bbb565f99bdb053 to your computer and use it in GitHub Desktop.
Save catherinedevlin/4d26ba73a6ae7a013bbb565f99bdb053 to your computer and use it in GitHub Desktop.

Federal Account Fiscal Year Snapshot

Route: /api/v2/federal_accounts/<PK>/fiscal_year_snapshot/<FY?>

Method: GET

This route takes a federal_account DB ID and returns the data reqired to visualized the fiscal_year_snapshot graphic.

If is not specified, results are returned for the current fiscal year, defined as the most recent FY for which submissions have been certified.

Response (JSON)

{
    "results": 
        {"outlay": 1,
	"budget_authority": 1,
	"obligated": 1,
	"unobligated": 1,
	"balance_brought_forward": 1,
	"other_budgetary_resources": 1,
	"appropriations": 1
	}
    

Mappings

These are the db columns for the above results:

outlay: 'gross_outlay_amount_by_tas_cpe',
    budget_authority: 'budget_authority_available_amount_total_cpe',
    obligated: 'obligations_incurred_total_by_tas_cpe',
    unobligated: 'unobligated_balance_cpe',
    balance_brought_forward: 'budget_authority_unobligated_balance_brought_forward_fyb' + 'adjustments_to_unobligated_balance_brought_forward_cpe'  DONT FORGET TO ADD BOTH FIELDS,
    other_budgetary_resources: 'other_budgetary_resources_amount_cpe',
    appropriations: 'budget_authority_appropriated_amount_cpe'

Errors

Possible HTTP Status Codes:

  • 400 : Missing parameters or limit is not a valid, positive integer
  • 500 : All other errors
{
  "detail": "Sample error message"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment