All URIs are relative to https://kba.ncats.io
Method | HTTP request | Description |
---|---|---|
get_beacons | GET /beacons | |
get_concept_categories | GET /categories | |
get_error_log | GET /errorlog | |
get_knowledge_map | GET /kmap | |
get_predicates | GET /predicates |
list[ServerKnowledgeBeacon] get_beacons()
Get a list of all of the knowledge beacons that the aggregator can query
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.MetadataApi()
try:
api_response = api_instance.get_beacons()
pprint(api_response)
except ApiException as e:
print("Exception when calling MetadataApi->get_beacons: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ServerConceptCategory] get_concept_categories(beacons=beacons)
Get a list of semantic categories and number of instances in each available knowledge beacon, including associated beacon-specific metadata
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.MetadataApi()
beacons = [56] # list[int] | set of aggregator indices of beacons to constrain categories returned (optional)
try:
api_response = api_instance.get_concept_categories(beacons=beacons)
pprint(api_response)
except ApiException as e:
print("Exception when calling MetadataApi->get_concept_categories: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
beacons | list[int] | set of aggregator indices of beacons to constrain categories 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]
list[ServerLogEntry] get_error_log(query_id)
Get a log of the system errors associated with a specified query
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.MetadataApi()
query_id = 'query_id_example' # str | query identifier returned from a POSTed query
try:
api_response = api_instance.get_error_log(query_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling MetadataApi->get_error_log: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
query_id | str | query identifier returned from a POSTed query |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ServerKnowledgeMap] get_knowledge_map(beacons=beacons)
Get a high level knowledge map of the all the beacons specified by triplets of subject concept category, relationship predicate and concept object category
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.MetadataApi()
beacons = [56] # list[int] | set of aggregator indices of beacons constraining knowledge maps returned (optional)
try:
api_response = api_instance.get_knowledge_map(beacons=beacons)
pprint(api_response)
except ApiException as e:
print("Exception when calling MetadataApi->get_knowledge_map: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
beacons | list[int] | set of aggregator indices of beacons constraining knowledge maps 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]
list[ServerPredicate] get_predicates(beacons=beacons)
Get a list of predicates used in statements issued by the knowledge source
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.MetadataApi()
beacons = [56] # list[int] | set of aggregator indices of beacons to constrain predicates returned (optional)
try:
api_response = api_instance.get_predicates(beacons=beacons)
pprint(api_response)
except ApiException as e:
print("Exception when calling MetadataApi->get_predicates: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
beacons | list[int] | set of aggregator indices of beacons to constrain predicates 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]