Skip to content

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

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 30 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
@NikkiBytes
Copy link
Collaborator Author

@newgene the code has been cleaned up, please let me know if there are any other modifications you can see needed.

@NikkiBytes
Copy link
Collaborator Author

@newgene These have been resolved, all modifications have been made, ready to merge.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants