Skip to content
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

Add New Endpoint: /metakg/parse issue#271 #280

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

NikkiBytes
Copy link
Collaborator

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 NikkiBytes changed the title Add New Endpoint: /metakg/parse ISSUE#271 Add New Endpoint: /metakg/parse issue#271 Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant