Skip to content

Commit

Permalink
Merge pull request #2886 from fedspendingtransparency/qat
Browse files Browse the repository at this point in the history
Sprint 122 Production Deploy
  • Loading branch information
tony-sappe authored Dec 28, 2020
2 parents 49e971f + 1ffaac7 commit aaeba02
Show file tree
Hide file tree
Showing 77 changed files with 3,139 additions and 2,507 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FORMAT: 1A
HOST: https://api.usaspending.gov

# Total Government Budgetary Resources [/api/v2/references/total_budgetary_resources/{?fiscal_year,fiscal_period}]

This endpoint is used to provide information on the federal budgetary resources of the government.

## GET

This endpoint returns federal budgetary resources by fiscal year and fiscal period.

+ Parameters

+ `fiscal_year`(optional, number)
The fiscal year.
+ `fiscal_period` (optional, number)
The fiscal period. If this optional parameter is provided then `fiscal_year` is a required parameter

+ Response 200 (application/json)

+ Attributes (object)
+ `results` (required, array[FederalBudgetaryResources], fixed-type)
+ Body

{
"results": [
{
"total_budgetary_resources": 8361447130497.72,
"fiscal_year": 2020,
"fiscal_period": 6
},
{
"total_budgetary_resources": 234525.72,
"fiscal_year": 2020,
"fiscal_period": 5
}
]
}

# Data Structures

## FederalBudgetaryResources (object)
+ `total_budgetary_resources` (required, number)
+ `fiscal_year` (required, number)
+ `fiscal_period` (required, number)
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
FORMAT: 1A
HOST: https://api.usaspending.gov

# Agency Reporting Differences [/api/v2/reporting/agencies/{toptier_code}/differences/{?fiscal_year,fiscal_period,page,limit,order,sort}]

This endpoint is used to power USAspending.gov's About the Data \| Agencies reported balance and spending differences over a submission period

## GET

This endpoint returns an overview of government agency obligation differences data.

+ Parameters
+ `toptier_code`: `020` (required, string)
The specific agency code.
+ `fiscal_year`: 2020 (required, number)
The fiscal year.
+ `fiscal_period`: 10 (required, number)
The fiscal period. Valid values: 2-12 (2 = November ... 12 = September)
For retriving quarterly data, provide the period which equals 'quarter * 3' (e.g. Q2 = P6)
+ `page` (optional, number)
The page of results to return based on the limit.
+ Default: 1
+ `limit` (optional, number)
The number of results to include per page.
+ Default: 10
+ `order` (optional, enum[string])
The direction (`asc` or `desc`) that the `sort` field will be sorted in.
+ Default: `desc`
+ Members
+ `asc`
+ `desc`
+ `sort` (optional, enum[string])
A data field that will be used to sort the response array.
+ Default: `tas`
+ Members
+ `difference`
+ `file_a_obligation`
+ `file_b_obligation`
+ `tas`

+ Response 200 (application/json)

+ Attributes (object)
+ `page_metadata` (required, PaginationMetadata, fixed-type)
+ `results` (required, array[ObligationDifferences], fixed-type)
+ `messages` (required, array[string], fixed-type)
An array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.
+ Body

{

"page_metadata": {
"page": 1,
"total": 10,
"limit": 2,
"next": 2,
"previous": null,
"hasNext": true,
"hasPrevious": false
},
"results": [
{
"tas": "011-X-8345-000",
"file_a_obligation": 47425.37,
"file_b_obligation": 240066.32,
"difference": -192640.95
},
{
"tas": "011-X-8245-000",
"file_a_obligation": 428508.11,
"file_b_obligation": 2358478.83,
"difference": -1929970.72
}
],
"messages": []
}

# Data Structures

## PaginationMetadata (object)
+ `page` (required, number)
+ `next` (required, number, nullable)
+ `previous` (required, number, nullable)
+ `hasNext` (required, boolean)
+ `hasPrevious` (required, boolean)
+ `total` (required, number)
+ `limit` (required, number)

## ObligationDifferences (object)
+ `tas` (required, string)
+ `file_a_obligation` (required, number)
+ `file_b_obligation` (required, number)
+ `difference` (required, number)
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
FORMAT: 1A
HOST: https://api.usaspending.gov

# Agency Reporting Discrepancies [/api/v2/reporting/agencies/{agency_code}/discrepancies/{?fiscal_year,fiscal_period,page,limit,order,sort}]

This endpoint is used to power USAspending.gov's About the Data \| Agencies TAS discrepencies over a submission period

## GET

This endpoint returns an overview of government agency TAS discrepancies data.

+ Parameters
+ `agency_code`: `020` (required, string)
The specific agency code.
+ `fiscal_year`: 2020 (required, number)
The fiscal year.
+ `fiscal_period`: 10 (required, number)
The fiscal period. Valid values: 2-12 (2 = November ... 12 = September)
For retriving quarterly data, provide the period which equals 'quarter * 3' (e.g. Q2 = P6)
+ `page` (optional, number)
The page of results to return based on the limit.
+ Default: 1
+ `limit` (optional, number)
The number of results to include per page.
+ Default: 10
+ `order` (optional, enum[string])
The direction (`asc` or `desc`) that the `sort` field will be sorted in.
+ Default: `desc`
+ Members
+ `asc`
+ `desc`
+ `sort` (optional, enum[string])
A data field that will be used to sort the response array.
+ Default: `amount`
+ Members
+ `amount`
+ `tas`

+ Response 200 (application/json)

+ Attributes (object)
+ `page_metadata` (required, PaginationMetadata, fixed-type)
+ `results` (required, array[TASDiscrepancies], fixed-type)
+ Body

{

"page_metadata": {
"page": 1,
"next": 2,
"previous": 0,
"hasNext": false,
"hasPrevious": false,
"total": 2,
"limit": 10
},
"results": [
{
"tas": "210-1503",
"amount": 234543543
},
{
"tas": "012-0212",
"amount": 43637623
}
]
}

# Data Structures

## PaginationMetadata (object)
+ `page` (required, number)
+ `next` (required, number, nullable)
+ `previous` (required, number, nullable)
+ `hasNext` (required, boolean)
+ `hasPrevious` (required, boolean)
+ `total` (required, number)
+ `limit` (required, number)

## TASDiscrepancies (object)
+ `tas` (required, string)
+ `amount` (required, number)
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
FORMAT: 1A
HOST: https://api.usaspending.gov

# Agency Reporting Overview [/api/v2/reporting/agencies/{agency_code}/overview/{?page,limit,order,sort}]

This endpoint is used to power USAspending.gov's About the Data \| Agencies agency details table.

## GET

This endpoint returns an overview of government agency submission data.

+ Parameters
+ `agency_code`: `020` (required, string)
The specific agency.
+ `page` (optional, number)
The page of results to return based on the limit.
+ Default: 1
+ `limit` (optional, number)
The number of results to include per page.
+ Default: 10
+ `order` (optional, enum[string])
The direction (`asc` or `desc`) that the `sort` field will be sorted in.
+ Default: `desc`
+ Members
+ `asc`
+ `desc`
+ `sort` (optional, enum[string])
A data field that will be used to sort the response array.
+ Default: `current_total_budget_authority_amount`
+ Members
+ `current_total_budget_authority_amount`
+ `fiscal_period`
+ `fiscal_year`
+ `missing_tas_accounts_count`
+ `obligation_difference`
+ `recent_publication_date_certified`
+ `recent_publication_date`
+ `tas_obligation_not_in_gtas_total`

+ Response 200 (application/json)

+ Attributes (object)
+ `page_metadata` (required, PaginationMetadata, fixed-type)
+ `results` (required, array[AgencyData], fixed-type)
+ `messages` (optional, array[string])
An array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.

+ Body

{
"messages": [],
"page_metadata": {
"page": 1,
"next": 2,
"previous": 0,
"hasNext": false,
"hasPrevious": false,
"total": 2,
"limit": 10
},
"results": [
{
"fiscal_year": 2020,
"fiscal_period": 12,
"current_total_budget_authority_amount": 8361447130497.72,
"recent_publication_date": "2020-01-10T11:59:21Z",
"recent_publication_date_certified": false,
"tas_account_discrepancies_totals": {
"gtas_obligation_total": 66432,
"tas_accounts_total": 2342,
"tas_obligation_not_in_gtas_total": 343345,
"missing_tas_accounts_count": 10
},
"obligation_difference": 436376232652.87
},
{
"fiscal_year": 2020,
"fiscal_period": 9,
"current_total_budget_authority_amount": 8361447130497.72,
"recent_publication_date": null,
"recent_publication_date_certified": true,
"tas_account_discrepancies_totals": {
"gtas_obligation_total": 66432,
"tas_accounts_total": 23903,
"tas_obligation_not_in_gtas_total": 11543,
"missing_tas_accounts_count": 10
},
"obligation_difference": 436376232652.87
}
]
}

# Data Structures

## PaginationMetadata (object)
+ `page` (required, number)
+ `next` (required, number, nullable)
+ `previous` (required, number, nullable)
+ `hasNext` (required, boolean)
+ `hasPrevious` (required, boolean)
+ `total` (required, number)
+ `limit` (required, number)

## TASTotals (object)
+ `gtas_obligation_total` (required, number)
+ `tas_accounts_total` (required, number)
+ `tas_obligation_not_in_gtas_total` (required, number)
+ `missing_tas_accounts_count` (required, number)

## AgencyData (object)
+ `fiscal_year` (required, number)
+ `fiscal_period` (required, number)
+ `current_total_budget_authority_amount` (required, number)
+ `recent_publication_date` (required, string, nullable)
+ `recent_publication_date_certified` (required, boolean)
+ `recent_publication_date_certified` (required, boolean)
+ `tas_account_discrepancies_totals` (required, array[TASTotals], fixed-type)
+ `obligation_difference` (required, number)
The difference in file A and file B obligations.
Loading

0 comments on commit aaeba02

Please sign in to comment.