fedspendingtransparency / usaspending-api

Server application to serve U.S. federal spending data via a RESTful API
https://www.usaspending.gov
Creative Commons Zero v1.0 Universal
310 stars 113 forks source link

November Dump (20241106) is not listed on https://files.usaspending.gov/database_download/ #4227

Open busunkim96 opened 1 week ago

busunkim96 commented 1 week ago

Hello!

As part of my job we update our own database using the new database dumps from https://files.usaspending.gov/database_download/ every month.

This month we thought it was odd the dump hadn't yet appeared since it is usually posted by mid-month.

I went to https://api.usaspending.gov/docs/endpoints to see if there was a queryable endpoint for the latest SQL database download. I initially didn't find anything , but looking through this repository I saw the code below and was able to successfully query for this month's dump.

https://github.com/fedspendingtransparency/usaspending-api/blob/708dbbd9c8a52e045c2e4a47cdd5996001c9b80b/usaspending_api/bulk_download/v2/urls.py#L15

Request:

$ curl  https://api.usaspending.gov/api/v2/bulk_download/list_database_download_files 

Response:

{"full_download_file":{"file_name":"usaspending-db_20241106.zip","url":"https://files.usaspending.gov/database_download/usaspending-db_20241106.zip"},"subset_download_file":{"file_name":"usaspending-db-subset_20241106.zip","url":"https://files.usaspending.gov/database_download/usaspending-db-subset_20241106.zip"},"messages":[]}%

I opened this issue to:

  1. Let you all know that https://files.usaspending.gov/database_download/ doesn't yet list November's dump.
  2. Ask if /list_database_download_files could be added to https://api.usaspending.gov/docs/endpoints image

Thank you! 😄

aguest-kc commented 6 days ago

Hi @busunkim96, the database downloads have been moved to a new URL:

https://onevoicecrm.my.site.com/usaspending/s/database-download

This is the new page that will list the monthly database download files, but the database downloads are still downloadable using the URL in the API response that you listed (/api/v2/bulk_download/list_database_download_files)

busunkim96 commented 6 days ago

@aguest-kc Thank you! I missed that the link had changed.