Skip to content
Snippets Groups Projects
Commit 180cbc61 authored by Richard Olav Rud's avatar Richard Olav Rud
Browse files

Update api-specification.md

parent 6aacb68e
No related branches found
No related tags found
No related merge requests found
......@@ -4,13 +4,15 @@
The goal is to be able to provide coherent statistics from the data centre. In order to do this the ACTRIS DC Management Board would like for all ACTRIS DC units to provide their data provision and access statistics through an API and centralize the compilation of statistics at DVAS. DVAS will fetch the metrics and dislpay the information in the DVAS portal. The information is to be used for reporting to Head Office and ACTRIS DC Management Board.
**Currently the goal is to provide a POC by end of February including the access statistics and metrics proposed by CLU**
## Monitoring of access to ACTRIS data
The aim is to provide information on the monthly download, plotting and inspection of data in the ACTRIS data centre. How is the geographical distribution of users. And where are data used most intensively.
*Definitions*
One unique user: 1 unique = 1 IP address.
Users: the sum of all unique users of data, but exclude the access resulting the use and access by data centre staff (people working internally at CNR, CNRS, FMI, NILU on the DB e.g. developers and maintenance).
* One unique user: 1 unique = 1 IP address.
* Users: the sum of all unique users of data, but exclude the access resulting the use and access by data centre staff (people working internally at CNR, CNRS, FMI, NILU on the DB e.g. developers and maintenance).
### Metrics
......@@ -18,16 +20,23 @@ Users: the sum of all unique users of data, but exclude the access resulting the
* Monthly unique IPs
* Download by country
**Filter by: Facility, country , productType, download date**
**Filter by: Facility, country, productType, dateFrom, dateTo**
Results:
### GET /api/download/stats
Return download statistics based on the following query parameters:
Month, downloads in variable years
*dimensions:* Comma-separated list of dimensions. Supported combinations are yearMonth,downloads, yearMonth,uniqueIps and country,downloads.
*facility:* (optional) Filter downloads based on measurement facility. See https://head-office.fi/api/facilities for available facilities.
*country:* (optional) Filter downloads based on the country of measurement facility. The country is specified using ISO 3166-1 alpha-2 code.
*productTypes:* (optional) Comma-separated list of product types. Supported values are observation, model and fundamentalParameter.
*downloadDateFrom:* (optional) Include downloads on or after this date. Expects date in YYYY-MM-DD format.
*downloadDateTo:* (optional) Include downloads on or before this date. Expects date in YYYY-MM-DD format.
### Examples from CLU:
curl -u user:pass 'https://cloudnet.fmi.fi/api/download/stats?dimensions=yearMonth,downloads&country=FI'
returns monthly download statistics of data from all sites in Finland:
Returns monthly download statistics of data from all sites in Finland:
[
{ "yearMonth": "2021-02", "downloads": 0.08487337440109514 },
......@@ -35,17 +44,6 @@ returns monthly download statistics of data from all sites in Finland:
{ "yearMonth": "2022-11", "downloads": 26.00684462696783 }
]
### GET /api/download/stats
Return download statistics based on the following query parameters:
dimensions: Comma-separated list of dimensions. Supported combinations are yearMonth,downloads, yearMonth,uniqueIps and country,downloads.
site: (optional) Filter downloads based on measurement site. See https://cloudnet.fmi.fi/api/sites for available sites.
country: (optional) Filter downloads based on the country of measurement site. The country is specified using ISO 3166-1 alpha-2 code.
productTypes (optional) Comma-separated list of product types. Supported values are observation, model and fundamentalParameter.
downloadDateFrom (optional) Include downloads on or after this date. Expects date in YYYY-MM-DD format.
downloadDateTo (optional) Include downloads on or before this date. Expects date in YYYY-MM-DD format.
## ACTRIS Data provision
The aim is to provide information on the data provided to ACTRIS in the previous years. How many sites are contributing aiming for continues long-term measurement? How is this developing over time? How many sites and datasets are included in the NRT data provision?
......@@ -65,7 +63,7 @@ If relevant; For each period, include campaign data if there are measurements fo
Return download statistics based on the following query parameters:
*dimensions:* Comma-separated list of dimensions. Supported combinations are yearMonth variable, yearMonth facility and yearMonth instrument, yearMonth country
*facility:* (optional) Filter available datasets based on measurement facility. See https://head-office/api/facility for available facilities.
*facility:* (optional) Filter available datasets based on measurement facility. See https://head-office.fi/api/facility for available facilities.
*country:* (optional) Filter available datasets based on the country of measurement facilities. The country is specified using ISO 3166-1 alpha-2 code.
*productTypes:* (optional) Filter available datasets based on product type. Supported values are observation, model and fundamentalParameter.
*downloadDateFrom:* (optional) Include available datasets on or after this date. Expects date in YYYY-MM-DD format.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment