Skip to content

Commit

Permalink
Add servicemeta endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 8, 2024
1 parent 13e37c2 commit 6ebd87a
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion validation_service_api/validation_service/resources/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


@router.get("/")
async def about_this_api(token: HTTPAuthorizationCredentials = Depends(auth)):
async def api_status(token: HTTPAuthorizationCredentials = Depends(auth)):
service_status = getattr(settings, "SERVICE_STATUS", "ok")
info = {
"about": "This is the EBRAINS Model Validation API",
Expand All @@ -55,6 +55,39 @@ async def about_this_api(token: HTTPAuthorizationCredentials = Depends(auth)):
return info


@router.get("/about")
async def about_this_api():
service_metadata = {
"@context": "https://servicemeta.apps.tc.humanbrainproject.eu/context/servicemeta.jsonld",
"type": "WebApplication",
"name": "Model Validation Service API",
"alternateName": "model-validation-api",
"author": [
{
"id": "https://orcid.org/0000-0002-4793-7541",
"type": "Person",
"familyName": "Davison",
"givenName": "Andrew P.",
},
{"type": "Person", "familyName": "Appukuttan", "givenName": "Shailesh"},
],
"copyrightYear": "2022",
"dateModified": "2023-10-01",
"documentation": "https://model-validation-api.apps.ebrains.eu/docs",
"funding": [{
"awardNumber": "945539",
"awardName": "Human Brain Project Specific Grant Agreement 3 (HBP SGA3)",
"acknowledgement": "This project/research has received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3)."
}],
"inputFormat": ["json"],
"outputFormat": ["json"],
"releaseNotes": "Uses KG v3 and openMINDS schemas",
"url": "https://model-validation-api.apps.ebrains.eu/",
"version": "v3beta",
}
return service_metadata


@router.get("/models/", response_model=List[Union[ScientificModel, ScientificModelSummary]])
async def query_models(
alias: List[str] = Query(
Expand Down

0 comments on commit 6ebd87a

Please sign in to comment.