smartAPI icon indicating copy to clipboard operation
smartAPI copied to clipboard

Add New Endpoint: /metakg/parse issue#271

Open NikkiBytes opened this issue 10 months ago • 2 comments

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 url query parameter pointing to the API metadata content to be parsed.
  • 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.

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.

NikkiBytes avatar Dec 05 '24 17:12 NikkiBytes