Skip to content

Instantly share code, notes, and snippets.

## [Spending by Geography Transaction](#spending-by-geography-transaction)
**Route:** `/api/v2/search/spending_by_geography_transaction/`
**Method:** `POST`
This route takes award filters, and returns spending by state code, county code, or congressional district code.
### Request
scope: What type of data will be returned. Must be either: `place_of_performance` or `recipient_location`.
## [Spending by Transaction Matview Count](#spending-by-transaction-matview-count)
**Route:** `/api/v2/search/spending_by_transaction_matview_count/`
**Method:** `POST`
This route takes transaction filters, and returns the number of transactions in each award type (Contracts, Loans, Direct Payments, Grants, and Other).
### Request
filters: Defines how the awards are filtered. The filter object is defined here.

Route: /api/v2/search/spending_by_transaction_matview/

Method: POST

This route takes award filters and fields, and returns the fields of the filtered transactions.

Request

fields: Defines what award variables are returned in an array using the Fields provided below.

Federal Account Spending By Award

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

Method: GET

This route takes a federal_account DB ID and returns the data reqired to visualized the Award Table

Request

Federal Account Spending By Award Count

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

Method: GET

This route takes a federal_account DB ID and returns the data reqired to visualized the Award Count values.

Request

filter: Defines how the awards are filtered. The filter object is defined here.

Federal Account Spending By Category

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

Method: POST

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

Request

Federal Account Spending Over Time

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

Method: POST

This route takes a federal_account DB ID and returns the data reqired to visualized the spending over time graphic

Request

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)

Federal Account Description

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

GONE

Method: GET

This route takes a Federal Account DB ID and returns Description and summary fields.

Testing Workflow

Initial steps

  1. Find Bug
  2. Triage (check with a dev/expert to see if it’s an error)
  3. Bug added to Feedback board
  4. Assign priority with product owner
  5. Bug Swat Team formed
  6. Fix Bug