brapi_put_programs_programDbId: put /programs/{programDbId}

View source: R/brapi_put_programs_programDbId.R

brapi_put_programs_programDbIdR Documentation

put /programs/{programDbId}

Description

Update an existing Program

Usage

brapi_put_programs_programDbId(
  con = NULL,
  programDbId = "",
  abbreviation = "",
  additionalInfo = list(),
  commonCropName = "",
  documentationURL = "",
  externalReferences = "",
  leadPersonDbId = "",
  leadPersonName = "",
  objective = "",
  programName = ""
)

Arguments

con

list; required: TRUE; BrAPI connection object

programDbId

character; required: TRUE; Filter by the common crop name. Exact match.

abbreviation

character; required: FALSE; An abbreviation which represents this program.

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.

commonCropName

character; required: FALSE; Common name for the crop, which this program is for.

documentationURL

character; required: FALSE; A URL to the human readable documentation of this object.

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.

leadPersonDbId

character; required: FALSE; The unique identifier of the program leader. Needs to be an existing personDbId.

leadPersonName

character; required: FALSE; The name of the program leader.

objective

character; required: FALSE; The primary objective of the program.

programName

character; required: FALSE; Human readable name of the program.

Details

Update the details of an existing breeding Program.

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

Other Programs: brapi_get_programs_programDbId(), brapi_get_programs(), brapi_get_search_programs_searchResultsDbId(), brapi_post_programs(), brapi_post_search_programs()

Examples

## Not run: 
con <- brapi_db()$testserver
con[["token"]] <- "YYYY"
abbreviation <- "P1"
additionalInfo <- list(additionalProp1 = "string",
                                additionalProp2 = "string",
                                additionalProp3 = "string")
commonCropName <- "Tomatillo"
documentationURL <- "https://wiki.brapi.org"
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"))
leadPersonDbId <- "program_person_1"
leadPersonName <- "Bob Robertson"
objective <- "Make a better tomatillo"
programName <- "Tomatillo_Breeding_Program"

out <-
 brapi_post_programs(con = con,
                     abbreviation = abbreviation,
                     additionalInfo = additionalInfo,
                     commonCropName = commonCropName,
                     documentationURL = documentationURL,
                     externalReferences = externalReferences,
                     leadPersonDbId = leadPersonDbId,
                     leadPersonName = leadPersonName,
                     objective = objective,
                     programName = programName)

abbreviation <- "TIP1"
objective <- "Make an even much better tomatillo"
programName <- "Tomatillo Improvement Program"

brapi_put_programs_programDbId(con = con,
                               programDbId = unique(out$programDbId),
                               abbreviation = abbreviation,
                               objective = objective,
                               programName = programName)

## End(Not run)


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