New Feature: Faster download times using GZIP encoding

57 views
Skip to first unread message

Developer Group - Beneficiary Claims Data API

unread,
Oct 15, 2020, 1:39:37 PM10/15/20
to Developer Group - Beneficiary Claims Data API

Hello BCDA Community,

We are happy to announce a new way to shorten the download times on your data export jobs.

Currently, the NDJSON files retrieved after starting a job can be quite large leading to long download times and timeouts. Filtering using the _since parameter and /Group endpoint can shrink the amount of data being retrieved, but only for some use cases.

Now, you may download NDJSON files from the API encoded in the GZIP format. You should expect these files to be around 40X smaller than your current downloads.

-----------------------------
Using the GZIP feature:

  1. In your request to download the data, include the header:
    Accept-Encoding: gzip

    cURL Example:
    curl https://api.bcda.cms.gov/data/42/afd22dfa-c239-4063-8882-eb2712f9f638.ndjson \
    -H 'Authorization: Bearer {token}'
    -H 'Accept-encoding: gzip'

  2. After downloading the data, uncompress the file on your device.

Please let us know your thoughts on this capability. The BCDA documentation will be updated to reflect this change soon.

Warmly,
The BCDA Team

SHIRAJ

unread,
Oct 16, 2020, 3:00:36 AM10/16/20
to Developer Group - Beneficiary Claims Data API
Hello BCDA Team,

I have tried a new feature, Accept-encodinggzip
but I didn't see any zip file, responses are the same. if I am using Accept-encodinggzip or not.

one more thing I am receiving an error message in beging.
 

image.png

image.png

--
You received this message because you are subscribed to the Google Groups "Developer Group - Beneficiary Claims Data API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bc-api+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bc-api/64f3673e-4ea4-4d22-a3fa-dd4797c24fabn%40googlegroups.com.


--
Thanks,
Shiraj Momin | 
Software Engineer

Connect to us: http://www.meditab.com/signature_logos/facebook.png http://www.meditab.com/signature_logos/twitter.png http://www.meditab.com/signature_logos/LinkedIn.png  
momin.s...@gmail.com |/www.aaneel.comm

This transmission contains confidential information belonging to the sender that is legally privileged and proprietary and may be subject to protection under the law, including the Health Insurance Portability and Accountability Act (HIPAA). If you are not the intended recipient of this e-mail, you are prohibited mail, from sharing, copying, or otherwise using or disclosing its contents. If you have received this e-mail in error, please notify the sender immediately by reply e mail and permanently delete this e-mail and any e-mail attachments without reading, forwarding, or saving them. Thank you.


Please consider the environment and only print this e-mail if necessary.

Martin Trang

unread,
Oct 16, 2020, 11:41:18 AM10/16/20
to Developer Group - Beneficiary Claims Data API
Hi Shiraj,

You can verify the behavior of "Accept-Encoding: gzip" by looking at the response header from BCDA. If a user supplies "Accept-Encoding: gzip", we respond with "Content-Encoding: gzip". This will indicate that the response body is gzip encoded.

Depending on the HTTP client you are using, you may not see the original gzip response. Some clients check the "Content-Encoding" header value and if it sees "Content-Encoding: gzip", it will automatically uncompress the response before returning to the caller. If you'd like to test the behavior, you can use cURL to make the request. It does not automatically uncompress the content.

The "can't parse JSON. Raw result" error message is an open issue with Swagger. You can see more information in this Google Group post: https://groups.google.com/g/bc-api/c/HrunzFEDRbQ.

-Martin
Reply all
Reply to author
Forward
0 new messages