WebDAV Access using Command-line Tools¶
You can access the Data Store via command-line tools using WebDAV, which is especially useful for integrating data into analysis pipelines or scripts. This guide covers using curl, a widely used command-line tool, for efficient WebDAV access and data management.
WebDAV Access Information¶
Use the following credentials to connect to the Data Store:
| Key | Value |
|---|---|
URL |
https://data.cyverse.org/dav |
username |
<CyVerse Username> |
password |
<CyVerse Password> |
Use these credentials for anonymous access to the Data Store:
| Key | Value |
|---|---|
username |
anonymous |
password |
(leave empty) |
Connect to the Data Store¶
To list the contents of your home directory in the Data Store using WebDAV, open a terminal and run the following command:
curl --user '<username>:<password>' https://data.cyverse.org/dav/iplant/home/<username>
- Use your CyVerse username and password with
--userflag to login -
https://data.cyverse.org/davis the URL of the WebDAV root. Add Data Store path after for URL -
--user '<username>:<password>': This option provides your CyVerse username and password for authentication. Replaceand with your actual credentials. https://data.cyverse.org/dav/iplant/home/<username>: This is the URL of your home directory within the Data Store's WebDAV server.https://data.cyverse.org/davis the root WebDAV URL, and/iplant/home/<username>specifies the path to your home directory in the Data Store.
The output will be an HTML-formatted text displaying files and directories in a table layout.
Data Locations¶
-
User Data
Users can access their data at:https://data.cyverse.org/dav/iplant/home/<username>/ -
Public Data (Read-Only Access)
Anonymous users can access public data at:
https://data.cyverse.org/dav-anon/ -
Community/Project Data
To access project-specific data stored in iRODS at/iplant/home/shared/<project>/, use:https://data.cyverse.org/dav/iplant/projects/<project>/ -
CyVerse Curated Data (DOI-Backed Datasets)
Access curated datasets with DOIs in the Data Commons at:https://data.cyverse.org/dav-anon/iplant/commons/cyverse_curated/
Examples¶
-
List files in your home directory:
curl https://data.cyverse.org/dav/iplant/home/myUserThis prints files and directories in HTML format.
-
Read a file:
curl https://data.cyverse.org/dav/iplant/home/myUser/myfile.txtThis displays the content of
myfile.txtin the terminal. -
Download a file:
curl -O https://data.cyverse.org/dav/iplant/home/myUser/myfile.txtThis saves
myfile.txtto the current directory.curl -o newfile.txt https://data.cyverse.org/dav/iplant/home/myUser/myfile.txtThis saves
myfile.txtasnewfile.txtin the current directory. -
Upload a file:
curl -T localfile.txt https://data.cyverse.org/dav/iplant/home/myUser -
Creat a new directory:
curl -X MKCOL https://data.cyverse.org/dav/iplant/home/myUser/newdir -
Renaming a File:
curl -X MOVE --header "Destination: https://data.cyverse.org/dav/iplant/home/myUser/new_name.txt" https://data.cyverse.org/dav/iplant/home/myUser/old_name.txtThis renames
old_name.txttonew_name.txt. -
Deleting Files/Folders:
curl -X DELETE https://data.cyverse.org/dav/iplant/home/myUser/file_to_delete.txt