x-bte-kgs-operations Object

Describe list of single-hop knowledge graph retrieval operations that a single OpenAPI operation can perform.

Properties
Property name Type Description
x-bte-kgs-operations [x-bte-kgs-op eration Object |Reference Object] A list of single-hop knowledge graph retrieval operations that an OpenAPI operation can perform. The list can use the Reference Object to link to x-bte-kgs operation defined in components

x-bte-kgs-operations example

The following example defines two x-bte-kgs-operations (ChemicalSubstance – physically_interacts_with – Gene && Gene – physically_interacts_with – ChemicalSubstance) associated with the GET operation of the /interactions endpoint.

{
    "interactions.json": {
        "get": {
            "parameters": [
                {
                    "in": "query",
                    "name": "drugs"
                },
                {
                    "in": "query",
                    "name": "genes
                }
            ],
            "x-bte-kgs-operations": [
                {
                    "inputs": [
                        {
                            "id": "biolink:CHEMBL.COMPOUND",
                            "semantic": "biolink:ChemicalSubstance"
                        }
                    ],
                    "outputs": [
                        {
                            "id": "biolink:NCBIGene",
                            "semantic": "biolink:Gene"
                        }
                    ],
                    "parameters": {
                        "drugs": "{inputs[0]}"
                    },
                    "predicate": "biolink:physically_interacts_with",
                    "supportBatch": False,
                    "responseMapping": {
                        "NCBIGene": "matchedTerms.interactions.geneEntrezId",
                        "publication": "matchedTerms.interactions.pmids"
                    }
                },
                {
                    "inputs": [
                        {
                            "id": "biolink:NCBIGene",
                            "semantic": "biolink:Gene"
                        }
                    ],
                    "outputs": [
                        {
                            "id": "biolink:CHEMBL.COMPOUND",
                            "semantic": "biolink:ChemicalSubstance"
                        }
                    ],
                    "parameters": {
                        "genes": "{inputs[0]}"
                    },
                    "predicate": "biolink:physically_interacts_with",
                    "supportBatch": False,
                    "responseMapping": {
                        "CHEMBL.COMPOUND": "matchedTerms.interactions.drugChemblId",
                        "publication": "matchedTerms.interactions.pmids"
                    }
                }
            ]
        }
    }
}