Skip to content

Instantly share code, notes, and snippets.

@nmonga91
Last active July 12, 2017 19:05
Show Gist options
  • Save nmonga91/870333b21f70c733763395622a2a4995 to your computer and use it in GitHub Desktop.
Save nmonga91/870333b21f70c733763395622a2a4995 to your computer and use it in GitHub Desktop.
Agency Metadata

Retrieve agency information

Route: /api/v2/references/agency/:id

Method: GET

This route sends a request to the backend to retrieve an agency's metadata

Request example

/api/v2/references/agency/261

Query Parameters Description

  • id - required - an integer representing the toptier agency ID to retrieve

Response (JSON)

{
    "results": {
        "agency_name": "Department of Labor",
        "active_fy": "2017",
        "active_fq": "2",
        "outlay_amount": "4772.51",
        "obligated_amount": "0.00",
        "budget_authority_amount": "2945353.45",
        "current_total_budget_authority_amount": "-1",
        "mission": "To foster, promote, and develop the welfare of the wage earners, job seekers, and retirees of the United States; improve working conditions; advance opportunities for profitable employment; and assure work-related benefits and rights.",
        "website": "https://www.dol.gov/",
        "icon_filename": "DOL.jpg"
    }
}

Response Attributes Description

  • 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
  • mission: Agency's mission statement
  • website: Agency's website URL
  • icon: URL to Agency's icon

NOTE:

  • If agency id does not exist or agency has no corrisponding submissions results will be empty (i.e., {})
  • If total_budget_authority_amount is not in the db, it returns a vaule of "-1"

Errors

Possible HTTP Status Codes:

  • 500 : All other errors
{
  "message": "Sample error message"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment