Update Metadata

HydroShare has a Python API for adding metadata information to a resource about any or all authors who have contributed to the resource. Metadata helps the viewer to know more about the authors of the resource.

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

Step 1: Sign into HydroShare using your credentials

In the boxes below enter the user’s personal HydroShare username and password. If needed, make a HydroShare account by clicking here.

Step 2: Enter the Name of the Author(s) and/ or Chief Contributor(s) to the Resource.

Now enter the names of the Co-Authors of the resource

The resource Id is a unique identifier for every resource on Hydroshare. You can findit by browsing to your HydroShare resource copying the ID from the URL. Like for example, 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. And so the resource id from the example hyperlink is 08c6e88adaa647cd9bb28e5d619178e0

Resource ID

Step 3: Add Information to the fields shown below:

Metadata is meant to be descriptive and detailed. Displayed below are the fields that appear here are the same as they do on the HydroShare website.

Once ready, update the added information. Then go ahead and click the submit button shown below.

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)
metadata = {
          "title": "A new title for my resource",
          "coverages": [
                                                    {"type": "period", "value": {"start": "01/01/2000", "end": "12/12/2010"}}
                                              ],
                      "creators": [
                                                {"name": "John Smith", "organization": "USU"},
                                                {"name": "Lisa Miller", "email": "lisa_miller@gmail.com"}
                                          ]
                  }
science_metadata_json = hs.updateScienceMetadata('ID OF RESOURCE GOES HERE', metadata=metadata)