brapi_post_search_variables: post /search/variables

View source: R/brapi_post_search_variables.R

brapi_post_search_variablesR Documentation

post /search/variables

Description

Submit a search request for Observation Variables

Usage

brapi_post_search_variables(
  con = NULL,
  dataTypes = "",
  externalReferenceIDs = "",
  externalReferenceSources = "",
  methodDbIds = "",
  observationVariableDbIds = "",
  observationVariableNames = "",
  ontologyDbIds = "",
  page = 0,
  pageSize = 1000,
  scaleDbIds = "",
  studyDbId = "",
  traitClasses = "",
  traitDbIds = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

dataTypes

vector of type character; required: FALSE; List of scale data types to filter search results. Class of the scale entries can be:

  • "Code" - This scale class is exceptionally used to express complex traits. Code is a nominal scale that combines the expressions of the different traits composing the complex trait. For example a severity trait might be expressed by a 2 digit and 2 character code. The first 2 digits are the percentage of the plant covered by a fungus and the 2 characters refer to the delay in development, e.g. "75VD" means "75 %" of the plant is infected and the plant is very delayed.

  • "Date" - The date class is for events expressed in a time format, 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.

  • "Duration" - The Duration class is for time elapsed between two events expressed in a time format, e.g. days, hours, months.

  • "Nominal" - Categorical scale that can take one of a limited and fixed number of categories. There is no intrinsic ordering to the categories.

  • "Numerical" - Numerical scales express the trait with real numbers. The numerical scale defines the unit e.g. centimeter, ton per hectare, branches.

  • "Ordinal" - Ordinal scales are scales composed of ordered categories.

  • "Text" - A free text is used to express the trait.

default: "", when using multiple values supply as c( "value1", "value2").

externalReferenceIDs

vector of type character; required: FALSE; List of external reference IDs. Could be a simple strings or a URIs. (use with externalReferenceSources parameter); default: "", when using multiple values supply as c("value1", "value2").

externalReferenceSources

vector of type character; required: FALSE; List of identifiers for the source system or database of an external reference (use with externalReferenceIDs parameter); default: "", when using multiple values supply as c("value1", "value2").

methodDbIds

vector of type character; required: FALSE; List of methods , supplied as unique database identifiers, to filter search results; default: "", when using multiple values supply as c( "value1", "value2").

observationVariableDbIds

vector of type character; required: FALSE; List of unique observation variable datbase identifiers to search for; default: "", when using multiple values supply as c( "value1", "value2").

observationVariableNames

vector of type character; required: FALSE; List of human readable observation variable names to search for; default: "", when using multiple values supply as c("value1", "value2").

ontologyDbIds

vector of type character; required: FALSE; List of unique ontology database identifiers to search for; default: "", when using multiple values supply as c("value1", "value2").

page

integer; required: FALSE; Used to request a specific page of data to be returned. The page indexing starts at 0 (the first page is page = 0). Default is 0.

pageSize

integer; required: FALSE; The size of the pages to be returned. Default is 1000.

scaleDbIds

vector of type character; required: FALSE; List of unique scale database identifiers to filter search results; default: "" , when using multiple values supply as c("value1", "value2").

studyDbId

vector of type character; required: FALSE; The unique database identifiers of studies to filter on; default: "", when using multiple values supply as c("value1", "value2").

traitClasses

vector of type character; required: FALSE; List of trait classes to filter search results, examples: "morphological", "phenological", "agronomical", "physiological", "abiotic stress", "biotic stress", "biochemical", "quality traits", "fertility", etc.); default: "", when using multiple values supply as c("value1", "value2").

traitDbIds

vector of type character; required: FALSE; List of trait unique database identifiers to filter search results; default: "", when using multiple values supply as c("value1", "value2").

Details

Submit a search request for Observation Variables. Function will return either the search results (Status 200 for an immediate response) or a searchResultsDbId (Status 202 for both a saved and an asynchronous search).

Value

data.frame

Author(s)

Maikel Verouden

References

BrAPI SwaggerHub

See Also

Other brapi-phenotyping: brapi_get_events(), brapi_get_images_imageDbId(), brapi_get_images(), brapi_get_methods_methodDbId(), brapi_get_methods(), brapi_get_observationlevels(), brapi_get_observations_observationDbId(), brapi_get_observations_table(), brapi_get_observations(), brapi_get_observationunits_observationUnitDbId(), brapi_get_observationunits_table(), brapi_get_observationunits(), brapi_get_ontologies(), brapi_get_scales_scaleDbId(), brapi_get_scales(), brapi_get_search_images_searchResultsDbId(), brapi_get_search_observations_searchResultsDbId(), brapi_get_search_observationunits_searchResultsDbId(), brapi_get_search_variables_searchResultsDbId(), brapi_get_traits_traitDbId(), brapi_get_traits(), brapi_get_variables_observationVariableDbId(), brapi_get_variables(), brapi_post_images(), brapi_post_methods(), brapi_post_observations(), brapi_post_observationunits(), brapi_post_scales(), brapi_post_search_images(), brapi_post_search_observations(), brapi_post_search_observationunits(), brapi_post_traits(), brapi_post_variables(), brapi_put_images_imageDbId_imagecontent(), brapi_put_images_imageDbId(), brapi_put_methods_methodDbId(), brapi_put_observations_observationDbId(), brapi_put_observationunits_observationUnitDbId(), brapi_put_scales_scaleDbId(), brapi_put_traits_traitDbId(), brapi_put_variables_observationVariableDbId()

Other Observation Variables: brapi_get_search_variables_searchResultsDbId(), brapi_get_variables_observationVariableDbId(), brapi_get_variables(), brapi_post_variables(), brapi_put_variables_observationVariableDbId()

Examples

## Not run: 
con <- brapi_db()$testserver
con[["token"]] <- "YYYY"

# Immediate Response Example
brapi_post_search_variables(con = con, page = 0, pageSize = 1000)

# Saved or Asynchronous Search Response Example
brapi_post_search_variables(
 con = con,
 dataTypes = c("Numerical", "Text"),
 externalReferenceIDs = "https://brapi.org/specification",
 externalReferenceSources = "BrAPI Doc",
 ontologyDbIds = "ontology_variable1",
 page = 0,
 pageSize = 1000)

## End(Not run)


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