fedspendingtransparency/usaspending-api

View on GitHub
usaspending_api/data/testing_data/endpoint_testing_data.json

Summary

Maintainability
Test Coverage
[
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": true,
        "next": "http://testserver/api/v1/awards/?limit=1&page=2&req=08416c5e5e306c10e7cae2edb963c89678cddfb44185222cd48b872ea1c55394",
        "previous": null
      },
      "results": [
        {
          "piid": null,
          "fain": "SBAHQ15J0005",
          "uri": null
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "fain",
        "uri",
        "piid"
      ],
      "order": [
        "id"
      ]
    },
    "url": "/api/v1/awards/?page=1&limit=1",
    "name": "Test field limiting on awards/"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": true,
        "next": "http://testserver/api/v1/awards/?limit=1&page=2&req=2528870dac8a62c67d1d0fc2630189db9669c83a5f5f77c0e998a2a6f394819b",
        "previous": null
      },
      "results": [
        {
          "id": 47587,
          "date_signed__fy": 2016,
          "type": "05",
          "type_description": "Cooperative Agreement",
          "total_obligation": "15000.00",
          "date_signed": "2016-09-20",
          "description": "FY 15 7J",
          "period_of_performance_start_date": "2016-09-20",
          "period_of_performance_current_end_date": "2016-12-28",
          "awarding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          },
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          },
          "recipient": {
            "legal_entity_id": 799999094,
            "parent_recipient_unique_id": null,
            "recipient_name": "PROJECT SOLUTIONS, INC.",
            "business_types": "Q",
            "business_types_description": "Unknown Business Type",
            "location": {
              "country_name": null,
              "state_code": "SD",
              "state_name": "South Dakota",
              "city_name": "Rapid City",
              "address_line1": "3022 W Saint Louis St",
              "address_line2": null,
              "address_line3": null,
              "zip5": "57702",
              "foreign_postal_code": null,
              "foreign_province": null,
              "foreign_city_name": null,
              "location_country_code": "USA"
            }
          },
          "place_of_performance": {
            "country_name": null,
            "state_code": null,
            "state_name": "South Dakota",
            "city_name": "Rapid City",
            "address_line1": null,
            "address_line2": null,
            "address_line3": null,
            "zip5": null,
            "foreign_postal_code": null,
            "foreign_province": null,
            "foreign_city_name": null,
            "location_country_code": "USA"
          }
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "exclude": [
        "fain",
        "uri",
        "piid"
      ],
      "order": [
        "id"
      ],
      "limit": 1,
      "page": 1
    },
    "url": "/api/v1/awards/",
    "name": "Testing field exclusion on awards/"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": true,
        "next": "http://testserver/api/v1/awards/?limit=1&page=2&req=8eb19ef415363e355105445773a6658294064a43f72be9f797699eb95cb33f89",
        "previous": null
      },
      "results": [
        {
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          }
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "funding_agency"
      ],
      "filters": [
        {
          "value": "Department of State",
          "operation": "equals",
          "field": "funding_agency__toptier_agency__name"
        }
      ],
      "order": [
        "id"
      ]
    },
    "url": "/api/v1/awards/?page=1&limit=1",
    "name": "Testing filter operation 'equals' on awards"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": []
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "create_date",
        "update_date"
      ],
      "filters": [
        {
          "value": [
            "2015-10-05",
            "2016-12-10"
          ],
          "operation": "range_intersect",
          "field": [
            "create_date",
            "update_date"
          ]
        }
      ]
    },
    "url": "/api/v1/awards/?page=1&limit=1",
    "name": "Testing filter operation 'range_intersect' on awards"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": [
        {
          "fain": "SBAHQ15J0005",
          "create_date": "2016-12-20T22:50:52.650000Z",
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          }
        },
        {
          "fain": "SBAHQ16B0070",
          "create_date": "2016-12-20T22:50:52.907000Z",
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          }
        },
        {
          "fain": "SBAHQ16V0028",
          "create_date": "2016-12-20T22:50:55.986000Z",
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          }
        },
        {
          "fain": "SBAHQ16B0069",
          "create_date": "2016-12-20T22:50:53.071000Z",
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          }
        },
        {
          "fain": "SBAHQ16B0017",
          "create_date": "2016-12-20T22:50:56.135000Z",
          "funding_agency": {
            "id": 1234567,
            "toptier_agency": {
              "toptier_code": "019",
              "abbreviation": null,
              "name": "Department of State"
            },
            "subtier_agency": {
              "subtier_code": "19BE",
              "abbreviation": null,
              "name": "Department of State"
            }
          }
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "fain",
        "create_date",
        "funding_agency"
      ],
      "filters": [
        {
          "value": "state",
          "operation": "search",
          "field": "funding_agency__toptier_agency__name"
        }
      ],
      "order": [
        "id"
      ]
    },
    "url": "/api/v1/awards/?page=1&limit=5",
    "name": "Testing filter operation 'search' on awards"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": [
        {
          "fain": "SBAHQ15J0005",
          "uri": null
        },
        {
          "fain": "SBAHQ16B0070",
          "uri": null
        },
        {
          "fain": "SBAHQ16B0069",
          "uri": null
        },
        {
          "fain": "SBAHQ16V0028",
          "uri": null
        },
        {
          "fain": "SBAHQ16B0017",
          "uri": null
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "fain",
        "uri"
      ],
      "filters": [
        {
          "filters": [
            {
              "value": false,
              "operation": "is_null",
              "field": "fain"
            },
            {
              "value": "Department of State",
              "operation": "equals",
              "field": "funding_agency__toptier_agency__name"
            }
          ],
          "combine_method": "OR"
        }
      ],
      "order": [
        "id"
      ]
    },
    "url": "/api/v1/awards/?page=1&limit=100",
    "name": "Testing filter combinations via OR on awards"
  },
  {
    "response_object": {
      "results": {
        "recipient__location__state_code": [
          "VA",
          "LA"
        ],
        "recipient__location__state_name": [
          "Virginia",
          "Minnesota",
          "South Dakota",
          "Louisiana",
          "Utah"
        ]
      },
      "counts": {
        "recipient__location__state_code": 2,
        "recipient__location__state_name": 5
      }
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "recipient__location__state_code",
        "recipient__location__state_name"
      ],
      "value": "a"
    },
    "url": "/api/v1/awards/autocomplete/",
    "name": "Testing mode 'contains' awards/autocomplete"
  },
  {
    "response_object": {
      "results": {
        "recipient__location__state_code": [
          "LA"
        ],
        "recipient__location__state_name": [
          "Louisiana"
        ]
      },
      "counts": {
        "recipient__location__state_code": 1,
        "recipient__location__state_name": 1
      }
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "recipient__location__state_code",
        "recipient__location__state_name"
      ],
      "value": "l",
      "mode": "startswith"
    },
    "url": "/api/v1/awards/autocomplete/",
    "name": "Testing mode 'startswith' awards/autocomplete"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": [
        {
          "item": "Cooperative Agreement",
          "aggregate": "954392.01"
        },
        {
          "item": "Unknown Type",
          "aggregate": "1612311.83"
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "aggregate": "sum",
      "group": "type_description",
      "field": "total_obligation"
    },
    "url": "/api/v1/awards/total/",
    "name": "Testing awards/total"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": [
        {
          "budget_authority_unobligated_balance_brought_forward_fyb": "864120.58"
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "budget_authority_unobligated_balance_brought_forward_fyb"
      ],
      "filters": [
        {
          "value": 530,
          "operation": "equals",
          "field": "appropriation_account_balances_id"
        }
      ]
    },
    "url": "/api/v1/tas/balances/",
    "name": "Test accounts endpoint POST request"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": [
        {
          "main_account_code": "0100"
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "main_account_code"
      ],
      "filters": [
        {
          "value": 63031,
          "operation": "equals",
          "field": "treasury_account_identifier"
        }
      ]
    },
    "url": "/api/v1/tas/",
    "name": "Test TAS endpoint POST request"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "next": null,
        "previous": null
      },
      "results": [
        {
          "toptier_code": "073"
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "fields": [
        "toptier_code"
      ],
      "filters": [
        {
          "value": 12,
          "operation": "equals",
          "field": "submission_id"
        }
      ]
    },
    "url": "/api/v1/submissions/",
    "name": "Test submission endpoint POST request"
  },
  {
    "response_object": {
      "id": 47691,
      "date_signed__fy": 2016,
      "data_source": null,
      "type": "U",
      "type_description": "Cooperative Agreement",
      "piid": "SBAHQ16M0163",
      "fain": null,
      "uri": null,
      "total_obligation": "54400.00",
      "date_signed": "2016-09-01",
      "description": null,
      "period_of_performance_start_date": "2016-09-01",
      "period_of_performance_current_end_date": null,
      "last_modified_date": null,
      "certified_date": null,
      "create_date": "2016-12-20T22:50:53.882000Z",
      "update_date": "2016-12-20T22:50:57.802000Z",
      "parent_award_piid": null,
      "awarding_agency": null,
      "funding_agency": null,
      "recipient": null,
      "place_of_performance": null,
      "latest_transaction": null
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {},
    "url": "/api/v1/awards/47691/",
    "name": "Test single award endpoint"
  },
  {
    "response_object": {
      "page_metadata": {
        "page": 1,
        "has_next_page": false,
        "has_previous_page": false,
        "next": null,
        "current": "http://testserver/api/v1/accounts/awards/?limit=100&page=1&req=c6e30f115d6",
        "previous": null
      },
      "results": [
        {
          "financial_accounts_by_awards_id": 12544,
          "data_source": "DBR",
          "piid": null,
          "parent_award_id": null,
          "fain": null,
          "uri": null,
          "ussgl480100_undelivered_orders_obligations_unpaid_fyb": "0.00",
          "ussgl480100_undelivered_orders_obligations_unpaid_cpe": "0.00",
          "ussgl483100_undelivered_orders_oblig_transferred_unpaid_cpe": "0.00",
          "ussgl488100_upward_adjust_pri_undeliv_order_oblig_unpaid_cpe": "0.00",
          "ussgl490100_delivered_orders_obligations_unpaid_fyb": "0.00",
          "ussgl490100_delivered_orders_obligations_unpaid_cpe": "0.00",
          "ussgl493100_delivered_orders_oblig_transferred_unpaid_cpe": "0.00",
          "ussgl498100_upward_adjust_pri_deliv_orders_oblig_unpaid_cpe": "0.00",
          "ussgl480200_undelivered_orders_oblig_prepaid_advanced_fyb": "0.00",
          "ussgl480200_undelivered_orders_oblig_prepaid_advanced_cpe": "0.00",
          "ussgl483200_undeliv_orders_oblig_transferred_prepaid_adv_cpe": "0.00",
          "ussgl488200_up_adjust_pri_undeliv_order_oblig_ppaid_adv_cpe": "0.00",
          "ussgl490200_delivered_orders_obligations_paid_cpe": "0.00",
          "ussgl490800_authority_outlayed_not_yet_disbursed_fyb": "0.00",
          "ussgl490800_authority_outlayed_not_yet_disbursed_cpe": "0.00",
          "ussgl498200_upward_adjust_pri_deliv_orders_oblig_paid_cpe": "0.00",
          "obligations_undelivered_orders_unpaid_total_cpe": null,
          "obligations_delivered_orders_unpaid_total_fyb": null,
          "obligations_delivered_orders_unpaid_total_cpe": null,
          "gross_outlays_undelivered_orders_prepaid_total_fyb": null,
          "gross_outlays_undelivered_orders_prepaid_total_cpe": null,
          "gross_outlays_delivered_orders_paid_total_fyb": null,
          "gross_outlay_amount_by_award_fyb": null,
          "gross_outlay_amount_by_award_cpe": null,
          "obligations_incurred_total_by_award_cpe": null,
          "ussgl487100_down_adj_pri_unpaid_undel_orders_oblig_recov_cpe": "620000.87",
          "ussgl497100_down_adj_pri_unpaid_deliv_orders_oblig_recov_cpe": "0.00",
          "ussgl487200_down_adj_pri_ppaid_undel_orders_oblig_refund_cpe": "0.00",
          "ussgl497200_down_adj_pri_paid_deliv_orders_oblig_refund_cpe": "0.00",
          "deobligations_recoveries_refunds_of_prior_year_by_award_cpe": null,
          "obligations_undelivered_orders_unpaid_total_fyb": null,
          "gross_outlays_delivered_orders_paid_total_cpe": null,
          "drv_award_id_field_type": null,
          "drv_obligations_incurred_total_by_award": null,
          "transaction_obligated_amount": null,
          "reporting_period_start": null,
          "reporting_period_end": null,
          "last_modified_date": null,
          "certified_date": null,
          "create_date": "2016-12-20T22:48:51.953000Z",
          "update_date": "2016-12-20T22:48:51.953000Z",
          "treasury_account": null,
          "award": null,
          "program_activity": {
            "id": 1,
            "program_activity_code": "0001",
            "program_activity_name": "2013 Hurricane Sandy Emergency Supplemental (P.L. 113-2)"
          },
          "object_class": {
            "id": 197,
            "major_object_class": "30",
            "major_object_class_name": "Acquisition of assets",
            "object_class": "310",
            "object_class_name": "Equipment"
          },
          "submission": {
            "submission_id": 12,
            "toptier_code": "073",
            "reporting_fiscal_year": 2016,
            "reporting_fiscal_quarter": 1
          }
        }
      ]
    },
    "status_code": 200,
    "method": "POST",
    "request_object": {
      "verbose": true
    },
    "url": "/api/v1/accounts/awards/",
    "name": "Test financial accounts by awards endpoint"
  }
]