All URIs are relative to https://kba.ncats.io
Method | HTTP request | Description |
---|---|---|
get_cliques | GET /cliques/data/{queryId} | |
get_cliques_query_status | GET /cliques/status/{queryId} | |
get_concept_details | GET /concepts/details/{cliqueId} | |
get_concepts | GET /concepts/data/{queryId} | |
get_concepts_query_status | GET /concepts/status/{queryId} | |
post_cliques_query | POST /cliques | |
post_concepts_query | POST /concepts |
ServerCliquesQueryResult get_cliques(query_id)
Retrieves a list of concept cliques based on 'data ready' from a previously /cliques posted query parameter submission
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
query_id = 'query_id_example' # str | the query identifier of a concepts query previously posted by the /cliques endpoint
try:
api_response = api_instance.get_cliques(query_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->get_cliques: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query_id | str | the query identifier of a concepts query previously posted by the /cliques endpoint |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerCliquesQueryStatus get_cliques_query_status(query_id)
Retrieves the status of a given query about the cliques in the system
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
query_id = 'query_id_example' # str | an active query identifier as returned by a POST of clique query parameters.
try:
api_response = api_instance.get_cliques_query_status(query_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->get_cliques_query_status: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query_id | str | an active query identifier as returned by a POST of clique query parameters. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerConceptWithDetails get_concept_details(clique_id, beacons=beacons)
Retrieves details for a specified clique of equivalent concepts in the system, as specified by a (url-encoded) CURIE identifier of a clique known to the aggregator
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
clique_id = 'clique_id_example' # str | a [CURIE-encoded](https://www.w3.org/TR/curie/) identifier, as returned by any other endpoint of the beacon aggregator API, of an exactly matching concept clique of interest.
beacons = [56] # list[int] | set of aggregator indices of beacons to be used as knowledge sources for the query (optional)
try:
api_response = api_instance.get_concept_details(clique_id, beacons=beacons)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->get_concept_details: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
clique_id | str | a CURIE-encoded identifier, as returned by any other endpoint of the beacon aggregator API, of an exactly matching concept clique of interest. | |
beacons | list[int] | set of aggregator indices of beacons to be used as knowledge sources for the query | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerConceptsQueryResult get_concepts(query_id, beacons=beacons, page_number=page_number, page_size=page_size)
Retrieves a (paged) list of basic equivalent concept clique data from beacons 'data ready' from a previously /concepts posted query parameter submission
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
query_id = 'query_id_example' # str | the query identifier of a concepts query previously posted by the /concepts endpoint
beacons = [56] # list[int] | set of aggregator indices of beacons whose data are to be retrieved (optional)
page_number = 56 # int | (1-based) number of the page to be returned in a paged set of query results. Defaults to '1'. (optional)
page_size = 56 # int | number of concepts per page to be returned in a paged set of query results. Defaults to '10'. (optional)
try:
api_response = api_instance.get_concepts(query_id, beacons=beacons, page_number=page_number, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->get_concepts: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query_id | str | the query identifier of a concepts query previously posted by the /concepts endpoint | |
beacons | list[int] | set of aggregator indices of beacons whose data are to be retrieved | [optional] |
page_number | int | (1-based) number of the page to be returned in a paged set of query results. Defaults to '1'. | [optional] |
page_size | int | number of concepts per page to be returned in a paged set of query results. Defaults to '10'. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerConceptsQueryStatus get_concepts_query_status(query_id, beacons=beacons)
Retrieves the status of a given keyword search query about the concepts in the system
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
query_id = 'query_id_example' # str | an active query identifier as returned by a POST of concept query parameters.
beacons = [56] # list[int] | subset of aggregator indices of beacons whose status is being polled (if omitted, then the status of all beacons from the query are returned) (optional)
try:
api_response = api_instance.get_concepts_query_status(query_id, beacons=beacons)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->get_concepts_query_status: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query_id | str | an active query identifier as returned by a POST of concept query parameters. | |
beacons | list[int] | subset of aggregator indices of beacons whose status is being polled (if omitted, then the status of all beacons from the query are returned) | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerCliquesQuery post_cliques_query(ids)
Retrieves the beacon aggregator assigned cliques of equivalent concepts that includes the specified (url-encoded) CURIE identifiers. Note that the clique to which a given concept CURIE belongs may change over time as the aggregator progressively discovers the members of the clique. Any unmatched identifiers will be ignored (e.g. the id couldn't be found in any of the beacons)
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
ids = ['ids_example'] # list[str] | an array of [CURIE-encoded](https://www.w3.org/TR/curie/) identifiers of interest to be resolved to a list of concept cliques
try:
api_response = api_instance.post_cliques_query(ids)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->post_cliques_query: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ids | list[str] | an array of CURIE-encoded identifiers of interest to be resolved to a list of concept cliques |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerConceptsQuery post_concepts_query(keywords, categories=categories, beacons=beacons)
Posts the query parameters to retrieves a list of concepts from the system
from __future__ import print_function
import time
import kba
from kba.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = kba.ConceptsApi()
keywords = ['keywords_example'] # list[str] | an array of keywords or substrings against which to match concept names and synonyms
categories = ['categories_example'] # list[str] | a subset array of concept categories (specified as codes 'gene', 'pathway', etc.) to which to constrain concepts matched by the main keyword search (see [Biolink Model](https://biolink.github.io/biolink-model) for the full list of codes) (optional)
beacons = [56] # list[int] | subset of aggregator indices of beacons to be used as knowledge sources for the query (if omitted, then the all beacons are queried) (optional)
try:
api_response = api_instance.post_concepts_query(keywords, categories=categories, beacons=beacons)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConceptsApi->post_concepts_query: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
keywords | list[str] | an array of keywords or substrings against which to match concept names and synonyms | |
categories | list[str] | a subset array of concept categories (specified as codes 'gene', 'pathway', etc.) to which to constrain concepts matched by the main keyword search (see Biolink Model for the full list of codes) | [optional] |
beacons | list[int] | subset of aggregator indices of beacons to be used as knowledge sources for the query (if omitted, then the all beacons are queried) | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]