smartAPI
smartAPI copied to clipboard
Add New Endpoint: /metakg/parse issue#271
New endpoint (/api/metakg/parse) added that enables direct access to the internal MetaKG parser for processing individual API metadata. This feature supports both GET and POST methods:
-
GET:
- Endpoint:
GET /api/metakg/parse?url=<api_metadata_url> - Example:
../api/metakg/parse?url=https://raw.githubusercontent.com/NCATS-Tangerine/translator-api-registry/master/mygene.info/openapi_full.yml - Takes a
urlquery parameter pointing to the API metadata content to be parsed.
- Endpoint:
-
POST:
- Endpoint:
POST /api/metakg/parse - Example: (using curl)
curl -X POST ../api/metakg/parse -H "Content-Type: application/json" -d @metadata_content.json - Expects the raw API metadata content in the request body.
- Endpoint:
Available flags:
&api_details=1: gives full api info.&bte=1: gives bte info.
Output
The response will be a list of parsed MetaKG edges, formatted similarly to the existing /api/metakg endpoint.