Create a Folder

The ‘Create a Folder’ feature allows for a new folder to be made, better organizing the HydroShare resource. This feature is run by the HydroShare API Python library.

Below are step by step instructions on how to create a folder:

Step 1: Sign into HydroShare using your credentials

In the boxes below you enter your HydroShare username and its password. If you have to make an HydroShare account, click here.

Step 2: Enter in the Resource ID of the resource in which you intend to create a folder:

The resource ID is a unique identifier for every resource on HydroShare. You can find it by clicking on your resource in HydroShare, scrolling down to the “How to Cite” section, and copying the ID from the URL. This is an example hyperlink: https://www.hydroshare.org/resource/08c6e88adaa647cd9bb28e5d619178e0/ from which The 32 letter combination at the end is called the resource ID. The resource ID from the example hyperlink is 08c6e88adaa647cd9bb28e5d619178e0.

Resource ID

Learn more:

To try this on your own, you can use the code snippet below that is used in this demonstration.

    
from hs_restclient import HydroShare, HydroShareAuthBasic
auth = HydroShareAuthBasic(username='myusername', password='mypassword')
hs = HydroShare(auth=auth)
folder_to_create = "folder_1/folder_2"
response_json = hs.createResourceFolder('ID OF RESOURCE GOES HERE', pathname=folder_to_create)