Compare commits

...

2 Commits

Author SHA1 Message Date
dcore94 1955be329c fixed typo 2024-04-09 15:15:48 +02:00
dcore94 02202d1672 fixed typo 2024-04-09 15:08:19 +02:00
5 changed files with 6 additions and 6 deletions

Binary file not shown.

View File

@ -334,7 +334,7 @@ As an example the following Python code shows how to use the variables to reques
# List VRE fodler content
vrefolder = requests.get(workspace + "/vrefolder", headers={"Accept" : "application/json", "Authorization" : "Bearer " + tok}).json()
An similar example in bash could have the following form:
A similar example in bash could have the following form:
.. code-block:: bash
:caption: How to download a file from the D4Science workspace from a private URL passed as input parameter
@ -342,7 +342,7 @@ An similar example in bash could have the following form:
echo "Getting token"
TOKEN=$(curl -X POST $ccpiamurl -d grant_type=refresh_token -d client_id=$ccpclientid -d refresh_token=$ccprefreshtoken -H "X-D4Science-Context: $ccpcontext" | jq -r '."access_token"')
echo Downloading $1 to $2
echo Downloading $wslink to $inputfile
curl -L $wslink -o $inputfile -H "Authorization: Bearer $TOKEN"
echo "Downloaded"

View File

@ -398,13 +398,13 @@ The technology and the list of available Runtimes is strictly related to type of
</pre></div>
</div>
</div>
<p>An similar example in bash could have the following form:</p>
<p>A similar example in bash could have the following form:</p>
<div class="literal-block-wrapper docutils container" id="id4">
<div class="code-block-caption"><span class="caption-text">How to download a file from the D4Science workspace from a private URL passed as input parameter</span><a class="headerlink" href="#id4" title="Permalink to this code"></a></div>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Getting token&quot;</span>
<span class="w"> </span><span class="nv">TOKEN</span><span class="o">=</span><span class="k">$(</span>curl<span class="w"> </span>-X<span class="w"> </span>POST<span class="w"> </span><span class="nv">$ccpiamurl</span><span class="w"> </span>-d<span class="w"> </span><span class="nv">grant_type</span><span class="o">=</span>refresh_token<span class="w"> </span>-d<span class="w"> </span><span class="nv">client_id</span><span class="o">=</span><span class="nv">$ccpclientid</span><span class="w"> </span>-d<span class="w"> </span><span class="nv">refresh_token</span><span class="o">=</span><span class="nv">$ccprefreshtoken</span><span class="w"> </span>-H<span class="w"> </span><span class="s2">&quot;X-D4Science-Context: </span><span class="nv">$ccpcontext</span><span class="s2">&quot;</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>jq<span class="w"> </span>-r<span class="w"> </span><span class="s1">&#39;.&quot;access_token&quot;&#39;</span><span class="k">)</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span>Downloading<span class="w"> </span><span class="nv">$1</span><span class="w"> </span>to<span class="w"> </span><span class="nv">$2</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span>Downloading<span class="w"> </span><span class="nv">$wslink</span><span class="w"> </span>to<span class="w"> </span><span class="nv">$inputfile</span>
<span class="w"> </span>curl<span class="w"> </span>-L<span class="w"> </span><span class="nv">$wslink</span><span class="w"> </span>-o<span class="w"> </span><span class="nv">$inputfile</span><span class="w"> </span>-H<span class="w"> </span><span class="s2">&quot;Authorization: Bearer </span><span class="nv">$TOKEN</span><span class="s2">&quot;</span>
<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;Downloaded&quot;</span>

View File

@ -334,7 +334,7 @@ As an example the following Python code shows how to use the variables to reques
# List VRE fodler content
vrefolder = requests.get(workspace + "/vrefolder", headers={"Accept" : "application/json", "Authorization" : "Bearer " + tok}).json()
An similar example in bash could have the following form:
A similar example in bash could have the following form:
.. code-block:: bash
:caption: How to download a file from the D4Science workspace from a private URL passed as input parameter
@ -342,7 +342,7 @@ An similar example in bash could have the following form:
echo "Getting token"
TOKEN=$(curl -X POST $ccpiamurl -d grant_type=refresh_token -d client_id=$ccpclientid -d refresh_token=$ccprefreshtoken -H "X-D4Science-Context: $ccpcontext" | jq -r '."access_token"')
echo Downloading $1 to $2
echo Downloading $wslink to $inputfile
curl -L $wslink -o $inputfile -H "Authorization: Bearer $TOKEN"
echo "Downloaded"