diff --git a/README.md b/README.md index d5b5f75..6b4a00b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ If you are working with a local Docker distribution based on from [ubkg-neo4j](h - USERNAME=neo4j - PASSWORD= the value of _neo4j_password_ from the common **container.cfg** file. +## Using API keys +Some deployments based on the UBKG API may require that calls to endpoints include an API key in the header. +Because this involves integration with authorization architecture (e.g., API gateways and authorization specific to a +network resource), the configuration of API keys is beyond the scope of the UBKG API. + + ### Starting your neo4j instance If you are using a local instance of the UBKG, the instance should be running. In particular, if you installed a local Docker instance of UBKG, be sure that Docker Desktop is running. diff --git a/VERSION b/VERSION index 7d2ed7c..cd57a8b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.4 +2.1.5 diff --git a/dd-api-spec.yaml b/dd-api-spec.yaml index 2cedec6..606adc9 100644 --- a/dd-api-spec.yaml +++ b/dd-api-spec.yaml @@ -13,7 +13,7 @@ servers: - url: https://datadistillery.api.sennetconsortium.org/ description: Production server security: - - api_key: [] + - umls_key: [] paths: /codes/{code_id}/codes: get: @@ -166,12 +166,12 @@ paths: description: No Definitions associated with the Concept _query_concept_id_. '5XX': description: Unknown error - /concepts/{identifier}/nodeobjects: + /concepts/{concept_id}/nodeobjects: get: operationId: concepts_identifier_nodes_get summary: Returns a set of "Concept Node objects" that "match" an identifier. [A Concept node in the UBKG is the origin of a subgraph that links the Concept node to a set of Code, Term, Definition, and Semantic Type nodes. A "Concept Node object" represents this subgraph as a set of Concept properties--i.e., all of the Concept's linked Codes, terms, definitions, and semantic types. A "match" is an exact match between an identifier and a text-based property in a Concept Node object. Because an identifier may match properties in more than one Concept Node object, the endpoint can return multiple Concept Node objects.] parameters: - - name: identifier + - name: concept_id in: path required: true description: The string to match against properties related to Concepts. Related properties include the preferred term for the Concept; the CUI for the Concept; the CodeID for a Code linked to the Concept; and terms for a Code linked to a Concept. @@ -887,9 +887,10 @@ paths: description: Unknown error components: securitySchemes: - api_key: + umls_key: type: apiKey - name: X-API-KEY + description: API key for a UMLS licensee account, prefixed with "UMLS-Key "--e.g., "UMLS-Key " + name: Authorization in: header schemas: CodesCodesObj: # Schema name diff --git a/pyproject.toml b/pyproject.toml index d272b81..3fda249 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] name = "ubkg_api" -version = "2.1.4" +version = "2.1.5" authors = [ { name="HuBMAP Consortium", email="api-developers@hubmapconsortium.org" }, ] diff --git a/tests/python_client_test.py b/tests/python_client_test.py index 531bb89..0d4cd37 100644 --- a/tests/python_client_test.py +++ b/tests/python_client_test.py @@ -1,6 +1,6 @@ # coding: utf-8 -# Simple Python script that demonstrates how to use the API key stored in a file named api.key +# Simple Python script that demonstrates how to use the API key stored in a file named umls.key # in the application directory to execute an endpoint. import requests @@ -8,13 +8,13 @@ # Read the API key. fpath = os.path.dirname(os.getcwd()) -fpath = os.path.join(fpath, 'tests', 'api.key') +fpath = os.path.join(fpath, 'tests', 'umls.key') f = open(fpath, 'r') apikey = f.read() f.close() # Add the API key to authorization for the URL. -headers = {'X-API-KEY': f'{apikey}'} +headers = {'Authorization': f'UMLS-Key {apikey}'} # Execute the endpoint. diff --git a/tests/test_dd_api.sh b/tests/test_dd_api.sh index 22bb6de..58beb09 100755 --- a/tests/test_dd_api.sh +++ b/tests/test_dd_api.sh @@ -21,7 +21,7 @@ Help() } # Read the API key from file. -apikey=$(invalid parameter; sho curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009/codes?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $apikey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -80,7 +80,7 @@ echo "2. codes/SNOMEDCT_US%3A254837009/codes?sab=999 =>no match; should return c curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009/codes?sab=999" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -88,7 +88,7 @@ echo "3. codes/SNOMEDCT_US%3A254837009X/codes => no match; should return custom curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009X/codes" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -96,7 +96,7 @@ echo "4. codes/SNOMEDCT_US%3A254837009/codes?sab=CHV,DOID => with sab as comma-d curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009/codes?sab=CHV,DOID" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -104,7 +104,7 @@ echo "5. /codes/SNOMEDCT_US%3A254837009/codes?sab=CHV&sab=DOID => with individua curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009/codes?sab=CHV&sab=DOID" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -118,7 +118,7 @@ echo "1. codes/SNOMEDCT_US%3A254837009X/concepts => no match; should return cust curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009X/concepts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -126,7 +126,7 @@ echo "2. /codes/SNOMEDCT_US%3A254837009/concepts => valid code; should return 20 curl --request GET \ --url "${UBKG_URL}/codes/SNOMEDCT_US%3A254837009/concepts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -140,7 +140,7 @@ echo "1. concepts/C0678222/codes?test=x => invalid parameter; should return cust curl --request GET \ --url "${UBKG_URL}/concepts/C0678222/codes?test=x" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -148,7 +148,7 @@ echo "2. concepts/C0678222x/codes => no match; should return custom 404" | tee - curl --request GET \ --url "${UBKG_URL}/concepts/C0678222x/codes" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -156,7 +156,7 @@ echo "3. concepts/C0678222/codes => valid concept; should return 200" | tee -a t curl --request GET \ --url "${UBKG_URL}/concepts/C0678222/codes" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -170,7 +170,7 @@ echo "1. concepts/C0678222Z/concepts => no match; should return custom 404" | te curl --request GET \ --url "${UBKG_URL}/concepts/C0678222Z/concepts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -178,7 +178,7 @@ echo "2. concepts/C0678222/concepts => valid concept; should return 200" | tee - curl --request GET \ --url "${UBKG_URL}/concepts/C0678222/concepts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -192,7 +192,7 @@ echo "1. concepts/C0678222x/definitions => no match; should return custom 404" | curl --request GET \ --url "${UBKG_URL}/concepts/C0678222x/definitions" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -200,7 +200,7 @@ echo "2. concepts/C0678222/definitions => valid concept; should return 200" | te curl --request GET \ --url "${UBKG_URL}/concepts/C0678222/definitions" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -215,7 +215,7 @@ echo "1. concepts/paths/subgraph? => missing parameters: should return custom 40 curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -223,7 +223,7 @@ echo "2. concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=-1&limit=1 => nega curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=-1&limit=1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -231,7 +231,7 @@ echo "3. concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=1&limit=-1 => nega curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -239,7 +239,7 @@ echo "4. concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=z&limit=1 => non-n curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=Z&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -247,7 +247,7 @@ echo "5. concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=1&limit=Z => non-n curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=1&limit=Z" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -255,7 +255,7 @@ echo "6. concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isaZ=> no match: should ret curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isaz" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -263,7 +263,7 @@ echo "7. concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=0&limit=10 => vali curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -271,7 +271,7 @@ echo "8. concepts/paths/subgraph?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of& curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&sab=UBERON&rel=isa&skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -279,7 +279,7 @@ echo "9. concepts/paths/subgraph?sab=SNOMEDCT_US%2CUBERON&rel=isa%2Cpart_of&skip curl --request GET \ --url "${UBKG_URL}/concepts/paths/subgraph?sab=SNOMEDCT_US&rel=isa&skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -293,7 +293,7 @@ echo "1. concepts/Cellsz/nodeobjects => no match; should return custom 404" | te curl --request GET \ --url "${UBKG_URL}/concepts/CellsZ/nodeobjects" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -301,7 +301,7 @@ echo "2. concepts/Cells/nodeobjects => valid identifier; should return 200" | te curl --request GET \ --url "${UBKG_URL}/concepts/Cells/nodeobjects" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -316,7 +316,7 @@ echo "1. concepts/C2720507/paths/expand => missing required parameters; should r curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -324,7 +324,7 @@ echo "2. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepthZ=2&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepthZ=2&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -332,7 +332,7 @@ echo "3. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -340,7 +340,7 @@ echo "4. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxdepth=Z&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -348,7 +348,7 @@ echo "5. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=-1&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=-1&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -356,7 +356,7 @@ echo "6. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxdepth=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -364,7 +364,7 @@ echo "7. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=3&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=3&maxdepth=2&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -372,7 +372,7 @@ echo "8. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxdepth=10&skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -380,7 +380,7 @@ echo "9. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxdepth=10&skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -388,7 +388,7 @@ echo "10. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxdepth=10&skip=Z&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -396,7 +396,7 @@ echo "11. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxdepth=10&skip=1&limit=Z" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -404,7 +404,7 @@ echo "12. concepts/C2720507Z/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&max curl --request GET \ --url "${UBKG_URL}/concepts/C2720507Z/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -412,7 +412,7 @@ echo "13. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=9&maxdepth=10&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -420,7 +420,7 @@ echo "14. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&rel=isa&mindepth=2&maxdepth=3&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -428,7 +428,7 @@ echo "15. concepts/C2720507/paths/expand?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel= curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of&mindepth=2&maxdepth=3&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -436,7 +436,7 @@ echo "16. concepts/C2720507/paths/expand?sab=SNOMEDCT_US%2CUBERON&rel=isa%2Cpart curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/expand?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of&mindepth=2&maxdepth=3&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -451,7 +451,7 @@ echo "1. concepts/C2720507/paths/trees => missing parameters: should return cust curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -459,7 +459,7 @@ echo "2. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&relZ=isa&mindepth=-1&maxd curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&relZ=isa&mindepth=-1&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -467,7 +467,7 @@ echo "3. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=-1&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=-1&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -475,7 +475,7 @@ echo "4. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdep curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdepth=-1&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -483,7 +483,7 @@ echo "5. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxdep curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxdepth=-1&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -491,7 +491,7 @@ echo "6. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdep curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxdepth=-1&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -499,7 +499,7 @@ echo "7. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=3&maxdep curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=3&maxdepth=2&skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -507,7 +507,7 @@ echo "8. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdep curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxdepth=3&skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -515,7 +515,7 @@ echo "9. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdep curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=Z&maxdepth=3&skip=1&limit=-10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -523,7 +523,7 @@ echo "10. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdepth=3&skip=Z&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -531,7 +531,7 @@ echo "11. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdepth=3&skip=1&limit=Z" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -539,7 +539,7 @@ echo "12. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxde curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&rel=isa&mindepth=1&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ ---header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -547,7 +547,7 @@ echo "13. concepts/C2720507/paths/trees?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=p curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of&mindepth=1&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ ---header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -555,7 +555,7 @@ echo "15. concepts/C2720507/paths/trees?sab=SNOMEDCT_US%2CUBERON&rel=isa%2Cpart_ curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ ---header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -563,7 +563,7 @@ echo "15. concepts/C2720507/paths/trees?sab=SNOMEDCT_US%2CUBERON&rel=isa%2Cpart_ curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/trees?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of&mindepth=1&maxdepth=3&skip=1&limit=10" \ --header "Accept: application/json" \ ---header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -578,7 +578,7 @@ echo "1. concepts/C2720507/paths/shortestpath/C1272753 => missing parameters; sh curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/shortestpath/C1272753" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -586,7 +586,7 @@ echo "2. concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US&relZ=isa curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US&rel2=isa" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -594,7 +594,7 @@ echo "3. concepts/C2720507Z/paths/shortestpath/C1272753?sab=SNOMEDCT_US&rel=isa curl --request GET \ --url "${UBKG_URL}/concepts/C2720507Z/paths/shortestpath/C1272753?sab=SNOMEDCT_US&rel=isa" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -602,7 +602,7 @@ echo "4. concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US&rel=isa = curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US&rel=isa" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -610,7 +610,7 @@ echo "5. concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US&sab=UBERO curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US&sab=UBERON&rel=isa&rel=part_of" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -618,7 +618,7 @@ echo "6. concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US%2CUBERON& curl --request GET \ --url "${UBKG_URL}/concepts/C2720507/paths/shortestpath/C1272753?sab=SNOMEDCT_US%2CUBERON&rel=isa%2Cpart_of" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -632,7 +632,7 @@ echo "1. node-types GET => valid; should return 200" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/node-types" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -647,7 +647,7 @@ echo "1. node-types/counts GET => blocked; should return custom 400" | tee -a te curl --request GET \ --url "${UBKG_URL}/node-types/counts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -659,7 +659,7 @@ echo "1. node-types/Codez/counts GET => no match; should return custom 404" | te curl --request GET \ --url "${UBKG_URL}/node-types/Codez/counts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -667,7 +667,7 @@ echo "2. node-types/Code/counts GET => valid; should return 200" | tee -a test.o curl --request GET \ --url "${UBKG_URL}/node-types/Code/counts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -682,7 +682,7 @@ echo "1. node-types/counts-by-sab GET => blocked because of likely timeout; shou curl --request GET \ --url "${UBKG_URL}/node-types/counts-by-sab?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -697,7 +697,7 @@ echo "1. node-types/Codez/counts-by-sab?sab=SNOMEDCT_US GET => no match; should curl --request GET \ --url "${UBKG_URL}/node-types/Codez/counts-by-sab?sab=SNOMED_US" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -705,7 +705,7 @@ echo "2. node-types/Code/counts-by-sab?sab=SNOMEDCT_US GET => valid, single sab; curl --request GET \ --url "${UBKG_URL}/node-types/Code/counts-by-sab?sab=SNOMEDCT_US" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -713,7 +713,7 @@ echo "3. node-types/Code/counts-by-sab?sab=SNOMEDCT_US&sab=NCI GET => valid, mul curl --request GET \ --url "${UBKG_URL}/node-types/Code/counts-by-sab?sab=SNOMEDCT_US&sab=NCI" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -721,7 +721,7 @@ echo "4. node-types/Code/counts-by-sab?sab=SNOMEDCT_US%2CNCI GET => valid, list curl --request GET \ --url "${UBKG_URL}/node-types/Code/counts-by-sab?sab=SNOMEDCT_US%2CNCI" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -732,7 +732,7 @@ echo "1. property-types GET => valid; should return 200" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/property-types" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -743,7 +743,7 @@ echo "1. relationship-types GET => valid; should return 200" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/relationship-types" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -757,7 +757,7 @@ echo "1. sabs => valid: should return 200" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/sabs" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -771,7 +771,7 @@ echo "1. sabs/codes/counts?test=test => invalid parameter: should return custom curl --request GET \ --url "${UBKG_URL}/sabs/codes/counts?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -779,7 +779,7 @@ echo "2. sabs/codes/counts?skip=-1&limit=10 => negative skip value: should retur curl --request GET \ --url "${UBKG_URL}/sabs/codes/counts?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -787,7 +787,7 @@ echo "3. sabs/codes/counts?skip=1&limit=-1 => negative limit value: should retur curl --request GET \ --url "${UBKG_URL}/sabs/codes/counts?skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -795,7 +795,7 @@ echo "4. sabs/codes/counts?skip=a&limit=10 => nonnumeric skip value: should retu curl --request GET \ --url "${UBKG_URL}/sabs/codes/counts?skip=a&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -803,7 +803,7 @@ echo "5. sabs/codes/counts?skip=1&limit=a => nonnumeric limit value: should retu curl --request GET \ --url "${UBKG_URL}/sabs/codes/counts?skip=1&limit=a" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -811,7 +811,7 @@ echo "4. sabs/codes/counts?skip=5&limit=10 => valid: should return 200" | tee -a curl --request GET \ --url "${UBKG_URL}/sabs/codes/counts?skip=5&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -825,7 +825,7 @@ echo "1. sabs/SNOMEDCT_US/codes/counts?test=test => invalid parameter: should re curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/counts?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -833,7 +833,7 @@ echo "2. sabs/SNOMEDCT_US/codes/counts?skip=-1&limit=10 => negative skip value: curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/counts?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -841,7 +841,7 @@ echo "3. sabs/SNOMEDCT_US/codes/counts?skip=1&limit=-1 => negative limit value: curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/counts?skip=0&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -849,7 +849,7 @@ echo "4. sabs/SNOMEDCT_US/codes/counts?skip=a => nonnumeric skip value: should r curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/counts?skip=a&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -857,7 +857,7 @@ echo "5. sabs/SNOMEDCT_US/codes/counts?skip=a => nonnumeric limit value: should curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/counts?skip=0&limit=a" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -865,7 +865,7 @@ echo "4. sabs/SNOMEDCT_USA/codes/counts?skip=0&limit=10 => no match: should retu curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_USA/codes/counts?skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -873,7 +873,7 @@ echo "5. sabs/SNOMEDCT_US/codes/counts?skip=0&limit=10 => valid: should return 2 curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/counts?skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -887,7 +887,7 @@ echo "1. sabs/codes/details => blocked; return custom 400" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/sabs/codes/details" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -901,7 +901,7 @@ echo "1. sabs/SNOMEDCT_US/codes/details?test=test => invalid parameter: should r curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/details?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -909,7 +909,7 @@ echo "2. sabs/SNOMEDCT_US/codes/details?skip=-1&limit=10 => negative skip value: curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/details?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -917,7 +917,7 @@ echo "3. sabs/SNOMEDCT_US/codes/details?skip=1&limit=-1 => negative limit value: curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/details?skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -925,7 +925,7 @@ echo "4. sabs/SNOMEDCT_US/codes/details?skip=a&limit=10 => nonnumeric skip value curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/details?skip=a&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -933,7 +933,7 @@ echo "5. sabs/SNOMEDCT_US/codes/details?skip=1&limit=a => nonnumeric limit value curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/details?skip=1&limit=a" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -941,7 +941,7 @@ echo "5. sabs/SNOMEDCT_USA/codes/details => no match: should return custom 404" curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_USA/codes/details" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -949,14 +949,14 @@ echo "3. sabs/SNOMEDCT_US/codes/details?skip=0&limit=10 => valid: should return curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/codes/details?skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out #-------------------------------------------- echo "TESTS FOR: sabs/term-types GET" | tee -a test.out echo "SIGNATURE: /sabs/term-types" \ ---header "X-API-KEY:$apikey" | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -964,14 +964,14 @@ echo "1. sabs/term-types => blocked; should return custom 400" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/sabs/term-types" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out #-------------------------------------------- echo "TESTS FOR: sabs//term-types GET" | tee -a test.out echo "SIGNATURE: /sabs/term-types" \ ---header "X-API-KEY:$apikey" | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -979,7 +979,7 @@ echo "1. sabs/SNOMEDCT_USA/term-types => no match; should return custom 404" | t curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_USA/term-types" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -987,7 +987,7 @@ echo "2. sabs/SNOMEDCT_US/term-types => valid; should return 200" | tee -a test. curl --request GET \ --url "${UBKG_URL}/sabs/SNOMEDCT_US/term-types" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1001,7 +1001,7 @@ echo "1. semantics/semantic-types?test=test => invalid parameter; should return curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1009,7 +1009,7 @@ echo "2. semantics/semantic-types?skip=-1&limit=10 => negative skip; should retu curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1017,7 +1017,7 @@ echo "3. semantics/semantic-types?skip=1&limit=-1 => negative limit; should retu curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types?skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1025,7 +1025,7 @@ echo "4. semantics/semantic-types?skip=a&limit=10 => non-numeric skip; should re curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types?skip=a&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1033,7 +1033,7 @@ echo "5. semantics/semantic-types?skip=1&limit=a => non-numeric limit; should re curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types?skip=1&limit=a" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1041,7 +1041,7 @@ echo "6. semantics/semantic-types => should return 200" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types?skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1055,7 +1055,7 @@ echo "1. /semantics/semantic-types/Anatomical%20Structure?skip=1&limit=10&test=t curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure?skip=1&limit=10&test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1063,7 +1063,7 @@ echo "2. /semantics/semantic-types/Anatomical%20Structure?skip=-1&limit=10 => ne curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1071,7 +1071,7 @@ echo "3. semantics/semantic-types/Anatomical%20Structure?skip=1&limit=-1 => nega curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure?skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1079,7 +1079,7 @@ echo "4. semantics/semantic-types/Anatomical%20Structure?skip=a&limit=10 => non- curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1087,7 +1087,7 @@ echo "5. semantics/semantic-types/Anatomical%20Structure?skip=1&limit=a => non-n curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure?skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1095,7 +1095,7 @@ echo "6. semantics/semantic-types/Anatomical%20Structurez?skip=1&limit=10 => no curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structurez?skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1103,7 +1103,7 @@ echo "7. semantics/semantic-types/Anatomical%20Structure?&skip=0&limit=10 => val curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure?&skip=0&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1117,7 +1117,7 @@ echo "1. semantics/semantic-types/Anatomical%20Structure/subtypes?test=test => i curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure/subtypes?test=test" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1125,7 +1125,7 @@ echo "2. semantics/semantic-types/Anatomical%20Structure/subtypes?skip=-1&limit= curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure/subtypes?skip=-1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1133,7 +1133,7 @@ echo "3. semantics/semantic-types/Anatomical%20Structure/subtypes?skip=1&limit=- curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure/subtypes?skip=1&limit=-1" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1141,7 +1141,7 @@ echo "4. semantics/semantic-types/Anatomical%20Structure/subtypes?skip=a&limit=1 curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure/subtypes?skip=a&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1149,7 +1149,7 @@ echo "5. semantics/semantic-types/Anatomical%20Structure/subtypes?skip=1&limit=a curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure/subtypes?skip=1&limit=a" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1157,7 +1157,7 @@ echo "6. semantics/semantic-types/Anatomical%20Structurez/subtypes?skip=1&limit= curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structurez/subtypes?skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1166,13 +1166,13 @@ echo "7. semantics/semantic-types/Anatomical%20Structure/subtypes?skip=1&limit=1 curl --request GET \ --url "${UBKG_URL}/semantics/semantic-types/Anatomical%20Structure/subtypes?skip=1&limit=10" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out #-------------------------------------------- echo "TESTS FOR: terms//codes GET" | tee -a test.out echo "SIGNATURE: /terms//codes" \ ---header "X-API-KEY:$apikey" | tee -a test.out +--header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1180,7 +1180,7 @@ echo "1. terms/Breast%20cancerz/codes => no match; should return custom 404" | t curl --request GET \ --url "${UBKG_URL}/terms/Breast%20cancerz/codes" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1188,7 +1188,7 @@ echo "2. terms/codes/Breast%20cancer GET with match: should return 200" | tee -a curl --request GET \ --url "${UBKG_URL}/terms/Breast%20cancer/codes" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1202,7 +1202,7 @@ echo | tee -a test.out curl --request GET \ --url "${UBKG_URL}/terms/Breast%20cancerz/concepts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1210,7 +1210,7 @@ echo "2. terms/Breast%20cancer/concepts GET with match; should return 200" | tee curl --request GET \ --url "${UBKG_URL}/terms/Breast%20cancer/concepts" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out #------------------------------------------ @@ -1220,7 +1220,7 @@ echo "1. sources GET => should return 200" | tee -a test.out curl --request GET \ --url "${UBKG_URL}/sources" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1228,7 +1228,7 @@ echo "2. /sources?test=x GET => invalid parameter; should return custom 400" | t curl --request GET \ --url "${UBKG_URL}/sources?test=x" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1236,7 +1236,7 @@ echo "3. /sources?sab=X GET => invalid SAB; should return custom 404" | tee -a t curl --request GET \ --url "${UBKG_URL}/sources?sab=x" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1244,7 +1244,7 @@ echo "4. /sources?context=x GET => invalid context; should return custom 404" | curl --request GET \ --url "${UBKG_URL}/sources?context=x" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1252,7 +1252,7 @@ echo "5. /sources?sab=HPOMP GET => valid SAB; should return 200" | tee -a test.o curl --request GET \ --url "${UBKG_URL}/sources?sab=HPOMP" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out @@ -1260,6 +1260,6 @@ echo "6. /sources?context=base_context GET => valid context; should return 200" curl --request GET \ --url "${UBKG_URL}/sources?context=base_context" \ --header "Accept: application/json" \ - --header "X-API-KEY:$apikey" | cut -c1-60 | tee -a test.out + --header "Authorization: UMLS-Key $umlskey" | cut -c1-60 | tee -a test.out echo | tee -a test.out echo | tee -a test.out \ No newline at end of file diff --git a/ubkg-api-spec.yaml b/ubkg-api-spec.yaml index c20fbb5..3b55bff 100644 --- a/ubkg-api-spec.yaml +++ b/ubkg-api-spec.yaml @@ -161,12 +161,12 @@ paths: description: No Definitions associated with the Concept _query_concept_id_. '5XX': description: Unknown error - /concepts/{identifier}/nodeobjects: + /concepts/{concept_id}/nodeobjects: get: operationId: concepts_identifier_nodes_get summary: Returns a set of "Concept Node objects" that "match" an identifier. [A Concept node in the UBKG is the origin of a subgraph that links the Concept node to a set of Code, Term, Definition, and Semantic Type nodes. A "Concept Node object" represents this subgraph as a set of Concept properties--i.e., all of the Concept's linked Codes, terms, definitions, and semantic types. A "match" is an exact match between an identifier and a text-based property in a Concept Node object. Because an identifier may match properties in more than one Concept Node object, the endpoint can return multiple Concept Node objects.] parameters: - - name: identifier + - name: concept_id in: path required: true description: The string to match against properties related to Concepts. Related properties include the preferred term for the Concept; the CUI for the Concept; the CodeID for a Code linked to the Concept; and terms for a Code linked to a Concept. @@ -881,11 +881,6 @@ paths: '5XX': description: Unknown error components: - # securitySchemes: - # api_key: - # type: apiKey - # name: X-API-KEY - # in: header schemas: CodesCodesObj: # Schema name description: Code nodes that link to the same Concept node to which a specified Code links.