<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Documentation – EGI DataHub</title><link>/users/data/management/datahub/</link><description>Recent content in EGI DataHub on Documentation</description><generator>Hugo -- gohugo.io</generator><atom:link href="/users/data/management/datahub/index.xml" rel="self" type="application/rss+xml"/><item><title>Users: DataHub Use-Cases</title><link>/users/data/management/datahub/usecases/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/users/data/management/datahub/usecases/</guid><description>
&lt;p>An overview of the use cases and possible deployment scenarios of the
&lt;a href="https://datahub.egi.eu/">EGI DataHub&lt;/a>.&lt;/p>
&lt;h2 id="build-data-spaces-for-communities">Build Data Spaces for Communities&lt;/h2>
&lt;p>Users can access with their EGI Check-in credentials data available
at one or more providers which are abstracting over heterogeneous
backends.&lt;/p>
&lt;p>Different data access interfaces are available (Web, REST, POSIX,
CDMI).&lt;/p>
&lt;p>&lt;img src="datahub-federation-of-service-providers.png" alt="image">&lt;/p>
&lt;h2 id="integrate-datahub-with-egi-notebooks">Integrate DataHub with EGI Notebooks&lt;/h2>
&lt;p>EGI Notebooks has been integrated with DataHub in order to easily
access and store files from the JupyterLab interface.&lt;/p>
&lt;p>On the central EGI Notebooks instance, a predefined space open to
all users and VO specific spaces are available.&lt;/p>
&lt;p>&lt;img src="datahub-notebooks-integration.png" alt="image">&lt;/p>
&lt;h2 id="make-your-data-fair">Make your data FAIR&lt;/h2>
&lt;p>Users can assign metadata to files, create shares and mint DOIs.&lt;/p>
&lt;p>The EGI DataHub offers an OAI-PMH interface which enables standard
discoverability and access to datasets.&lt;/p>
&lt;p>&lt;img src="datahub-publication-of-datasets.png" alt="image">&lt;/p>
&lt;h2 id="smart-caching">Smart caching&lt;/h2>
&lt;ul>
&lt;li>Site A hosts data and computing resources&lt;/li>
&lt;li>Site B hosts only data&lt;/li>
&lt;li>Site X uses data from A and B without pre-staging&lt;/li>
&lt;li>Pre-staging can also be done using APIs&lt;/li>
&lt;li>Data is accessed locally via POSIX with FUSE&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="datahub-smart-caching.png" alt="image">&lt;/p></description></item><item><title>Users: DataHub Clients</title><link>/users/data/management/datahub/clients/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/users/data/management/datahub/clients/</guid><description>
&lt;p>&lt;a href="https://datahub.egi.eu/">EGI DataHub&lt;/a> spaces can be accessed via web interface,
the &lt;code>oneclient&lt;/code> component or the &lt;a href="../api">API&lt;/a>.&lt;/p>
&lt;p>The official documentation for &lt;code>oneclient&lt;/code> is hosted on the
&lt;a href="https://onedata.org/#/home/documentation/doc/using_onedata/oneclient.html">Onedata homepage&lt;/a>,
and a specific &lt;a href="../../../../tutorials/adhoc/vm-datahub">tutorial&lt;/a> on how to install
and use it from a Virtual Machine is also available.&lt;/p>
&lt;h2 id="using-the-web-interface">Using the web interface&lt;/h2>
&lt;p>Using EGI Check-in allows you to connect with your institute&amp;rsquo;s credentials.&lt;/p>
&lt;p>&lt;img src="datahub-connect-check-in.png" alt="Selecting EGI to connect using EGI Check-in">&lt;/p>
&lt;p>On this page it&amp;rsquo;s possible to have an overview of all the spaces and their
supporting providers.&lt;/p>
&lt;p>&lt;img src="datahub-welcome-screen.png" alt="EGI DataHub landing page">&lt;/p>
&lt;p>On this capture, the information about the spaces supported by a specific
provider is displayed.&lt;/p>
&lt;p>&lt;img src="datahub-space-info.png" alt="Information about spaces supported by a Oneprovider">&lt;/p>
&lt;p>The data space can be managed (i.e. uploading/downloading/managing files and
metadata, managing space access) using the web browser.&lt;/p>
&lt;p>&lt;img src="datahub-browse-space.png" alt="Information about spaces supported by a Oneprovider">&lt;/p>
&lt;h2 id="generating-tokens-for-using-oneclient-or-apis">Generating tokens for using Oneclient or APIs&lt;/h2>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
In order to be able to access
your spaces using &lt;code>oneclient&lt;/code> or the &lt;a href="../api">API&lt;/a>, it is required to generate
an access token.
&lt;/div>
&lt;p>Tokens have to be generated from the &lt;strong>EGI DataHub&lt;/strong> (Onezone) interface.&lt;/p>
&lt;p>&lt;img src="datahub-space-token.png" alt="Managing access tokens from EGI DataHub">&lt;/p>
&lt;p>The access tokens can be created and managed using the EGI DataHub web
interface.&lt;/p>
&lt;h3 id="environment-variables">Environment variables&lt;/h3>
&lt;p>The sections below assume you have defined the following variables in your
environment:&lt;/p>
&lt;ul>
&lt;li>&lt;code>ONECLIENT_ACCESS_TOKEN&lt;/code>: access token allowing to access &lt;strong>all&lt;/strong> the spaces&lt;/li>
&lt;li>&lt;code>ONECLIENT_PROVIDER_HOST&lt;/code>: name or IP of the Oneprovider the client should
connect to.&lt;/li>
&lt;/ul>
&lt;h2 id="installing-and-testing-oneclient-in-a-docker-container">Installing and testing Oneclient in a docker container&lt;/h2>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
In order to be able to use FUSE,
the container should run in &lt;strong>privileged&lt;/strong> mode.
&lt;/div>
&lt;p>A quick and simple solution for testing is to install the client on demand in a
container for a supported Operating System flavor (mainly various CentOS and
Ubuntu releases).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ docker run -it --privileged centos:7 /bin/bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@81dbd7e84438 /&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>&lt;span style="color:#8f5902;font-style:italic"># curl -sS https://get.onedata.org/oneclient.sh | bash&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># (...)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Complete!
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Installation has been completed successfully.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Run &lt;span style="color:#4e9a06">&amp;#39;oneclient --help&amp;#39;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> usage info.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@81dbd7e84438 /&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>&lt;span style="color:#8f5902;font-style:italic"># export ONECLIENT_ACCESS_TOKEN=&amp;lt;ACCESS_TOKEN_FROM_ONEZONE&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@81dbd7e84438 /&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>&lt;span style="color:#8f5902;font-style:italic"># export ONECLIENT_PROVIDER_HOST=plg-cyfronet-01.datahub.egi.eu&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@81dbd7e84438 /&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>&lt;span style="color:#8f5902;font-style:italic"># mkdir /tmp/space&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@81dbd7e84438 /&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>&lt;span style="color:#8f5902;font-style:italic"># oneclient /tmp/space&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@81dbd7e84438 /&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>&lt;span style="color:#8f5902;font-style:italic"># ls /tmp/space&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Here the data is mounted in &lt;code>/tmp/space&lt;/code>, creating a file into it will push it
to the Oneprovider and it will be accessible in the web interface and from other
providers supporting the space.&lt;/p>
&lt;p>For a real production usage it's preferable to use the Oneclient container as a
source for a volume mounted into another container.&lt;/p>
&lt;h2 id="testing-oneclient-in-a-oneclient-docker-container-with-nfs-or-samba">Testing Oneclient in a Oneclient docker container with NFS or samba&lt;/h2>
&lt;p>Docker containers for the Oneclient are available, the existing versions can be
seen on the
&lt;a href="https://hub.docker.com/r/onedata/oneclient/tags">Oneclient docker hub&lt;/a>.&lt;/p>
&lt;p>It&amp;rsquo;s possible to use the most recent version by specifying the &lt;code>latest&lt;/code> tag. We
also recommend using the same version as shown on the Onezone and Oneprovider
pages.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_ACCESS_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN_FROM_ONEZONE&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_PROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>plg-cyfronet-01.datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ docker run -it --privileged &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -e &lt;span style="color:#000">ONECLIENT_ACCESS_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ONECLIENT_ACCESS_TOKEN&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -e &lt;span style="color:#000">ONECLIENT_PROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ONECLIENT_PROVIDER_HOST&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> onedata/oneclient:21.02.2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connecting to provider &lt;span style="color:#4e9a06">&amp;#39;plg-cyfronet-01.datahub.egi.eu:443&amp;#39;&lt;/span> using session ID: &lt;span style="color:#4e9a06">&amp;#39;4138963898952098752&amp;#39;&lt;/span>...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Getting configuration...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Oneclient has been successfully mounted in &lt;span style="color:#4e9a06">&amp;#39;/mnt/oneclient&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now the client will run in the background and the data will be available through
&lt;strong>samba/CIFS&lt;/strong> or &lt;strong>NFS&lt;/strong> protocols:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Identifying the IP of the container&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ docker inspect --format &lt;span style="color:#4e9a06">&amp;#34;{{ .NetworkSettings.IPAddress }}&amp;#34;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">$(&lt;/span>docker ps -ql&lt;span style="color:#204a87;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>172.17.0.2
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>So the data can be accessed at&lt;/p>
&lt;ul>
&lt;li>&lt;code>smb://172.17.0.2/onedata&lt;/code>&lt;/li>
&lt;li>&lt;code>nfs://172.17.0.2/onedata&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="testing-oneclient-in-a-oneclient-docker-container-with-local-file-access">Testing Oneclient in a Oneclient docker container with local file access&lt;/h2>
&lt;p>Another solution is to mount a local directory as a volume in the container,
allowing to access both the working directory as well as the Onedata spaces,
thus allowing to easily exchange files between a local directory and a Onedata
space.&lt;/p>
&lt;p>In order to do this we will open a &lt;code>bash&lt;/code> shell in the container then we will
mount manually the Onedata spaces.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_ACCESS_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN_FROM_ONEZONE&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_PROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>plg-cyfronet-01.datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ docker run -it --privileged &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -e &lt;span style="color:#000">ONECLIENT_ACCESS_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ONECLIENT_ACCESS_TOKEN&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -e &lt;span style="color:#000">ONECLIENT_PROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#000">$ONECLIENT_PROVIDER_HOST&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -v &lt;span style="color:#000">$PWD&lt;/span>:/mnt/src --entrypoint bash onedata/oneclient:21.02.2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@aca612a84fb4:/tmp# oneclient /mnt/oneclient
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connecting to provider &lt;span style="color:#4e9a06">&amp;#39;plg-cyfronet-01.datahub.egi.eu:443&amp;#39;&lt;/span> using session ID: &lt;span style="color:#4e9a06">&amp;#39;1641165171427694510&amp;#39;&lt;/span>...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Getting configuration...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Oneclient has been successfully mounted in &lt;span style="color:#4e9a06">&amp;#39;/mnt/oneclient&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@aca612a84fb4:/tmp# ls /mnt/oneclient
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>...&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>root@aca612a84fb4:/tmp# ls /mnt/src
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>...&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now it's possible to use the following mount points:&lt;/p>
&lt;ul>
&lt;li>&lt;code>/mnt/oneclient&lt;/code>: the Onedata spaces&lt;/li>
&lt;li>&lt;code>/mnt/src&lt;/code>: the local directory (any absolute path could have been used
instead of &lt;code>$PWD&lt;/code> that points to the working directory)&lt;/li>
&lt;/ul>
&lt;h2 id="testing-oneclient-in-a-virtual-machine">Testing Oneclient in a Virtual Machine&lt;/h2>
&lt;p>The following variables have to be exported:&lt;/p>
&lt;ul>
&lt;li>&lt;code>ONECLIENT_ACCESS_TOKEN&lt;/code>: access token allowing to access &lt;strong>all&lt;/strong> the spaces.&lt;/li>
&lt;li>&lt;code>ONECLIENT_PROVIDER_HOST&lt;/code>: name or IP of the Oneprovider the client should
connect to.&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ curl -sS https://get.onedata.org/oneclient.sh &lt;span style="color:#000;font-weight:bold">|&lt;/span> bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_ACCESS_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN_FROM_ONEZONE&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_PROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>plg-cyfronet-01.datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ mkdir /tmp/space
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ oneclient /tmp/space
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="testing-oneclient-in-a-vagrant-box">Testing Oneclient in a Vagrant box&lt;/h2>
&lt;p>It's possible to quickly test Oneclient using
&lt;a href="https://www.vagrantup.com/">Vagrant&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ vagrant init ubuntu/xenial64
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ vagrant up
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ vagrant ssh
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS https://get.onedata.org/oneclient.sh &lt;span style="color:#000;font-weight:bold">|&lt;/span> bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_ACCESS_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN_FROM_ONEZONE&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONECLIENT_PROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>plg-cyfronet-01.datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ mkdir /tmp/space
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ oneclient /tmp/space
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Users: DataHub File Management</title><link>/users/data/management/datahub/file-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/users/data/management/datahub/file-management/</guid><description>
&lt;h2 id="web-interface">Web interface&lt;/h2>
&lt;p>In the &lt;a href="../">EGI DataHub&lt;/a>, all files are organized in spaces. The Web User
interface allows for uploading new files as well as opening existing files.&lt;/p>
&lt;p>In order to upload a file, open the directory in which the file should be placed
and drag the file into the browser window:&lt;/p>
&lt;p>&lt;img src="datahub-drag-file.png" alt="drag the file into the browser window">&lt;/p>
&lt;p>Opening or downloading a file requires double clicking on the file in the file
window.&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>
Make sure that the pop-ups for this
browser window are not blocked, and unblock them if necessary.
&lt;/div>
&lt;h2 id="direct-access-via-posix">Direct access via POSIX&lt;/h2>
&lt;p>Files can also be accessed directly via the POSIX interface, using &lt;code>Oneclient&lt;/code>
tool. Details on how to use are described in the
&lt;a href="https://onedata.org/#/home/documentation/doc/using_onedata/oneclient.html">official Oneclient documentation&lt;/a>.&lt;/p>
&lt;h2 id="cdmi-cloud-data-management-interface">CDMI (Cloud Data Management Interface)&lt;/h2>
&lt;p>For more advanced use cases, files can be managed using the
&lt;a href="https://www.snia.org/cdmi">CDMI&lt;/a> protocol, as described in details
&lt;a href="https://onedata.org/#/home/documentation/doc/advanced/cdmi.html">in the Onedata CDMI documentation&lt;/a>.&lt;/p>
&lt;h2 id="file-permissions">File Permissions&lt;/h2>
&lt;p>You can control access to your data with a combination of:&lt;/p>
&lt;ul>
&lt;li>classical (POSIX) file permissions&lt;/li>
&lt;li>Access Control Lists (ACL)&lt;/li>
&lt;/ul>
&lt;h2 id="posix-permissions">POSIX Permissions&lt;/h2>
&lt;p>DataHub allows you to control access to your data in a POSIX-like fashion for
users, group and others in terms of read, write and executable permissions.&lt;/p>
&lt;p>An important nuance regarding file permissions is that all space members are
treated as a virtual group which is the group owner of all files in the space.
That means that whenever a file is accessed by a space member who is not the
owner of the file, the group permissions are taken into consideration.
Permissions for &amp;ldquo;others&amp;rdquo; are considered when accessing
&lt;a href="https://onedata.org/#/home/documentation/doc/using_onedata/shares.html">shares&lt;/a>.&lt;/p>
&lt;p>Consider the following example of a file&amp;rsquo;s POSIX permissions:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>rwx r-- ---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> | | |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> | | guests
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> | |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> | space members
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> owner user
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above case, the creator of the file, its &lt;em>owner user&lt;/em>, has a full access
to the file. All &lt;em>space members&lt;/em> have read access to the file. Other users,
&lt;em>guests&lt;/em>, who try to access the file through a share will fail to do so as all
permissions are declined for &amp;ldquo;others&amp;rdquo;.&lt;/p>
&lt;p>In order to edit permissions:&lt;/p>
&lt;ol>
&lt;li>Click on &lt;strong>Data&lt;/strong> on the left menu bar&lt;/li>
&lt;li>Select the Space you want to access and the &lt;strong>Data&lt;/strong> option&lt;/li>
&lt;li>Select a &lt;strong>file&lt;/strong> or a &lt;strong>directory&lt;/strong> and right clicking on it&lt;/li>
&lt;li>Click on the &lt;strong>Permissions&lt;/strong> option&lt;/li>
&lt;li>Select &lt;strong>POSIX&lt;/strong> type of permissions radio button at the top&lt;/li>
&lt;li>Enter privileges in octal form (e.g. 770)&lt;/li>
&lt;li>Click &lt;strong>OK&lt;/strong> in order to save changes&lt;/li>
&lt;/ol>
&lt;p>&lt;img src="datahub-posix.png" alt="DataHub POSIX">&lt;/p>
&lt;h2 id="access-control-lists">Access Control Lists&lt;/h2>
&lt;p>You can also setup permissions using more advanced Access Control Lists option
to control permissions for individual users and groups.&lt;/p>
&lt;p>In order to edit ACLs:&lt;/p>
&lt;ol>
&lt;li>Navigate to &lt;strong>Data&lt;/strong> tab&lt;/li>
&lt;li>Select a &lt;strong>file&lt;/strong> or a &lt;strong>directory&lt;/strong> by right clicking on it&lt;/li>
&lt;li>Click on the &lt;strong>Permissions&lt;/strong> option&lt;/li>
&lt;li>Click on the &lt;strong>ACL&lt;/strong> radio button&lt;/li>
&lt;li>Edit permissions by clicking on the appropriate &lt;strong>checkbox&lt;/strong>&lt;/li>
&lt;li>Click &lt;strong>OK&lt;/strong> in order to save changes&lt;/li>
&lt;/ol>
&lt;blockquote>
&lt;p>Note, that access lists take precedence over POSIX permissions. If access list
is set, POSIX are set to octal value of 000.&lt;/p>
&lt;/blockquote>
&lt;p>The order in which permissions take precedence is indicated with an arrow.&lt;/p>
&lt;p>&lt;img src="datahub-acl.png" alt="DataHub ACL">&lt;/p>
&lt;blockquote>
&lt;p>To limit the risk of making data inaccessible to yourself, it is advisable to
first add the required ACL if new ones are needed, and if necessary remove the
ones not needed. While using ACLs there should be at least one active, or no
user might be able to access the data. To regain the access the space owner
would then need to modify the permissions.&lt;/p>
&lt;/blockquote>
&lt;h2 id="file-sharing">File sharing&lt;/h2>
&lt;p>It is possible to share available DataHub data with other users or externally by
generating a unique URL. This can be done, on the web interface, by selecting a
directory or file, and right-clicking on it or clicking the three dots on the
right like in the following screenshot and selecting &amp;ldquo;share&amp;rdquo;:&lt;/p>
&lt;p>&lt;img src="datahub-share-01.png" alt="select">&lt;/p>
&lt;p>This will open a window allowing you to give a name to the share that you are
about to create. This is shown in the following screenshot:&lt;/p>
&lt;p>&lt;img src="datahub-share-02.png" alt="select">&lt;/p>
&lt;p>By clicking on the &amp;ldquo;Create&amp;rdquo; button, the share is created and you are taken to
the last window where the URL of the share can be copied for further use. This
is shown in the following screenshot:&lt;/p>
&lt;p>&lt;img src="datahub-share-03.png" alt="select">&lt;/p>
&lt;p>To manage existing shares, in the space that is in use, it is sufficient to
click the &amp;ldquo;Share&amp;rdquo; section, then a list of the existing ones is shown. By
clicking on the three dots on the right of the share, you can rename, remove or
copy the URL of the share. This is shown in the following screenshot:&lt;/p>
&lt;p>&lt;img src="datahub-share-04.png" alt="select">&lt;/p>
&lt;p>By clicking on the share itself, it is possible to edit additional attributes of
the share like the description and the possibility to publish it as Open Data
trough one of the supported handle service.&lt;/p>
&lt;p>An API is also available for the
&lt;a href="https://onedata.org/#/home/api/stable/onezone?anchor=tag/Share">creation and administration of the shares&lt;/a>.&lt;/p>
&lt;h2 id="data-transfer-management">Data transfer management&lt;/h2>
&lt;p>After uploading some data to DataHub, you can manage the replication and
transfer to other DataHub providers supporting the same space. To do so, after
uploading some files, select them, right click on the selection, and select
&amp;ldquo;Data distribution&amp;rdquo;. This will open the following window:&lt;/p>
&lt;p>&lt;img src="datahub-transfer-01.png" alt="select">&lt;/p>
&lt;p>This will show the providers available for the space being used, and the current
operation being performed if any. By clicking on the three dots, next to the
provider, the following operation can be performed:&lt;/p>
&lt;ul>
&lt;li>Migrate the data if the provider selected contain the data. This will copy the
data to the other provider, if not present, and remove them from the selected
one.&lt;/li>
&lt;li>Replicate the data, if the data is not present in the provider selected&lt;/li>
&lt;li>Evict the data, if the data is present in the current provider, and al least
in another one&lt;/li>
&lt;/ul>
&lt;h3 id="data-transfer-management-api">Data transfer management API&lt;/h3>
&lt;p>The DataHub
&lt;a href="https://onedata.org/#/home/api/stable/oneprovider?anchor=section/Overview/API-structure">REST API structure&lt;/a>
gives an overview of the REST calls available. In particular the section on
&lt;a href="https://onedata.org/#/home/api/stable/oneprovider?anchor=tag/Transfer">Transfer&lt;/a>
focus on the transfer operation which include the operation previously described
using the web interface and include option to schedule transfers, a feature
which is not available trough the web interface. Furthermore the status of the
transfer can also be checked from the section
&lt;a href="https://onedata.org/#/home/api/stable/oneprovider?anchor=operation/get_transfer_status">Get transfer status&lt;/a>
of the same page.&lt;/p>
&lt;p>The &lt;code>/transfers/&lt;/code> operations provide basic transfer management functionality
based on the ID of transfer returned by &lt;code>/transfers&lt;/code> &lt;code>[POST]&lt;/code> operation.&lt;/p>
&lt;p>With the API it is possible to get information about a specific transfer by
simply querying the following resource:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ curl -X GET -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> https://&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>/api/v3/oneprovider/transfers/&amp;lt;TRANSFER_ID&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>or request all transfers for given space:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ curl -X GET -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> https://&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>/api/v3/oneprovider/spaces/&lt;span style="color:#000">$SPACE_ID&lt;/span>/transfers
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Each transfer can be cancelled using the HTTP DELETE method:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ curl -X DELETE -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> https://&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>/api/v3/oneprovider/transfers/&amp;lt;TRANSFER_ID&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Users: DataHub API</title><link>/users/data/management/datahub/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/users/data/management/datahub/api/</guid><description>
&lt;p>Most operations in EGI DataHub can be performed using one of the
&lt;a href="https://onedata.org/#/home/api">OneData Application Programming Interfaces&lt;/a>
(APIs).&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
In order to be able to access
the Onedata APIs, an access token is required. See below for instructions on how
to generate one.
&lt;/div>
&lt;h2 id="getting-an-api-access-token">Getting an API access token&lt;/h2>
&lt;p>Tokens have to be generated from the &lt;strong>EGI DataHub&lt;/strong> (Onezone) interface as
documented in
&lt;a href="../clients/#generating-tokens-for-using-oneclient-or-apis">Generating tokens for using Oneclient or APIs&lt;/a>
or using a command-line call as documented hereafter.&lt;/p>
&lt;p>Bear in mind that a single API token can be used with both Onezone, Oneprovider
and other Onedata APIs.&lt;/p>
&lt;p>It&amp;rsquo;s possible to retrieve the &lt;code>CLIENT_ID&lt;/code> and &lt;code>REFRESH_TOKEN&lt;/code> using the
&lt;a href="https://aai.egi.eu/token/">EGI Check-in Token Portal&lt;/a>. See
&lt;a href="../../../../aai/check-in">Check-in documentation&lt;/a> for more information.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">CLIENT_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;CLIENT_ID&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">REFRESH_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;REFRESH_TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Retrieving an OIDC token from Check-in&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -X POST &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#34;client_id=&lt;/span>&lt;span style="color:#000">$CLIENT_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;amp;grant_type=refresh_token&amp;amp;refresh_token=&lt;/span>&lt;span style="color:#000">$REFRESH_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;amp;scope=openid%20email%20profile%20eduperson_entitlement&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#39;https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token&amp;#39;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> python -m json.tool&lt;span style="color:#000;font-weight:bold">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Token is in the access_token field of the response&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The following variables should be set:&lt;/p>
&lt;ul>
&lt;li>&lt;code>OIDC_TOKEN&lt;/code>: OpenID Connect Access token.&lt;/li>
&lt;li>&lt;code>ONEZONE_HOST&lt;/code>: name or IP of the Onezone host (to use Onezone API).&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">ONEZONE_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">OIDC_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;OIDC_ACCESS_TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: egi:&lt;/span>&lt;span style="color:#000">$OIDC_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> -X POST &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#39;Content-type: application/json&amp;#39;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/tokens/named&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#39;{
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;name&amp;#34;: &amp;#34;REST and CDMI access token&amp;#34;,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;type&amp;#34;: {
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;accessToken&amp;#34;: {}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> },
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;caveats&amp;#34;: [
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> {
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;type&amp;#34;: &amp;#34;interface&amp;#34;,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;interface&amp;#34;: &amp;#34;rest&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> }
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> ]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> }&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="data-access-via-cdmi-and-rest-api">Data access via CDMI and REST API&lt;/h2>
&lt;p>Below are example commands to learn how to access DataHub files and folders via
&lt;a href="https://en.wikipedia.org/wiki/Cloud_Data_Management_Interface">CDMI&lt;/a> and
&lt;a href="https://en.wikipedia.org/wiki/Representational_state_transfer">REST&lt;/a> API using
the command-line interface.&lt;/p>
&lt;p>For more information please check the Onedata
&lt;a href="https://onedata.org/#/home/documentation/stable/doc/advanced/cdmi.html">CDMI documentation&lt;/a>
and the Onedata
&lt;a href="https://onedata.org/#/home/api/stable/oneprovider?anchor=tag/Basic-File-Operations">Oneprovider REST API&lt;/a>&lt;/p>
&lt;h3 id="common-configuration">Common configuration&lt;/h3>
&lt;p>Follow instructions &lt;a href="#getting-an-api-access-token">above&lt;/a> to get an API access
token, and configure environment variables:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">DATAHUB_TOKEN&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;DATAHUB_ACCESS_TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>plg-cyfronet-01.datahub.egi.eu
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Having &lt;a href="https://stedolan.github.io/jq/">jq&lt;/a> installed is useful for better
formatting of the JSON output.&lt;/p>
&lt;h3 id="cdmi">CDMI&lt;/h3>
&lt;p>Configure a header to be passed in some operations.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">CDMI_VSN_HEADER&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#39;X-CDMI-Specification-Version: 1.1.1&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>See examples on how to list a folder, and file download/upload using CDMI:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># List files in a folder&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$CDMI_VSN_HEADER&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/cdmi/PLAYGROUND/?children&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Download &amp;#34;helloworld.txt&amp;#34; from DataHub to &amp;#34;downloadtest.txt&amp;#34; on your computer&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/cdmi/PLAYGROUND/helloworld.txt&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -o downloadtest.txt
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Upload &amp;#34;helloworld.txt&amp;#34; from your computer to &amp;#34;uploadtest.txt&amp;#34; on DataHub&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$CDMI_VSN_HEADER&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X PUT &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/cdmi/PLAYGROUND/uploadtest.txt&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -T helloworld.txt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="rest-api">REST API&lt;/h3>
&lt;p>See examples on how to list a folder, and file download/upload using REST API:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Get base folder ID&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X POST &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/lookup-file-id/PLAYGROUND&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Add the folder ID to an environment variable&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">DIR_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ID_FROM_PREVIOUS_COMMAND&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># List files inside the folder with DIR_ID&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X GET &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/data/&lt;/span>&lt;span style="color:#000">$DIR_ID&lt;/span>&lt;span style="color:#4e9a06">/children&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Add the ID of the file that you want to download&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">FILE_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ID_FROM_PREVIOUS_COMMAND&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Download file with FILE_ID from DataHub to &amp;#34;helloworld.txt&amp;#34; on your computer&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X GET &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/data/&lt;/span>&lt;span style="color:#000">$FILE_ID&lt;/span>&lt;span style="color:#4e9a06">/content&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -o helloworld.txt
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Upload &amp;#34;helloworld.txt&amp;#34; on your local computer to &amp;#34;uploadtest.txt&amp;#34; on DataHub&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$DATAHUB_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X POST &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/data/&lt;/span>&lt;span style="color:#000">$DIR_ID&lt;/span>&lt;span style="color:#4e9a06">/children?name=uploadtest.txt&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/octet-stream&amp;#34;&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#34;@helloworld.txt&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="data-access-from-python">Data access from Python&lt;/h2>
&lt;p>If your application is written in Python please check the documentation for the
&lt;a href="https://onedata.org/#/home/documentation/stable/doc/using_onedata/onedatafs.html">OnedataFS Python library&lt;/a>&lt;/p>
&lt;h2 id="testing-the-api-with-the-rest-client">Testing the API with the REST client&lt;/h2>
&lt;p>A docker container with clients acting as wrappers around the API calls is
available: &lt;code>onedata/rest-cli&lt;/code>. It's very convenient for discovering and testing
the &lt;strong>Onezone&lt;/strong> and &lt;strong>Oneprovider&lt;/strong> API.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ docker run -it onedata/rest-cli
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Exporting env for Onezone API&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEZONE_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEZONE_API_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Checking current user&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ onezone-rest-cli getCurrentUSer &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing all accessible spaces&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ onezone-rest-cli listEffectiveUserSpaces &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ docker run -it onedata/rest-cli
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Exporting env for Oneprovider API&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://plg-cyfronet-01.datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEPROVIDER_API_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing all spaces supported by the Oneprovider&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ oneprovider-rest-cli getAllSpaces &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing content of a space&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ oneprovider-rest-cli listFiles &lt;span style="color:#000">path&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#39;EGI Foundation/&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ oneprovider-rest-cli listFiles &lt;span style="color:#000">path&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#39;EGI Foundation/CS3_dataset&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="printing-the-raw-rest-calls-of-a-wrapped-command">Printing the raw REST calls of a wrapped command&lt;/h2>
&lt;p>Raw REST calls (used with &lt;code>curl&lt;/code>) can be printed using the &lt;code>--dry-run&lt;/code> switch.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ docker run -it onedata/rest-cli
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEZONE_HOST&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https://datahub.egi.eu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">export&lt;/span> &lt;span style="color:#000">ONEZONE_API_KEY&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;ACCESS_TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing all accessible spaces&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ onezone-rest-cli listEffectiveUserSpaces &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Printing the curl command without running it&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ onezone-rest-cli listEffectiveUserSpaces --dry-run
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="working-with-pid--handle">Working with PID / Handle&lt;/h2>
&lt;p>It&amp;rsquo;s possible to mint a Permanent Identifier (PID) for a space or a subdirectory
of a space using a handle service (like Handle.net) that is registered in the
Onezone (EGI DataHub).&lt;/p>
&lt;p>Once done, accessing the PID using its URL will redirect to the Onedata share
allowing to retrieve the files.&lt;/p>
&lt;p>Prerequisites: access to a Handle service registered in the Onezone. See the
&lt;a href="https://onedata.org/#/home/documentation/doc/using_onedata/handle_services.html">Handle Service API documentation&lt;/a>
for documentation on registering a new Handle service or ask a Onezone
administrator to authorize you to use an existing Handle service already
registered in the Onezone.&lt;/p>
&lt;p>The following variables should be set:&lt;/p>
&lt;ul>
&lt;li>&lt;code>API_ACCESS_TOKEN&lt;/code>:
&lt;a href="https://onedata.org/docs/doc/using_onedata/using_onedata_from_cli.html#authentication">Onedata API access token&lt;/a>&lt;/li>
&lt;li>&lt;code>ONEZONE_HOST&lt;/code>: name or IP of the Onezone host (to use Onezone API).&lt;/li>
&lt;li>&lt;code>ONEPROVIDER_HOST&lt;/code>: name or IP of the Oneprovider host (to use Oneprovider
API)&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Getting the IDs of the available Handle Services&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/handle_services&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">HANDLE_SERVICE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;HANDLE_SERVICE_ID&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Getting details about a specific Handle service&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/handle_services/&lt;/span>&lt;span style="color:#000">$HANDLE_SERVICE&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing all spaces&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/effective_spaces/&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Displaying details of a space&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/spaces/&lt;/span>&lt;span style="color:#000">$SPACE_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing content of a space&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/files/EGI%20Foundation/&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Creating a share of a subdirectory of a space&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">DIR_ID_TO_SHARE&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;DIR_ID&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X POST -H &lt;span style="color:#4e9a06">&amp;#39;Content-Type: application/json&amp;#39;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#39;{&amp;#34;name&amp;#34;: &amp;#34;input&amp;#34;}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/shares-id/&lt;/span>&lt;span style="color:#000">$DIR_ID_TO_SHARE&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Displaying the share&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">SHARE_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;SHARED_ID&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -sS --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/shares/&lt;/span>&lt;span style="color:#000">$SHARE_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> jq &lt;span style="color:#4e9a06">&amp;#39;.&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Registering a handle&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Proper Dublin Core metadata is required&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># It can be created using https://nsteffel.github.io/dublin_core_generator/generator_nq.html&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ cat metadata.xml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Escape double quotes and drop line return&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">METADATA&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#204a87;font-weight:bold">$(&lt;/span>cat metadata.xml &lt;span style="color:#000;font-weight:bold">|&lt;/span> sed &lt;span style="color:#4e9a06">&amp;#39;s/&amp;#34;/\\&amp;#34;/g&amp;#39;&lt;/span> &lt;span style="color:#000;font-weight:bold">|&lt;/span> tr &lt;span style="color:#4e9a06">&amp;#39;\n&amp;#39;&lt;/span> &lt;span style="color:#4e9a06">&amp;#39; &amp;#39;&lt;/span>&lt;span style="color:#204a87;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># On handle creation the created handles is provided in the Location header&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl -D - --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-type: application/json&amp;#34;&lt;/span> -X POST &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#39;{&amp;#34;handleServiceId&amp;#34;: &amp;#34;&amp;#39;&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$HANDLE_SERVICE_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">&amp;#39;&amp;#34;, &amp;#34;resourceType&amp;#34;: &amp;#34;Share&amp;#34;, &amp;#34;resourceId&amp;#34;: &amp;#34;&amp;#39;&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$SHARE_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">&amp;#39;&amp;#34;, &amp;#34;metadata&amp;#34;: &amp;#34;&amp;#39;&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$METADATA&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">&amp;#39;&amp;#34;}&amp;#39;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/handles&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing handles&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/handles&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Displaying a handle&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#000">HANDLE_ID&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;HANDLE_ID&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ curl --tlsv1.2 -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$API_ACCESS_TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&lt;/span>&lt;span style="color:#000">$ONEZONE_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/onezone/user/handles/&lt;/span>&lt;span style="color:#000">$HANDLE_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="subscribe-to-file-events">Subscribe to file events&lt;/h2>
&lt;p>Following is an example of how to subscribe to DataHub to receive notification
on file events which is described in details in the official documentation
&lt;a href="https://onedata.org/#/home/api/stable/oneprovider?anchor=operation/get_space_changes">Subscribe to file events&lt;/a>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ curl -N -H &lt;span style="color:#4e9a06">&amp;#34;X-Auth-Token: &lt;/span>&lt;span style="color:#000">$TOKEN&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -X POST &lt;span style="color:#4e9a06">&amp;#34;https://&lt;/span>&lt;span style="color:#000">$ONEPROVIDER_HOST&lt;/span>&lt;span style="color:#4e9a06">/api/v3/oneprovider/changes/metadata/&lt;/span>&lt;span style="color:#000">$SPACE_ID&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#34;@./changes_req.json&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This requires the permission set as following:&lt;/p>
&lt;p>&lt;img src="datahub-space-permissions.png" alt="Viewing file popularity for smart caching">&lt;/p>
&lt;p>For groups or single users. For single users, one way to add one is to select
Effective members&amp;quot; -&amp;gt; in the user list search for the required user and &amp;ldquo;Make an
owner&amp;rdquo;. In this case the user will have admins privileges in addition to the one
required. As this might not be the desired configuration it will be enough to
remove all the unwanted permissions, e.g.: make it the same as the VO to which
the user belongs to, and leave only, as extra, the permission shown in the
screenshot.&lt;/p></description></item><item><title>Users: DataHub Links</title><link>/users/data/management/datahub/links/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/users/data/management/datahub/links/</guid><description>
&lt;ul>
&lt;li>&lt;a href="https://datahub.egi.eu">EGI DataHub service&lt;/a>
&lt;ul>
&lt;li>&lt;a href="https://go.egi.eu/datahub-intro">Overview slides&lt;/a>&lt;/li>
&lt;/ul>
&lt;!-- - [Community Forum](https://community.egi.eu/c/egi-services/datahub) -->
&lt;ul>
&lt;li>&lt;a href="https://indico.egi.eu/event/5089/">EGI Webinar&lt;/a> and
&lt;a href="https://youtu.be/ayAplV2kEN4">YouTube video&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="https://onedata.org/docs/doc/system_requirements.html">System requirements&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://onedata.org/#/home/documentation">Official Onedata documentation&lt;/a>
&lt;ul>
&lt;li>&lt;a href="https://onedata.org">Onedata homepage&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/onedata/getting-started">Getting started&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/onedata">Source code&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item></channel></rss>