diff --git a/tdei-api-gateway.json b/tdei-api-gateway.json index c5a8321..3df7075 100644 --- a/tdei-api-gateway.json +++ b/tdei-api-gateway.json @@ -3201,6 +3201,48 @@ ] } }, + "/api/v1/service-metrics/{tdei_project_group_id}": { + "get": { + "tags": [ + "Metrics" + ], + "summary": "Gets the Service metrics", + "description": "This endpoint provides detailed metrics about datasets categorized by Project Group ID within the TDEI platform. It includes the total number of datasets and their cumulative size in megabytes for each type, such as osw, flex, and pathways.", + "operationId": "service-metrics", + "responses": { + "200": { + "description": "Successful response - Returns the service metrics.", + "content": { + "application/json": { + "schema": { + "title": "ServiceMetricsResponse", + "type": "object", + "$ref": "#/components/schemas/ServiceMetrics", + "description": "Holds the response data" + } + } + } + }, + "401": { + "description": "Unauthenticated request" + }, + "404": { + "description": "Not found error." + }, + "500": { + "description": "Internal server error." + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "AuthorizationToken": [] + } + ] + } + }, "/api/v1/recover-password": { "post": { "tags": [ @@ -4099,6 +4141,38 @@ "required": [ "totalUploads" ] + }, + "apiCalls": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0 + }, + "byApi": { + "type": "array", + "items": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "endpoint", + "count" + ] + } + } + }, + "required": [ + "total", + "byApi" + ] } } }, @@ -4201,6 +4275,43 @@ "dataMetrics", "datasetMetrics" ] + }, + "ServiceMetrics": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "format": "uuid" + }, + "service_name": { + "type": "string" + }, + "dataset_count": { + "type": "integer", + "minimum": 0 + }, + "total_unzipped_size_mb": { + "type": "number", + "minimum": 0 + } + }, + "required": [ + "service_id", + "service_name", + "dataset_count", + "total_unzipped_size_mb" + ] + } + } + }, + "required": [ + "services" + ] } }, "securitySchemes": {