Skip to content

throughput-ec/throughput_api

Repository files navigation

lifecycle NSF-1928366 DOI

Annotation Engine neo4j API

This application is designed to allow users to generate simple annotations of material using web-based resources based on the API protocols defined in the W3C standards.

Annotations are generated as conformant to W3C annotation standards, and implemented using Neo4J.

Contributions

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Application Setup

This application is developed using Express/Node.js to interact with a neo4j database.

Installing neo4j

Instructions for installing neo4j on a Linux system can be found on the neo4j documentation. This documentation is written assuming the installation of the Neo4j Community Version.

The installation of neo4j results in the installation of a number of files that need to be modified throughout the use of Neo4j. Those files are listed in Neo4j's configuration documentation.

Once neo4j is installed you can type:

service neo4j start

And navigate a browser to localhost:7474.

Installing nodejs and Express

If you are starting from this repository: Ensure that you have npm installed locally. then clone (or fork/clone) the repository to a local directory and run the command.

npm install

This will ensure all the appropriate packages are downloaded and installed for the project.

Running the Application

Once neo4j and the node/express setup is complete the application can be run using nodemon.

Endpoints

All endpoints come from http://throughputdb.com/api/ and then:

Research Databases:

  • http://throughputdb.com/api/ccdr with query parameters:

    • keyword: Search research data resources (databases and catalogs) by defined keyword
    • search: Fulltext search for a research data resource by name and description.
    • limit: [30] Maximum number of records to return.
    • offset: [30] Maximum number of records to return.

Examples:

Linked Code repositories

Code repositories linked to research databases:

  • http://throughputdb.com/api/ccdr/linked with query parameters:

  • id: Unique database identifiers (provided by ccdr)

  • limit: [30] Maximum number of records to return.

  • offset: [30] Maximum number of records to return.

Examples:

Keyword Searches

  • http://throughputdb.com/api/keywords

    • keyword: A comma separated string of keywords: climate,weather,botany

    • limit: [30] Maximum number of records to return.

    • offset: [30] Maximum number of records to return.

Summary Endpoints

  • http://throughputdb.com/api/summary/types Returns the count of each object type in the database.