brapi_put_people_personDbId: put /people/{personDbId}

View source: R/brapi_put_people_personDbId.R

brapi_put_people_personDbIdR Documentation

put /people/{personDbId}

Description

Update an existing Person

Usage

brapi_put_people_personDbId(
  con = NULL,
  personDbId = "",
  additionalInfo = list(),
  description = "",
  emailAddress = "",
  externalReferences = "",
  firstName = "",
  lastName = "",
  mailingAddress = "",
  middleName = "",
  phoneNumber = "",
  userID = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

personDbId

character; required: TRUE; The unique ID of a person

additionalInfo

list; required: FALSE; Additional arbitrary information. If provided use the following construct list(additionalProp1 = "string", additionalProp2 = "string", additionalProp3 = "string").

The Examples section shows an example on how to construct the additionalInfo argument as a list.

description

character; required: FALSE; A description of this person.

emailAddress

character; required: FALSE; An email address for this person.

externalReferences

data.frame; required: FALSE; A data.frame of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI. The externalReferences argument data.frame should contain the following columns:

  • referenceID character; required: TRUE; The external reference ID. Could be a simple string or a URI.

  • referenceSource character; required: TRUE; An identifier for the source system or database of this reference.

The Examples section shows an example of how to construct the externalReferences argument as a data.frame.

firstName

character; required: FALSE; Persons first name.

lastName

character; required: FALSE; Persons last name.

mailingAddress

character; required: FALSE; Physical address of this person.

middleName

character; required: FALSE; Persons middle name.

phoneNumber

character; required: FALSE; phone number of this person.

userID

character; required: FALSE; A systems user ID associated with this person. Different from personDbId because you could have a person, who is not a user of the system.

Details

Update an existing Person

Value

data.frame

Author(s)

Maikel Verouden

References

BrAPI SwaggerHub

See Also

Other brapi-core: brapi_get_commoncropnames(), brapi_get_lists_listDbId(), brapi_get_lists(), brapi_get_locations_locationDbId(), brapi_get_locations(), brapi_get_people_personDbId(), brapi_get_people(), brapi_get_programs_programDbId(), brapi_get_programs(), brapi_get_search_lists_searchResultsDbId(), brapi_get_search_locations_searchResultsDbId(), brapi_get_search_people_searchResultsDbId(), brapi_get_search_programs_searchResultsDbId(), brapi_get_search_studies_searchResultsDbId(), brapi_get_search_trials_searchResultsDbId(), brapi_get_seasons_seasonDbId(), brapi_get_seasons(), brapi_get_serverinfo(), brapi_get_studies_studyDbId(), brapi_get_studies(), brapi_get_studytypes(), brapi_get_trials_trialDbId(), brapi_get_trials(), brapi_post_lists_listDbId_items(), brapi_post_lists(), brapi_post_locations(), brapi_post_people(), brapi_post_programs(), brapi_post_search_lists(), brapi_post_search_locations(), brapi_post_search_people(), brapi_post_search_programs(), brapi_post_search_studies(), brapi_post_search_trials(), brapi_post_seasons(), brapi_post_studies(), brapi_post_trials(), brapi_put_lists_listDbId(), brapi_put_locations_locationDbId(), brapi_put_programs_programDbId(), brapi_put_seasons_seasonDbId(), brapi_put_studies_studyDbId(), brapi_put_trials_trialDbId()

Other People: brapi_get_people_personDbId(), brapi_get_people(), brapi_get_search_people_searchResultsDbId(), brapi_post_people(), brapi_post_search_people()

Examples

## Not run: 
con <- brapi_db()$testserver
con[["token"]] <- "YYYY"
additionalInfo <- list(dummyData = "True", example = "post_people")
description <- "Bob likes pina coladas and getting caught in the rain."
emailAddress <- "bob@bob.com"
externalReferences <-
  data.frame(referenceID = c("doi:10.155454/12341234",
                             "http://purl.obolibrary.org/obo/ro.owl",
                             "75a50e76"),
             referenceSource = c("DOI",
                                 "OBO Library",
                                 "Remote Data Collection Upload Tool"))
firstName <- "Bob"
middleName <- "Danger"
lastName <- "Robertson"
mailingAddress <- "123 Street Ave, City, State, Country"
phoneNumber <- "+1-555-555-5555"
userID <- "bob-24"

out <-
 brapi_post_people(con = con,
                   additionalInfo = additionalInfo,
                   description = description,
                   emailAddress = emailAddress,
                   externalReferences = externalReferences,
                   firstName = firstName,
                   middleName = middleName,
                   lastName = lastName,
                   mailingAddress = mailingAddress,
                   phoneNumber = phoneNumber,
                   userID = userID)

additionalInfo <- list(dummyData = "True", example = "put_people_personDbId")
description <- "Rob does not like pina coladas nor getting caught in the rain."
emailAddress <- "rob@robetson.com"
firstName <- "Rob"
middleName <- "Safety"
lastName <- "Robertson"
userID <- "rob-01"

brapi_put_people_personDbId(con = con,
                            personDbId = unique(out$personDbId),
                            additionalInfo = additionalInfo,
                            description = description,
                            emailAddress = emailAddress,
                            firstName = firstName,
                            lastName = lastName,
                            middleName = middleName,
                            userID = userID)

## End(Not run)


mverouden/brapir-v2 documentation built on April 22, 2022, 9:24 a.m.