Skip to content

Commit

Permalink
Add path to get statistics about content
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophB committed Apr 6, 2022
1 parent 56f33c1 commit 44862cc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>care.smith.top</groupId>
<artifactId>top-api</artifactId>
<version>0.3.3</version>
<version>0.3.4</version>

<name>TOP API</name>
<description>REST API of the TOP framework</description>
Expand Down
42 changes: 41 additions & 1 deletion schemas/top-api.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 44862cc

Please sign in to comment.