Several improvements to the get-available-committee endpoint logic were identified when conducting analysis for ticket 3060 investigating occasional slowness for this endpoint on the Find your committee screen after sign-on.
These fixes will help improve the requests being made to the openfec api:
- We are currently sending duplicate requests for processed and (conditionally) raw data. The duplicate requests are being generated by the
raise_if_cannot_create_committee_accountfunction that retrieves the committee email information in order to validate it. We should however be able to use the email information in data that was already retrieved in most cases.
- remove the
committee_id query param in the get_processed data request since it is already set as a path param.
- add the per_page param to the get_raw_data request to limit the record count coming back from openfec (since we only need the first one and it is defaulting to 20).
- add a descending sort param on date so that we get the most recent record for raw data (per documentation
-receipt_date https://api.open.fec.gov/developers/#/filings/get_v1_filings_ )
QA Notes
null
DEV Notes
null
Design
null
See full ticket and images here: FECFILE-3104
Several improvements to the
get-available-committeeendpoint logic were identified when conducting analysis for ticket 3060 investigating occasional slowness for this endpoint on the Find your committee screen after sign-on.These fixes will help improve the requests being made to the openfec api:
raise_if_cannot_create_committee_accountfunction that retrieves the committee email information in order to validate it. We should however be able to use the email information in data that was already retrieved in most cases.committee_idquery param in the get_processed data request since it is already set as a path param.-receipt_datehttps://api.open.fec.gov/developers/#/filings/get_v1_filings_ )QA Notes
null
DEV Notes
null
Design
null
See full ticket and images here: FECFILE-3104