-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Multiple teams have found a use case for being able to specify certain parameters that inform how the query execution should behave. An example already exists in TRAPI: bypass_cache. Additional examples in Retriever can be found in these two issues: BioPack-team/retriever#8, BioPack-team/retriever#7
I propose a top-level parameters or query_parameters dictionary should be added, subsuming the existing bypass_cache and adding additional enumerated parameters:
timeoutorjob_timeoutor something like this, which can be used to alert the API how much time it has to work with, or set to -1 to enable the API to spend an unbound amount of time on the query (up to the API to decide how long), or can be left unset to accept the API's default timeout, which should be populated in the response.data_tiersto allow ARAs to specify to Retriever which data tiers should be used-- this may be best kept as an informal parameter, rather than strictly codifying it, considering its highly specific use-case- Any others for which there is a clear, broad use-case
Additionally, this dictionary should accept additional values, so that arbitrary/informal parameters may be defined by individual APIs implementing TRAPI.
As an example, this is presently a valid query to Retriever:
{
"parameters": {
"timeout": -1,
"tiers": [
1
]
},
"submitter": "bte-dev-tester-manual",
"message": {
"query_graph": {
"nodes": {
"n0": {
"categories": [
"biolink:Gene"
],
"ids": [
"NCBIGene:3778"
]
},
"n1": {
"categories": [
"biolink:Disease"
]
}
},
"edges": {
"e01": {
"subject": "n0",
"object": "n1",
"predicates": [
"biolink:causes"
]
}
}
}
}
}Metadata
Metadata
Assignees
Labels
No labels