From 44862cc1126a4710ef2e0a6a2228226732396322 Mon Sep 17 00:00:00 2001 From: Christoph Beger Date: Wed, 6 Apr 2022 13:42:59 +0200 Subject: [PATCH] Add path to get statistics about content --- pom.xml | 2 +- schemas/top-api.yml | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 86c81ed..d7d1c18 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ care.smith.top top-api - 0.3.3 + 0.3.4 TOP API REST API of the TOP framework diff --git a/schemas/top-api.yml b/schemas/top-api.yml index d6d9451..91c9df4 100644 --- a/schemas/top-api.yml +++ b/schemas/top-api.yml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: TOP API - version: 0.3.3 + version: 0.3.4 description: API to manage phenotypes, repositories, ontologies and organisations servers: @@ -65,6 +65,23 @@ paths: default: $ref: "#/components/responses/UnexpectedError" + /statistic: + summary: Get statistics about available content. Returned data may be cached. + get: + operationId: getStatistics + security: + - BearerAuth: [] + - BasicAuth: [] + responses: + 200: + description: Object holding statistics + content: + application/json: + schema: + $ref: "#/components/schemas/Statistic" + default: + $ref: "#/components/responses/UnexpectedError" + /user_account: parameters: - $ref: "#/components/parameters/include" @@ -1760,6 +1777,29 @@ components: type: string readOnly: true + Statistic: + description: + Holds statistics about content. The scope may be a subset of content stored on the server. + Statistics may vary depending on user permissions. + type: object + properties: + organisations: + description: Number of organisations + type: integer + format: int32 + repositories: + description: Number of repositories + type: integer + format: int32 + categories: + description: Number of phenotype categories + type: integer + format: int32 + phenotypes: + description: Number of phenotypes + type: integer + format: int32 + securitySchemes: BearerAuth: type: http