Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • GGCE Web GGCE Web
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GGCEGGCE
  • GGCE WebGGCE Web
  • Issues
  • #385
Closed
Open
Issue created Mar 14, 2022 by Edwin Rojas@erojas

Integrate cooperator with FAO API

Integrate cooperator with FAO API https://api.wiews.fao.org/ in https://lima.ggce.genebanks.org/cooperator

For example when adding a new cooperator just write WIEWS code and retrieve FAO institution details. Or when searching by institution name and country retrieve all the the institution to finally select one.

API example

GET https://wiews.fao.org/api/v1/organizations/?case_insensitive=true&output_format=json&instcode=PHL001&country_iso=&name= returns

[{
	"instcode": "PHL001",
	"country_iso3": "PHL",
	"valid_instcode": "PHL001",
	"name": "International Rice Research Institute",
	"acronym": "IRRI",
	"parent_instcode": "FRA305",
	"parent_name": "CGIAR",
	"address": "DAPO BOX 7777",
	"country": "Philippines",
	"Postal_Code": "1301",
	"telephone": "(632)5805600",
	"email": "INFO@IRRI.ORG",
	"website": "https:\/\/www.irri.org\/international-rice-genebank",
	"status": "CGIAR",
	"lat": "121.2554",
	"lon": "14.1691",
	"Genebank_long_term_collections": true,
	"Genebank_medium_term_collections": true,
	"Genebank_short_term_collections": true,
	"Botanical_garden": false,
	"Breeder": true,
	"Network": false,
	"Community": false,
	"Educational": false,
	"Seed_producer": false,
	"Seed_supplier": false,
	"Farmer_community": false,
	"Research": true,
	"Extensionist": true,
	"Laboratory": false,
	"Publisher": true,
	"Administration_or_Policy": false
}]

Please note that searching for USA100 will not return USA1004. The API server is pretty slow to respond, we may need to set a higher timeout than default.

Implementation ideas

I imagine we can implement an autocompleter that calls a new FaoWiewsInstituteService and displays the resulting institute details. Clicking one would then populate Organization details in the CooperatorForm.

If any of the "target" fields are populated (not blank) the user must confirm that data can be replaced.

Edited Mar 14, 2022 by Matija Obreza
Assignee
Assign to
Time tracking