Skip to contents

Retrieve Data & Metadata

Publicly accessible

Functions for retrieving files and metadata from DataStore. If you are not an internal NPS user, you can still use these functions to access publicly available information on DataStore. NPS users can set nps_internal = TRUE to access restricted references as well.

search_references_by_id()
Search NPS DataStore references by their ID
search_references_by_id_basic()
Search NPS DataStore references by ID
get_bibliography()
Retrieve the bibliographic information from a DataStore reference
get_by_for_nps()
Determine if a reference was created by/for the NPS
get_date_precision()
Get a list of valid values for date precision
get_external_links()
Retrieve the external links from a DataStore reference
get_file_info()
Retrieve information about files associated with a DataStore reference
get_keywords()
Retrieve the keywords for a DataStore reference
get_reference_owners()
List the owners of a DataStore reference
get_reference_types()
Get a list of valid reference types

Internal only

get_lifecycle_info()
Retrieve the current lifecycle status of a reference. Only works for internal NPS users.

Create and Modify References

Internal only

Functions for creating and modifying references in DataStore. These functions only work for internal NPS users. Note that by default, these functions will use the development and testing version of DataStore to avoid accidental changes to real references. Always test your code before switching to dev = FALSE! When in doubt, contact the DataStore team () for help.

create_draft_reference()
Create a new draft reference
upload_file_to_reference()
Upload file to an existing DataStore reference
add_external_link()
Add external links to a DataStore reference
add_keywords()
Add keywords to a DataStore reference
add_reference_owners()
Add owners to a DataStore reference
add_to_project()
Add DataStore reference(s) to a Project reference
set_bibliography()
Replace the bibliography in a DataStore reference
set_by_for_nps()
Set the flag that indicates whether a reference was created by or for NPS
set_file_info()
Set file information
set_license()
Set the license for a DataStore reference
set_lifecycle_active()
Activate a reference
set_lifecycle_draft()
Set a reference to draft mode
delete_all_keywords()
Delete all keywords from a DataStore reference
delete_reference_owner()
Delete an owner from a DataStore reference

Examples

example_ref_ids()
Retrieve some valid DataStore reference IDs
public_refs
Reference IDs for public-facing references
internal_refs
Reference IDs for internal-facing references

Miscellaneous

Internal only

active_directory_lookup()
Look up emails and/or UPNs in Active Directory