Skip to content

Instantly share code, notes, and snippets.

@shinson
shinson / test_performance_loc_filter.md
Last active November 1, 2017 15:59
Testing the performance of the updated location filter

All tests are were against the dev database through an RDS connection. Transaction filter tests used the /api/v2/download/count endpoint and the awards uses /api/v2/search/spending_by_award_count/. Tests against the response were done using postman, the test for sql queries were used with Postico.

Place Performance Test - Transaction

Request

{"filters":{

		"place_of_performance_locations": [
        {
@shinson
shinson / spending_by_category.md
Created October 19, 2017 16:18
spending_by_category

Route: /api/v2/search/spending_by_category/

Method: POST

This route takes award filters, and returns spending by the defined category/scope. The category is defined by the "category" var, and the scope is defined by is denoted by the "scope" var.

Request

"category": What variable the aggregated_amount is broken up by.

@shinson
shinson / download_v2_count.md
Last active October 25, 2017 17:10 — forked from kevinli-work/download_v2_count.md
Download v2 Transaction Count API

Download Transaction Count API

/v2/download/count (POST)

Returns the number of transactions that would be included in a download request for the given filter set.

Request

POST a JSON body:

@shinson
shinson / spending_by_geography.md
Last active November 2, 2017 17:24
Updates to /api/v2/search/spending_by_geography/

Route: /api/v2/search/spending_by_geography/

Method: POST

This route takes award filters, and returns spending by state code, county code, or congressional district code.

Request

scope: Scope defines what location is used for filtering the aggregated_amount.

geo_layer: Defines which geographical level should be returned in the request. Options include: "state", "county", "district"

@shinson
shinson / federal_account_object_class.md
Last active September 11, 2017 17:05
/federal_account/:federal_account_id/available_object_classes

Rollup of Object Classes for Federal Account

Route:/api/v2/federal_accounts/:federal_account_id/available_object_classes

Method: GET

This route sends a request to the backend to retrieve minor object classes rolled up under major classes filtered by federal account.

Required Parameters

  • federal_account_id: required - an integer representing the federal account id to filter on