Skip to content

update smartapi spec to include /metakg endpoint #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions SmartAPI/smartapi_openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,88 @@ paths:
responses:
default:
description: Default response
/metakg:
get:
summary: retrieve associations within smartapi, if no parameters provided, will return all associations
parameters:
- in: query
name: subject
schema:
type: string
description: The subject type of the association, e.g. Gene
example: Gene
- in: query
name: object
schema:
type: string
description: The object type of the association, e.g. ChemicalSubstance
example: ChemicalSubstance
- in: query
name: predicate
schema:
type: string
description: The predicate of the association, e.g. Gene
example: physically_interacts_with
- in: query
name: api
schema:
type: string
description: The API providing the association, e.g. MyChem.info API
example: MyChem.info API
- in: query
name: provided_by
schema:
type: string
description: The data source providing the association, e.g. drugbank
example: drugbank
responses:
'200':
description: Association information including subject, object, predicate, api, provided_by and smartapi info.
content:
application/json:
schema:
description: Array of all associations
type: array
items:
type: object
properties:
subject:
type: string
description: The subject type of the association, e.g. Gene
example: Gene
object:
type: string
description: The object type of the association, e.g. ChemicalSubstance
example: ChemicalSubstance
predicate:
type: string
description: The predicate of the association, e.g. physically_interacts_with
example: physically_interacts_with
provided_by:
type: string
description: The data source providing the association, e.g. ChEMBL
example: ChEMBL
api:
type: object
description: The api providing the association, e.g. MyChem.info
properties:
name:
type: string
description: The api providing the association, e.g. MyChem.info
example: MyChem.info API
smartapi:
type: object
description: smartapi related data
properties:
metadata:
type: string
description: the url for smartapi specification
example: https://raw.githubusercontent.com/NCATS-Tangerine/translator-api-registry/master/mychem.info/openapi_full.yml
ui:
type: string
description: the web UI url for the API
example: https://smart-api.info/ui/8f08d1446e0bb9c2b323713ce83e2bd3
id:
type: string
description: unique smartapi id for the api
example: 8f08d1446e0bb9c2b323713ce83e2bd3