Skip to content

99 Reasoner Standard API Specification

Brenna Kizer edited this page Mar 13, 2020 · 5 revisions

Endpoints

  • /predicates

    • GET requests
    • Input 2 node classes
    • Output possible relationships between those nodes
  • /query

    • POST requests
    • Request body consists of JSON representation of a query graph
    • "Answer" consists of Message object which includes node and edge bindings linking the query graph to the KnowledgeGraph output, as well as the KnowledgeGraph object itself which contains relevant node and edge information in the form of JSON-LD
    • Response also contains various metadata

Input

  • QueryGraph specifying the target relationships to search
  • The query graph is made up of an array of nodes and an array of edges, each of which will contain both internal and external node and edge identifiers, with external identifiers conforming to the Biolink entity and model terminology.
  • The query may also contain options such as number of results to return, or page size, etc.
  • Example: to find diseases associated with BRCA1, a node n00 would be labeled with the id for BRCA1, and a placeholder node n01 would be added to represent the result. One edge e00 would be provided with "biolink:causes" as the relationship.

Output

  • Return the QueryGraph
  • Return edge bindings and node bindings
    • This consists of mappings between QueryGraph internal edge and node IDs and KnowledgeGraph edge/node IDs
  • Return actual edges and nodes
    • Details about the edges and nodes that answer the query
  • Return URL for the remote knowledge graph, as well as any credentials (username/password) needed for access

Notes

  • Nodes and edges need to have ids internal to the query and result graphs, as well as ids within the underlying storage graph
Clone this wiki locally