brapi_post_search_studies: post /search/studies

View source: R/brapi_post_search_studies.R

brapi_post_search_studiesR Documentation

post /search/studies

Description

Submit a search request for Studies

Usage

brapi_post_search_studies(
  con = NULL,
  active = NA,
  commonCropNames = "",
  externalReferenceIDs = "",
  externalReferenceSources = "",
  germplasmDbIds = "",
  germplasmNames = "",
  locationDbIds = "",
  locationNames = "",
  observationVariableDbIds = "",
  observationVariableNames = "",
  programDbIds = "",
  programNames = "",
  seasonDbIds = "",
  sortBy = "",
  sortOrder = "",
  studyCodes = "",
  studyDbIds = "",
  studyNames = "",
  studyPUIs = "",
  studyTypes = "",
  trialDbIds = "",
  trialNames = "",
  page = 0,
  pageSize = 1000
)

Arguments

con

list; required: TRUE; BrAPI connection object

active

logical; required: FALSE; Is this study currently active; default: NA, other possible values: TRUE | FALSE

commonCropNames

vector of type character; required: FALSE; Common crop name(s) of the studies to search for; default: "", when using multiple values supply as c("value1", "value2").

externalReferenceIDs

vector of type character; required: FALSE; External reference identifier(s) to search for. 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; Source system or database identifier(s) of an external reference(s) to search for (use with externalReferenceIDs parameter); default: "", when using multiple values supply as c("value1", "value2").

germplasmDbIds

vector of type character; required: FALSE; Unique germplasm indentifier(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

germplasmNames

vector of type character; required: FALSE; Human readable germplasm name(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

locationDbIds

vector of type character; required: FALSE; The unique location identifier(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

locationNames

vector of type character; required: FALSE; A human readable location name(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

observationVariableDbIds

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

observationVariableNames

vector of type character; required: FALSE; Observation variable name(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

programDbIds

vector of type character; required: FALSE; Unique program identifier(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

programNames

vector of type character; required: FALSE; Program name(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

seasonDbIds

vector of type character; required: FALSE; Unique season identifier(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

sortBy

character; required: FALSE; Name of one of the fields within the study object on which results can be sorted; default: "".

sortOrder

character; required: FALSE; Order results should be sorted, e.g. "ASC" or "DESC"; default: "".

studyCodes

vector of type character; required: FALSE; Short human readable study code(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

studyDbIds

vector of type character; required: FALSE; Unique study identifier(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

studyNames

vector of type character; required: FALSE; Study name(s) to filter search results for; default: "", when using multiple values supply as c("value1", "value2").

studyPUIs

vector of type character; required: FALSE; Study permanent unique identifier(s) to search for. For example, a URI or DOI; default: "", when using multiple values supply as c("value1", "value2").

studyTypes

vector of type character; required: FALSE; Study type(s) being performed to search for, e.g. "Yield Trial", etc.; default: "", when using multiple values supply as c("value1", "value2").

trialDbIds

vector of type character; required: FALSE; Unique trial identifier(s) to search for; default: "", when using multiple values supply as c("value1", "value2").

trialNames

vector of type character; required: FALSE; Human readable trial name(s) 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.

Details

Advanced searching for the studies resource. 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-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_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 Studies: brapi_get_search_studies_searchResultsDbId(), brapi_get_studies_studyDbId(), brapi_get_studies(), brapi_get_studytypes(), brapi_post_studies(), brapi_put_studies_studyDbId()

Examples

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

# Immediate Response Example
brapi_post_search_studies(con = con,
                         studyDbIds = "study1")

# Saved or Asynchronous Search Response Example
brapi_post_search_studies(con = con,
                          active = TRUE,
                          commonCropNames = "Tomatillo",
                          locationDbIds = "location_02",
                          studyDbIds = "study2",
                          trialDbIds = "trial2")

## End(Not run)


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