Skip to content

Developer

Pierfrancesco Tommasino edited this page Jan 7, 2021 · 34 revisions

Programming with the EcoPortal API


Programming with the EcoPortal API

Documentation about how to use the EcoPortal REST API to access information is available here:

  • http://ecoportal.lifewatch.eu:8080/documentation

    • Using NCBO Technology In Your Project

      There are several ways in which you can use the NCBO technology on your own Web site or in your application. For example, I can think of:

      • I have a list of terms that were used to annotate a data set, how can I see if any of these terms exist in standard semantic resources? Use the Search Web service to search for your term in all semantic resources in BioPortal. If you have a small list of terms, searching each term individually via the EcoPortal Search UI may be sufficient. Otherwise, for a long list of terms, use the Search Web service directly.

      • I would like to find all terms mapped from my semantic resource to other semantic resources in EcoPortal.
        Use the Mapping web service to find terms in other EcoPortal semantic resources similar to terms in your semantic resource. These mappings include mapping generated manually (DbXrefs) and programatically (LOOM).

      • I am the curator for a database and need to triage papers to identify which papers from DATACITE are most related to my database and a good source of new information to add to my database. Use the Annotator Web service to identify ontology terms in textual data

      • I have DATACITE abstracts and want to link information in the abstracts to my database of interest. Use the Annotator Web service. If your database of interest is included in the NCBO Resource Index you can search the database(s) for records that contain these terms. See https://github.com/lifewatch-eric/documentation/wiki/EcoTools#resource-index for more details on the Resource Index web service.

      • I have a web form with text fields I would like to populate with semantic resource terms, e.g. to select relevant terms from EcoPortal semantic resource. Use the Autocomplete widget. Select the "Get Code" button for the code and instructions on how to add this Javascript to your web form.

      • I would like to add the graph display of my semantic resource on my web site. Use the Visualization widget for your semantic resource of interest from the widgets page. Select the "Get Code" button for the code and instructions on how to add this Javascript to your web form.

      • I would like to get all terms from a semantic resource and re-format the data to use in my own system. Use the Get All Terms Web service to get all terms and properties for your ontology of interest.

      • I need to navigate through a semantic resource and traverse the semantic resource hierarchy for my software application, how can I use the Web services to do this? Use the Get All terms Web service.

      • How can I limit the selection of semantic resources used with the NCBO Annotator to a certain Category or Domain? Use the List all semantic resources and Get Groups/Domains Web service to identify the group/domain of interest

      • Semantic resource Web Services

        All the content that the NCBO EcoPortal uses (and more!) is available via REST services. You can use the NCBO REST Services:

        • to access all EcoPortal semantic resources, their different versions, and metadata for those versions
        • to access information about any semantic resource concept in EcoPortal (its definition, synonyms, and other properties)
        • to search across all semantic resources in EcoPortal
        • to get hierarchy information for EcoPortal semantic resources (such as parents, children, or siblings of a class, roots or leaves of a class hierarchy)
      • Annotator Web Service

        A service that identifies mentions of ecological semantic resource concepts in text that users submit. You can use the annotator service to tag automatically any item of interest with terms from UMLS and EcoPortal semantic resources.

    • Getting an API key

      Use of the EcoPortal REST API requires an API key. To retrieve your API key, log into your account on the EcoPortal website. Your API key will be listed in plain text on your account page. E.g.

      api key image

      If you don't have an account, you'll need to create one.

    • NCBO Widgets

      NCBO widgets are the HTML or Javascript code that you can put on your Web site or Web form to use EcoPortal functionality there. Using NCBO Widgets is just one of the ways in which you can use the NCBO technology directly on your Web site or in your application.

      • Types of NCBO Widgets and use cases