Skip to content

Instantly share code, notes, and snippets.

@russellbodine
Last active January 16, 2018 17:51
Show Gist options
  • Save russellbodine/861941a450684bec0a55ad9cf25ceeb5 to your computer and use it in GitHub Desktop.
Save russellbodine/861941a450684bec0a55ad9cf25ceeb5 to your computer and use it in GitHub Desktop.

Federal Account Fiscal Year Snapshot

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

Method: GET

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

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