Skip to content

Commit

Permalink
BCDA-7971: Update curl commands with double quotes
Browse files Browse the repository at this point in the history
This feature updates all curl command snippets that have single quotes
to double quotes in order for them to run properly on Windows and UNIX
based systems.
  • Loading branch information
Austin Canada authored and Austin Canada committed Apr 9, 2024
1 parent 84c6bba commit 3cfff11
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions _includes/build/access_token.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ <h4>
<p>
cURL Option 1: This cURL command requires separate base-64 encryption. We have concatenated the base64 encoding of the ‘Client ID : Secret’ as the argument to the -H flag. Please note that the URL in the Production environment will be different.
</p>
<pre><code>curl -d '' -X POST 'https://sandbox.bcda.cms.gov/auth/token' \
<pre><code>curl -d "" -X POST "https://sandbox.bcda.cms.gov/auth/token" \
-H "accept: application/json" \
-H "authorization: Basic MjQ2MmM5NmItNjQyNy00ZWZiLWFlZDctMTE4ZTIwYzJlOTk3OjhlODdmMGViYzUwZDEwZjFiYzk3MzQzMjlhOTkwMDE3OWI4NGNjZDM5ZTRkMDkyMGI5MDVjYzM1OWNmNmU5NGE2ZTc2MGJiZTNhMDg5MGM3"</code></pre>

<p>
cURL Option 2: This cURL command encrypts your credentials with base-64 encryption
</p>

<pre><code>curl -d '' -X POST 'https://sandbox.bcda.cms.gov/auth/token' \
<pre><code>curl -d "" -X POST "https://sandbox.bcda.cms.gov/auth/token" \
--user 2462c96b-6427-4efb-aed7-118e20c2e997:8e87f0ebc50d10f1bc9734329a9900179b84ccd39e4d0920b905cc359cf6e94a6e760bbe3a0890c7 \
-H "accept: application/json"</code></pre>
<h4>
Expand Down
2 changes: 1 addition & 1 deletion _includes/build/attribution_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h4>Request Headers</h4>
Accept: application/json</code></pre>

<h4>cURL Command to retrieve the attribution status</h4>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/attribution_status' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/attribution_status" \
-H "accept: application/json" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>

Expand Down
4 changes: 2 additions & 2 deletions _includes/build/bcda_v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ <h2>
</tr>
<tr>
<td>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/all/$export' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/all/$export" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer {access_token}" \
-v</code></pre>
</td>
<td>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v1/Group/all/$export' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v1/Group/all/$export" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer {access_token}" \
Expand Down
2 changes: 1 addition & 1 deletion _includes/build/jobs_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4>Request Headers</h4>
Prefer: respond-async</code></pre>

<h4>cURL Command to check the job status</h4>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/jobs' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/jobs" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
Expand Down
10 changes: 5 additions & 5 deletions _includes/build/requesting_data_all_three.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ <h4>Request Headers</h4>
<h4>cURL Commands to start a job</h4>
<ol>
<li>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/all/$export' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/all/$export" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
</li>
<li>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/all/$export?_type=ExplanationOfBenefit,Patient' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/all/$export?_type=ExplanationOfBenefit,Patient" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
</li>
<li>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/all/$export?_type=Patient' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/all/$export?_type=Patient" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
Expand Down Expand Up @@ -92,7 +92,7 @@ <h4>Request Headers</h4>
Accept: application/fhir+json</code></pre>

<h4>cURL Command to check the job status</h4>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/jobs/42' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/jobs/42" \
-H "accept: application/fhir+json" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>

Expand Down Expand Up @@ -139,7 +139,7 @@ <h4>Request Headers</h4>
Accept-Encoding: gzip</code></pre>

<h4>cURL Command to download the data</h4>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/data/42/afd22dfa-c239-4063-8882-eb2712f9f638.ndjson' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/data/42/afd22dfa-c239-4063-8882-eb2712f9f638.ndjson" \
-H "Accept-Encoding: gzip" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>

Expand Down
6 changes: 3 additions & 3 deletions _includes/build/requesting_data_runouts.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ <h4>Request Headers</h4>
<h4>cURL Commands to start a job</h4>
<ol>
<li>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/runout/$export' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/runout/$export" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
</li>
<li>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/runout/$export?_type=ExplanationOfBenefit,Patient' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/runout/$export?_type=ExplanationOfBenefit,Patient" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
</li>
<li>
<pre><code>curl -X GET 'https://api.bcda.cms.gov/api/v2/Group/runout/$export?_type=Patient' \
<pre><code>curl -X GET "https://api.bcda.cms.gov/api/v2/Group/runout/$export?_type=Patient" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"</code></pre>
Expand Down
8 changes: 4 additions & 4 deletions _includes/guide/try_the_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2>
<h3>
Sample cURL Command to Submit Credentials for an Access Token
</h3>
<pre><code>curl -d '' -X POST 'https://sandbox.bcda.cms.gov/auth/token' \
<pre><code>curl -d "" -X POST "https://sandbox.bcda.cms.gov/auth/token" \
--user 2462c96b-6427-4efb-aed7-118e20c2e997:8e87f0ebc50d10f1bc9734329a9900179b84ccd39e4d0920b905cc359cf6e94a6e760bbe3a0890c7 \
-H "accept: application/json"</code></pre>

Expand Down Expand Up @@ -110,7 +110,7 @@ <h2>
<h3>
Sample cURL Command to Start a Job
</h3>
<pre><code>curl -X GET 'https://sandbox.bcda.cms.gov/api/v2/Group/all/$export' \
<pre><code>curl -X GET "https://sandbox.bcda.cms.gov/api/v2/Group/all/$export" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>" \
Expand Down Expand Up @@ -148,7 +148,7 @@ <H3>
<H4>
Sample cURL Command to Check the Job Status
</H4>
<pre><code>curl -X GET 'https://sandbox.bcda.cms.gov/api/v2/jobs/42' \
<pre><code>curl -X GET "https://sandbox.bcda.cms.gov/api/v2/jobs/42" \
-H "accept: application/fhir+json" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>"
</code></pre>
Expand Down Expand Up @@ -203,7 +203,7 @@ <H3>
<H4>
Sample cURL Command to Download the Data
</H4>
<pre><code>curl 'https://sandbox.bcda.cms.gov/data/42/afd22dfa-c239-4063-8882-eb2712f9f638.ndjson' \
<pre><code>curl "https://sandbox.bcda.cms.gov/data/42/afd22dfa-c239-4063-8882-eb2712f9f638.ndjson" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>" \
-H "Accept-Encoding: gzip"
</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion _includes/partial/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</div>
<p>Access to the Claim and ClaimResponse resources is handled within BCDA on a per ACO (Accountable Care Organization) ID level. There are no required changes to credentials for those REACH ACOs who would like access to the V2 endpoint. The BCDA V2 service supports the same functionality as V1 API endpoints in both the sandbox and production API environments. All V2 endpoints should work as described in the existing BCDA documentation. To transition from V1 to your BCDA V2 endpoints, replace ‘v1’ in the API call URLs with ‘v2’, as in the cURL example below:
</p>
<pre><code>curl -X GET 'https://sandbox.bcda.cms.gov/api/v1/Patient/$export' \
<pre><code>curl -X GET "https://sandbox.bcda.cms.gov/api/v1/Patient/$export" \
-H "accept: application/fhir+json" \
-H "Prefer: respond-async" \
-H "Authorization: Bearer <span style="color: #046B99;">{access_token}</span>" \
Expand Down

0 comments on commit 3cfff11

Please sign in to comment.