BrAPI-Phenotyping
The BrAPI-Phenotyping module contains entities related to phenotypic observations. This includes Observation Units, Observations, Observation Variables, Traits, Scales, Methods, and Images.
- 1 GET /observationunits 22.11
- 2 GET /variables 23.01
- 3 POST /observations 23.01
- 4 PUT /observations 23.03
- 5 POST /images unsupported
- 6 PUT /images/{imageDbId} unsupported
- 7 PUT /images/{imageDbId}/imagecontent unsupported
- 8 GET /observationunits 22.11
- 9 POST /search/observationunits 25.06
- 9.1 Request Fields
- 9.2 Response Fields
- 10 GET /observations/table 23.06
GET /observationunits 22.11
Get a filtered set of Observation Units
Request (string) | Description GET /observationunits | CB-DB Reference |
|---|---|---|
observationUnitDbId | The unique ID of an Observation Unit | plot_id = experiment.plot.id |
germplasmDbId | The unique ID of a germplasm (accession) to filter on | |
studyDbId | The unique ID of a studies to filter on | |
locationDbId | The unique ID of a location where these observations were collected | |
trialDbId | The unique ID of a trial to filter on | experiment.experiment.id with “Breeding Trial” experiment type |
programDbId | The unique ID of a program to filter on | |
seasonDbId | The year or Phenotyping campaign of a multi-annual study (trees, grape, ...) | |
observationUnitLevelName | The Observation Unit Level. Returns only the observation unit of the specified Level. References ObservationUnit->observationUnitPosition->observationLevel->levelName | plot |
observationUnitLevelOrder | The Observation Unit Level Order Number. Returns only the observation unit of the specified Level. References ObservationUnit->observationUnitPosition->observationLevel->levelOrder | 7 |
observationUnitLevelCode | The Observation Unit Level Code. This parameter should be used together with | plot.plot_number |
includeObservations | Use this parameter to include a list of observations embedded in each ObservationUnit object. CAUTION - Use this parameter at your own risk. It may return large, unpaginated lists of observation data. Only set this value to True if you are sure you need to. | Possible MVI for this sprint: False by default Note: String type and not a boolen in BrAPI specs |
externalReferenceID | An external reference ID. Could be a simple string or a URI. (use with | No CB-DB counterpart |
externalReferenceSource | An identifier for the source system or database of an external reference (use with | No CB-DB counterpart |
Response (200) | Type | Description GET /observationunits | CB-DB Reference | Example |
|---|---|---|---|---|
additionalInfo | object | Additional arbitrary info | Possibly plot_metadata, set to empty ({}) for sprint 22.11- need more details for the required additional info in the Field Book app | {
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
"datafiles": [
{
"fileDescription": "This is an Excel data file",
"fileMD5Hash": "c2365e900c81a89cf74d83dab60df146",
"fileName": "datafile.xlsx",
"fileSize": 4398,
"fileType": "application/vnd.ms-excel",
"fileURL": "https://wiki.brapi.org/examples/datafile.xlsx"
}
],
"pagination": {
"currentPage": 0,
"pageSize": 1000,
"totalCount": 10,
"totalPages": 1
},
"status": [
{
"message": "Request accepted, response successful",
"messageType": "INFO"
}
]
},
"result": {
"data": [
{
"additionalInfo": {},
"externalReferences": [
{
"referenceID": "doi:10.155454/12341234",
"referenceSource": "DOI"
},
{
"referenceID": "http://purl.obolibrary.org/obo/ro.owl",
"referenceSource": "OBO Library"
},
{
"referenceID": "75a50e76",
"referenceSource": "Remote Data Collection Upload Tool"
}
],
"germplasmDbId": "e9d9ed57",
"germplasmName": "A0000001",
"locationDbId": "0e208b20",
"locationName": "Field Station Alpha",
"observationUnitDbId": "8c67503c",
"observationUnitName": "Plot 1",
"observationUnitPUI": "http://pui.per/plot/1a9afc14",
"observationUnitPosition": {
"entryType": "TEST",
"geoCoordinates": {
"geometry": {
"coordinates": [
-76.506042,
42.417373,
123
],
"type": "Point"
},
"type": "Feature"
},
"observationLevel": {
"levelCode": "Plot_123",
"levelName": "plot",
"levelOrder": 2
},
"observationLevelRelationships": [
{
"levelCode": "Field_1",
"levelName": "field",
"levelOrder": 0
},
{
"levelCode": "Block_12",
"levelName": "block",
"levelOrder": 1
},
{
"levelCode": "Plot_123",
"levelName": "plot",
"levelOrder": 2
}
],
"positionCoordinateX": "74",
"positionCoordinateXType": "GRID_COL",
"positionCoordinateY": "03",
"positionCoordinateYType": "GRID_ROW"
},
"observations": [
{
"additionalInfo": {},
"collector": "917d3ae0",
"externalReferences": [
{
"referenceID": "doi:10.155454/12341234",
"referenceSource": "DOI"
},
{
"referenceID": "http://purl.obolibrary.org/obo/ro.owl",
"referenceSource": "OBO Library"
},
{
"referenceID": "75a50e76",
"referenceSource": "Remote Data Collection Upload Tool"
}
],
"germplasmDbId": "2408ab11",
"germplasmName": "A0000003",
"observationDbId": "ef24b615",
"observationTimeStamp": "2018-01-01T14:47:23-0600",
"observationUnitDbId": "598111d4",
"observationUnitName": "Plot 1",
"observationVariableDbId": "c403d107",
"observationVariableName": "Plant Height in meters",
"season": {
"season": "Spring",
"seasonDbId": "Spring_2018",
"year": 2018
},
"studyDbId": "ef2829db",
"uploadedBy": "a2f7f60b",
"value": "2.3"
}
],
"programDbId": "2d763a7a",
"programName": "The Perfect Breeding Program",
"seedLotDbId": "261ecb09",
"studyDbId": "9865addc",
"studyName": "Purple_Tomato_1",
"treatments": [
{
"factor": "fertilizer",
"modality": "low fertilizer"
}
],
"trialDbId": "776a609c",
"trialName": "Purple Tomato"
}
]
}
}
|
externalReferences | array[object] | An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI. | No CB-DB counterpart | |
externalReferences | string | The external reference ID. Could be a simple string or a URI. | No CB-DB counterpart, return null | |
externalReferences | string | An identifier for the source system or database of this reference | No CB-DB counterpart, return null | |
germplasmDbId | string | The ID which uniquely identifies a germplasm | ||
germplasmName | string | Name of the germplasm. It can be the preferred name and does not have to be unique. | germsplam.germplasm.designation | |
locationDbId | string | The ID which uniquely identifies a location, associated with this study | ||
locationName | string | The human readable name of a location associated with this study | ||
observationUnitDbId | string | The ID which uniquely identifies an observation unit MIAPPE V1.1 (DM-70) Observation unit ID - Identifier used to identify the observation unit in data files containing the values observed or measured on that unit. Must be locally unique. | plot_id | |
observationUnitName | string | A human readable name for an observation unit | plot_code | |
observationUnitPUI | string | A Permanent Unique Identifier for an observation unit MIAPPE V1.1 (DM-72) External ID - Identifier for the observation unit in a persistent repository, comprises the name of the repository and the identifier of the observation unit therein. The EBI Biosamples repository can be used. URI are recommended when possible. | No CB-DB counterpart, return null | |
observationUnitPosition | object | All positional and layout information related to this Observation Unit MIAPPE V1.1 (DM-73) Spatial distribution - Type and value of a spatial coordinate (georeference or relative) or level of observation (plot 45, subblock 7, block 2) provided as a key-value pair of the form type:value. Levels of observation must be consistent with those listed in the Study section. | list of observation unit position info | |
observationUnitPosition | string | The type of entry for this observation unit. ex. "CHECK", "TEST", "FILLER" | plot_id → planting_instruction → entry_type | |
observationUnitPosition | object | One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system. Copied from RFC 7946 Section 3.1.1 A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. | geospatial coordinates per plot not yet implemented No CB-DB counterpart | |
observationUnitPosition | object | A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed. | same comment above No CB-DB counterpart, return null | |
observationUnitPosition | string | The literal string "Feature" | same comment above No CB-DB counterpart, return null | |
observationUnitPosition | object | The exact level and level code of an observation unit. For more information on Observation Levels, please review the Observation Levels documentation. MIAPPE V1.1 DM-71 Observation unit type "Type of observation unit in textual form, usually one of the following: study, block, sub-block, plot, sub-plot, pot, plant. Use of other observation unit types is possible but not recommended. The observation unit type can not be used to indicate sub-plant levels. However, observations can still be made on the sub-plant level, as long as the details are indicated in the associated observed variable (see observed variables). Alternatively, it is possible to use samples for more detailed tracing of sub-plant units, attaching the observations to them instead." | plot | |
observationUnitPosition | string | An ID code for this level tag. Identify this observation unit by each level of the hierarchy where it exists | plot.plot_number | |
observationUnitPosition | string | A name for this level | plot | |
observationUnitPosition | integer | `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers are at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). | 7 | |
observationUnitPosition | array[object] | Observation levels indicate the granularity level at which the measurements are taken. For more information on Observation Levels, please review the Observation Levels documentation. `levelName` defines the level `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are at the bottom of the hierarchy (ie plant > 6). `levelCode` is an ID code for this level tag. Identify this observation unit by each level of the hierarchy where it exists | Currently used by FB new Field Import UI as shared by the PhenoApps team during the hackathon: https://ebsproject.atlassian.net/browse/BDS-6502
| |
observationUnitPosition | string | An ID code for this level tag. Identify this observation unit by each level of the hierarchy where it exists | plot.plot_number | |
observationUnitPosition | string | A name for this level | plot | |
observationUnitPosition | integer | `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers are at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). | 7 | |
observationUnitPosition | string | The ID which uniquely identifies an observation unit | plot.id | |
observationUnitPosition | string | The X position coordinate for an observation unit. Different systems may use different coordinate systems. | Is this in plot level? Yes plot.field_x → plot.design_x → plot.pa_x | |
observationUnitPosition | string | The type of positional coordinate used. Must be one of the following values LONGITUDE - ISO 6709 standard, WGS84 geodetic datum. See 'Location Coordinate Encoding' for details LATITUDE - ISO 6709 standard, WGS84 geodetic datum. See 'Location Coordinate Encoding' for details PLANTED_ROW - The physical planted row number PLANTED_INDIVIDUAL - The physical counted number, could be independant or within a planted row GRID_ROW - The row index number of a square grid overlay GRID_COL - The column index number of a square grid overlay MEASURED_ROW - The distance in meters from a defined 0-th row MEASURED_COL - The distance in meters from a defined 0-th column | GRID_COL | |
observationUnitPosition | string | The Y position coordinate for an observation unit. Different systems may use different coordinate systems. | plot.field_y → plot.design_y → plot.pa_y | |
observationUnitPosition | string | The type of positional coordinate used. Must be one of the following values LONGITUDE - ISO 6709 standard, WGS84 geodetic datum. See 'Location Coordinate Encoding' for details LATITUDE - ISO 6709 standard, WGS84 geodetic datum. See 'Location Coordinate Encoding' for details PLANTED_ROW - The physical planted row number PLANTED_INDIVIDUAL - The physical counted number, could be independant or within a planted row GRID_ROW - The row index number of a square grid overlay GRID_COL - The column index number of a square grid overlay MEASURED_ROW - The distance in meters from a defined 0-th row MEASURED_COL - The distance in meters from a defined 0-th column | GRID_ROW | |
observations | array[object] | All observations attached to this observation unit. Default for this field is null or omitted. Do NOT include data in this field unless the 'includeObservations' flag is explicitly set to True. | All plot_data records linked via plot_id | |
observations | object | Additional arbitrary info | plot_data metadata like remarks? For now, set to empty {} | |
observations | string | The name or identifier of the entity which collected the observation | collector_id or creator_id for now | |
observations | array[object] | An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI. | No CB-DB counterpart | |
observations | string | The external reference ID. Could be a simple string or a URI. | No CB-DB counterpart, return null | |
observations | string | An identifier for the source system or database of this reference | No CB-DB counterpart, return null | |
observations | string | The ID which uniquely identifies a germplasm | ||
observations | string | Name of the germplasm. It can be the preferred name and does not have to be unique. | ||
observations | string | The ID which uniquely identifies an observation | plot_data.id | |
observations | string | The date and time when this observation was made | plot_data.collection_timestamp | |
observations | string | The ID which uniquely identifies an observation unit | plot_id | |
observations | string | A human-readable name for an observation unit | plot_code | |
observations | string | The ID which uniquely identifies an observation variable | ||
observations | string | A human-readable name for an observation variable | ||
observations | object |
| list of observation season info | |
observations | string | Name of the season. ex. 'Spring', 'Q2', 'Season A', etc. | tenant.season.season_name | |
observations | string | The ID which uniquely identifies a season. For backward compatibility it can be a string like '2012', '1957-2004' | ||
observations | integer | The 4-digit year of the season. | traverse up to experiment_year | |
observations | string | The ID which uniquely identifies a study within the given database server | ||
observations | string | The name or id of the user who uploaded the observation to the database system | plot_data.creator_id | |
observations |