This is the primary function for querying the
HydroShare API /hsapi/resource
endpoint. It will return
a tibble corresponding to the
given parameters. Endpoint is chosen algorithmically based
on passed parameters.
hs_resource(...)
... | See details. |
---|
A tibble. See details.
Below is a sectioned list of all possible parameters
that hs_resource
can parse, and the
corresponding HydroShare API endpoint(s)/functions used.
Parameters marked with an asterisk (*) are required for that endpoint.
hs_search
)/hsapi/resource/search
Parameter | Data/Object Type | Description |
page | integer | A page number within the paginated result set. |
count | integer | Number of results to return per page. |
creator | character | The first author (name or email) |
author | character vector | List of authors (name or email) |
group | character | A group name (requires edit_permissions = TRUE ) |
user | character | Viewable by user (name or email) |
owner | character | Owned by user (name or email) |
from_date | Date | To get a list of resources created on or after this date |
to_date | Date | To get a list of resources created on or before this date |
subject | character vector | Comma separated list of subjects |
full_text_search | character | Get a list of resources with this text |
edit_permission | logical | Filter by edit permissions of user/group/owner? |
published | logical | Filter by published resources? |
type | character vector | List of resources of the specified resource types. See below possible values. |
coverage_type | character | To get a list of resources that fall within the specified tial coverage boundary. Either: "box" or "point" |
coordinates | character vector | List of spatial coordinates in the form of (north, south, t, west) |
include_obselete | logical | Include replaced resources? |
For available resource types, see hs_types.
hs_sysmeta
)/hsapi/resource/id/sysmeta
Parameters | Data/Object Type | Description |
id * | character | Resource Alphanumeric ID |
Column | Description |
resource_title | Title of the resource |
resource_type | Resource type |
resource_id | ID of the resource |
abstract | Resource abstract |
authors | Authors of resource |
creator | Creator of resource |
doi | Resource DOI ID |
public | Indicates if resource if public |
discoverable | Indicates if resource is discoverable |
shareable | Indicates if resource is shareable |
immutable | Indicates if resource is immutable |
published | Indicates if resource is published |
date_created | Date resource was created |
date_last_updated | Date resource was last updated |
bag_url | URL to resource download, can be passed to download.file |
science_metadata_url | URL to science metadata |
resource_map_url | URL to resource map |
resource_url | URL to resource |
content_types | Resource content types, see hs_content_types |
hs_access
)/hsapi/resource/id/access
Parameter | Data/Object Type | Description |
id * | character | Resource Alphanumeric ID |
access * | logical | Must be TRUE for access query |
Column | Description |
id | Resource Alphanumeric ID |
privilege | User's privilege level |
user | User to be granted privilege |
resource | Resource to which privilege applies |
grantor | Grantor of privilege |
hs_files
)/hsapi/resource/id/files
Parameter | Data/Object Type | Description |
id * | character | Resource Alphanumeric ID |
files * | logical | Must be TRUE for files query |
page | integer | Page of results to return |
count | integer | Number of files to return per page |
Column | Description |
file_name | The filename, including the path |
url | The url to download the file |
size | The size of the file |
content_type | The content type of the file |
logical_file_type | The logical file type |
modified_time | The last modified time of the file |
checksum | The file's checksum |
hs_folder
)/hsapi/resource/id/folders/pathname/
Parameter | Data/Object Type | Description |
id * | character | Resource Alphanumeric ID |
pathname * | character | Path to folder in resource's contents |
Column | Description |
resource_id | Resource Alphanumeric ID |
path | Path to folder in resource's contents |
contents | Nested tibble with files and folders within path |
hs_scimeta
)/hsapi/resource/id/scimeta
Parameter | Data/Object Type | Description |
id * | character | Resource Alphanumeric ID |
scimeta * | logical | Must be TRUE for scimeta query |
Column | Description |
id | Resource Alphanumeric ID |
title | Resource Title |
citation | Resource Bibliography Citation |
creators | Nested tibble of resource creator(s) |
sources | Nested tibble of resource source(s) |
metadata | Nested tibble with additional resource metadata |