Skip to content

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.

@NikkiBytes NikkiBytes merged commit 436fffe into main Jul 15, 2025
10 checks passed
@NikkiBytes NikkiBytes deleted the add-metakg-endpoint branch July 15, 2025 17:11
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.

3 participants