Genesys BrAPI reference manual

March 2017: Documentation commit d0ceff8
version 2024.4

Genesys implements basic BrAPI v1 specification

All API access is over HTTPS, and accessed from the https://api.genesys-pgr.org domain or through https://api.sandbox.genesys-pgr.org for testing purposes. All data is sent and received as JSON. In this manual, all URLs are pointing to the Genesys sandbox environment at https://api.sandbox.genesys-pgr.org.

1. Authentication

All BrAPI requests require OAuth2 authentication header in HTTP requests:

Authorization: Bearer <TOKEN>

1.1. Login

Genesys does not support the /login endpoint. You must obtain the OAuth access token as described in Genesys API manual.

1.2. Logout

Genesys does not support the /logout endpoint.

2. Crops

/brapi/v1/crops endpoint allows for retrieving the list of Genesys crops.

$ curl 'https://api.genesys-pgr.org/brapi/v1/commoncropnames?page=0&pageSize=2' -i -X GET \
    -H 'Content-Type: application/json'

2.1. Request parameters

Parameter Description

+pageSize+

Requested page size. Default is 50 records per page.

+page+

The page to retrieve (0-based)

2.2. Server response

Genesys returns the standard BrAPI Germplasm response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
        "metadata": {
                "status": [], (1)
                "datafiles": [], (2)
                "pagination": { (3)
                        "pageSize": 50,
                        "currentPage": 0,
                        "totalCount": 28,
                        "totalPages": 1
                }
        },
        "result": (4)
                ["banana", "barley", "beans", "breadfruit", "cassava", "chickpea", "coconut", "cowpea", "potato", "fababean", "fingermillet", "grasspea", "lentil", "maize", "pearlmillet", "pigeonpea", "rice", "sorghum", "sweetpotato", "taro", "wheat", "yam", "sunflower", "tomato", "eggplant", "lettuce", "apple", "forages"]
}
1 Request status
2 Data files generated by the request
3 Pagination data
4 Result
Path Type Description

+metadata+

+Object+

BrAPI v1 reponse metadata

+metadata.status+

+Array+

If no status is reported, an empty list is returned

+metadata.datafiles+

+Array+

Datafiles key contains a list of strings

+result.data+

+Array+

List of Genesys crop names

3. Germplasm

/brapi/v1/germplasm-search endpoint allows for retrieving accession data from Genesys.

$ curl 'https://api.genesys-pgr.org/brapi/v1/germplasm?page=0&pageSize=2&germplasmName=&germplasmDbId=&germplasmPUI=' -i -X GET \
    -H 'Content-Type: application/json'

3.1.1. Request parameters

Parameter Description

+pageSize+

Requested page size. Default is 50 records per page.

+page+

The page to retrieve (0-based)

+germplasmName+

Return accessions where ACCENUMB starts with provided value

+germplasmPUI+

Return accessions where PUID matches provided value

+germplasmDbId+

Return accessions where UUID matches provided value

3.1.2. Server response

Genesys returns the standard BrAPI Germplasm response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
        "metadata": {
                "status": [],
                "datafiles": [],
                "pagination": {
                        "pageSize": 2,
                        "currentPage": 2,
                        "totalCount": 3637680,
                        "totalPages": 1818840
                }
        },
        "result": <1> [{
                "defaultDisplayName": "DJUG 16",
                "germplasmPUI": "10.0000/ABCD*",
                "pedigree": null,
                "seedSource": null,
                "synonyms": ["DJUG 16"],
                "commonCropName": null,
                "genus": "Juglans",
                "species": "californica",
                "subtaxa": null,
                "subtAuthor": null,
                "germplasmDbId": "ac5d4de4-dc7d-487b-b11f-b4b4c8b7c045",
                "accessionNumber": "DJUG 16",
                "germplasmName": "DJUG 16",
                "instituteCode": "USA390",
                "instituteName": "Botany Department, University of California",
                "biologicalStatusOfAccessionCode": 999,
                "countryOfOriginCode": "USA",
                "typeOfGermplasmStorageCode": [],
                "speciesAuthority": null,
                "acquisitionDate": "19830923"
        }, {
                "defaultDisplayName": "NSL 18",
                "germplasmPUI": null,
                "pedigree": null,
                "seedSource": null,
                "synonyms": ["PIRA NARANJA", "NSL 18", "PIRA NARANJA"],
                "commonCropName": "maize",
                "genus": "Zea",
                "species": "mays",
                "subtaxa": "subsp. mays",
                "subtAuthor": null,
                "germplasmDbId": "86131120-782b-4108-afde-82de3ae008a4",
                "accessionNumber": "NSL 18",
                "germplasmName": "NSL 18",
                "instituteCode": "USA020",
                "instituteName": "North Central Regional Plant Introduction Station, USDA-ARS, NCRPIS",
                "biologicalStatusOfAccessionCode": 300,
                "countryOfOriginCode": null,
                "typeOfGermplasmStorageCode": [],
                "speciesAuthority": "L.",
                "acquisitionDate": "195905--"
        }]
}
1 Array containing matching Germplasm records
Path Type Description

+metadata+

+Object+

BrAPI v1 reponse metadata

+metadata.status+

+Array+

If no status is reported, an empty list is returned

+metadata.datafiles+

+Array+

Datafiles key contains a list of strings

+result.data+

+Array+

List of BrAPI Germplasm records

3.2. Germplasm by ID

/brapi/v1/germplasm/{germplasmID} endpoint allows for retrieving accession data from Genesys.

$ curl 'https://api.genesys-pgr.org/brapi/v1/germplasm/cd8c1217-4503-4859-813b-32251f0c8eba' -i -X GET \
    -H 'Content-Type: application/json'

3.2.1. Path parameters

Table 1. /brapi/v1/germplasm/{germplasmID}
Parameter Description

+germplasmID+

UUID of accession record in Genesys

3.2.2. Server response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
        "metadata": {
                "status": [],
                "datafiles": [],
                "pagination": {
                        "pageSize": 0,
                        "currentPage": 0,
                        "totalCount": 0,
                        "totalPages": 0
                }
        },
        "result": {
                "defaultDisplayName": "TCc-8104",
                "germplasmPUI": null,
                "pedigree": null,
                "seedSource": null,
                "synonyms": null,
                "commonCropName": "pigeonpea",
                "genus": "Cajanus",
                "species": "cajan",
                "subtaxa": null,
                "subtAuthor": null,
                "germplasmDbId": "cd8c1217-4503-4859-813b-32251f0c8eba",
                "accessionNumber": "TCc-8104",
                "germplasmName": "TCc-8104",
                "instituteCode": "NGA039",
                "instituteName": "International Institute of Tropical Agriculture",
                "biologicalStatusOfAccessionCode": null,
                "countryOfOriginCode": "SLE",
                "typeOfGermplasmStorageCode": [],
                "speciesAuthority": null,
                "acquisitionDate": null
        }
}
Path Type Description

+metadata+

+Object+

BrAPI v1 reponse metadata

+metadata.status+

+Array+

If no status is reported, an empty list is returned

+metadata.status[0].code+

+Null+

Error code

+metadata.status[0].message+

+Null+

Error message

+metadata.datafiles+

+Array+

Datafiles key contains a list of strings

+result+

+Null+

Single BrAPI Germplasm record