brapi_post_lists: post /lists

View source: R/brapi_post_lists.R

brapi_post_listsR Documentation

post /lists

Description

Create New List Objects

Usage

brapi_post_lists(
  con = NULL,
  data = "",
  additionalInfo = list(),
  dateCreated = "",
  dateModified = "",
  externalReferences = "",
  listDescription = "",
  listName = "",
  listOwnerName = "",
  listOwnerPersonDbId = "",
  listSize = 0,
  listSource = "",
  listType = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

data

vector of type character; required: FALSE; The list of DbIds contained in this list; default: "", when using multiple values supply as c("value1", "value2").

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.

dateCreated

character; required: FALSE; Timestamp when the entity was first created. Coded in the ISO 8601 standard extended format, where date, time and time zone information needs to be provided (check for example https://www.w3.org/TR/NOTE-datetime).

dateModified

character; required: FALSE; Timestamp when the entity was last updated. Coded in the ISO 8601 standard extended format, where date, time and time zone information needs to be provided (check for example https://www.w3.org/TR/NOTE-datetime).

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.

listDescription

character; required: FALSE; Description of a List.

listName

character; required: FALSE; Human readable name of a List.

listOwnerName

character; required: FALSE; Human readable name of a List Owner (usually a user or person).

listOwnerPersonDbId

character; required: FALSE; The unique identifier for a List Owner (usually a user or person).

listSize

integer; required: FALSE; The number of elements in a List.

listSource

character; required: FALSE; The description of where a List originated from.

listType

character; required: FALSE; default: "", other possible values: "germplasm"|"markers"|"observations "|"observationUnits"|"observationVariables"|" programs"|"samples"|"studies"|"trials"

Details

Create new list objects in the database.

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_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_people_personDbId(), brapi_put_programs_programDbId(), brapi_put_seasons_seasonDbId(), brapi_put_studies_studyDbId(), brapi_put_trials_trialDbId()

Other Lists: brapi_get_lists_listDbId(), brapi_get_lists(), brapi_get_search_lists_searchResultsDbId(), brapi_post_lists_listDbId_items(), brapi_post_search_lists(), brapi_put_lists_listDbId()

Examples

## Not run: 
con <- brapi_db()$testserver
con[["token"]] <- "YYYY"
data <- c("germ1", "germ2", "germ3")
additionalInfo <- list(dummyData = "True", example = "post_lists")
dateCreated <- "2021-04-12T09:01:03.183+02:00"
dateModified <- "2021-04-13T07:00:24.596Z"
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"))
listDescription <-
 "This is a list of germplasm I would like to investigate next summer season"
listName <- "WURgermplasm_Apr_2021"
listOwnerName <- "Bob Robertson"
listOwnerPersonDbId <- "person1"
listSize <- 3
listSource <- "WUR GeneBank"
listType <- "germplasm"
brapi_post_lists(con = con,
                 data = data,
                 additionalInfo = additionalInfo,
                 dateCreated = dateCreated,
                 dateModified = dateModified,
                 externalReferences = externalReferences,
                 listDescription = listDescription,
                 listName = listName,
                 listOwnerName = listOwnerName,
                 listOwnerPersonDbId = listOwnerPersonDbId,
                 listSize = listSize,
                 listSource = listSource,
                 listType = listType)

## End(Not run)


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