Skip to content
Ben Tupper edited this page Jan 19, 2016 · 5 revisions

Researchers

Most of the time Researchers should be managed through the GUI. Usually we only need programmatic control of Researcher resources to verify that a user listed as a technician for an instrument is properly listed and to grab an email when alert a particular user.

Superclasses

NodeRefClass

Properties

In addition to superclass properties add the following...

  • username
  • user as "First Last"
  • email possibly ""
  • initials
Methods
  • GET()
  • PUT()
  • POST() disabled
  • DELETE() disabled, alerts user to use the GUI
Getting a listing of Researchers
lims <- Lims("~/.clarityrc')

# get a data.frame of all users
r <- lims$get_researchers()
r
                                name      username initials                  email
admin           System Administrator         admin      SA1                          
facility      Facility Administrator      facility      FA1                          
apiuser                   API Access       apiuser      API                          
cslewis                     CS Lewis       cslewis      CSL       cslewis@mail.com
janedoe                     Jane Doe       janedoe      JDO       janedoe@mail.com

# get by username as ResearcherRefNodes
r <- lims$get_researchers(username = "cslewis", form = 'Node')
r
$researcher
Reference Class: "ResearcherRefClass"
  Node uri: http://sservename:portnumber/api/v2/researchers/5
  Node children: first-name last-name email lab credentials initials
  Researcher name: CS Lewis
  Researcher username: cslewis
  Researcher email: cslewis@bigelow.org
  Researcher initials: CSL
Clone this wiki locally