-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The OpenAPI specification for the api/installation/metrics endpoint appears to be out of sync with the actual API response. Currently, the endpoint returns an Installation object that includes a metrics field, which contains a subset of InformationMetric objects (excluding the installation field).
However, the OpenAPI spec defines a separate InstallationMetric object that includes a nested installation field, which is no longer reflected in the actual response.
The current response format—returning a single Installation object with embedded metrics—is preferable. Only the OpenAPI spec needs to be updated to reflect this structure. This ensures that all relevant data is accessible directly from the Installation object when metrics are included.
Snippets of both the spec and actual response are attached for reference.
See discussion with @pdurbin on Zulip.
OpenAPI Spec
The response is defined as including the installation within the metric, both on the same hierarchical level:
"200": {
"description": "Registered installations metrics by month success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InstallationMetrics"
}
},"InstallationMetrics": {
"type": "object",
"description": "Dataverse installation metrics",
"properties": {
"installation": {
"$ref": "#/components/schemas/Installation"
},
"recordDate": {
"type": "string",
"format": "date-time",
"description": "Date when the metrics were captured",
"example": "2024-10-31T20:13:03.422+00:00"
},
"files": {
"type": "integer",
"format": "int64",
"description": "Number of files in the Dataverse installation",
"example": 100000
},
}The actual response is the other way around. The Installation object contains the metrics within the metrics property. Here is an example output:
{
"dvHubId": "DVN_JOHNS_HOPKINS_RESEARCH_DATA_REPOSITORY_2013",
"name": "Johns Hopkins Research Data Repository",
"country": "USA",
"continent": "North America",
"launchYear": 2013,
"metrics": [
{
"recordDate": "2025-03-14T09:04:19.638513",
"files": 10449,
"downloads": 68983,
"datasets": 505,
"harvestedDatasets": 0,
"localDatasets": 505,
"dataverses": 66
}
]
},