pacificclimate / weather-anomaly-data-service

Data service backend for Weather Anomaly tool.
0 stars 0 forks source link

Add endpoints for variables (with descriptions) #9

Open rod-glover opened 7 years ago

rod-glover commented 7 years ago

Return a list of descriptions of variables available for each dataset.

Request

GET /<dataset>/variables

returns

[
    {
        "identifier": String,  // internal identifier, e.g., 'tmax'
        "short_name": String,  // short human-readable name; may contain HTML; e.g., 'T<sub>max<sub>'
        "long_name": String,  // long human-readable name, e.g., 'Maximum Temperature',
        "description": String,  // human-readable full description, e.g., 'Monthly average of daily maximum temperature'
        "units": String  // human-readable units of measure, e.g., 'deg C'
    },
    ...
]
rod-glover commented 7 years ago

Alternatively, returns

{
    "<identifier>": { // internal identifier, e.g., 'tmax'
        "short_name": String,  // short human-readable name; may contain HTML; e.g., 'T<sub>max<sub>'
        "long_name": String,  // long human-readable name, e.g., 'Maximum Temperature',
        "description": String,  // human-readable full description, e.g., 'Monthly average of daily maximum temperature'
        "units": String  // human-readable units of measure, e.g., 'deg C'
    },
    ...
}