The response to the API request is in the JSON format.
"data": {
"tstype": "ranked",
"tseries": [
{
"header": {
"id": {
"level": 10,
"parameterid": 211,
"sensor": 0,
"stationid": 18700
},
"extra": {
"element": {
"description": "Air temperature (default 2 m above ground), present value",
"id": "air_temperature",
"name": "Air temperature",
"unit": "degC"
},
"station": {
"location": [
{
"from": "1941-01-01T00:00:00Z",
"to": "9999-01-01T00:00:00Z",
"value": {
"elevation(masl/hs)": "94",
"latitude": "59.942300",
"longitude": "10.720000"
}
}
],
"shortname": "Oslo (Blindern)"
},
"timeseries": {
"geometry": {
"level": {
"unit": "m",
"value": "10"
}
},
"quality": {
"exposure": [
...
],
"performance": [
...
]
}
}
}
},
"observations": [
{
"time": "2022-10-20T08:00:00Z",
"body": {
"data": "2.9000001",
"qualitycode": "2"
}
},
...
]
},
...
]
}
{
"data": {
"tstype": "badevann",
"tseries": [
{
"header": {
"id": {
"buoyid": "1-34071",
"parameter": "temperature",
"source": "yr.no"
},
"extra": {
"name": "Kuvauen",
"pos": {
"lat": "10.83966",
"lon": "59.09197"
}
}
},
"observations": [
{
"time": "2020-07-29T16:00:00Z",
"body": {
"value": "17.0"
}
},
{
"time": "2020-07-31T12:29:00Z",
"body": {
"value": "19.5"
}
},
{
"time": "2020-08-01T08:44:00Z",
"body": {
"value": "18.5"
}
}
]
}
]
}
}
We use regular 4xx and 5xx http status codes, as close as possible to the HTTP specification. Some errors will have a message of what went wrong in it. You will get an error message if there are no data matching your request but this does not mean there is anything wrong with your request in itself, only that you will have to change your search criteria. Some errors will respond with JSON. Do not encode those JSON error responses, as they might change without proper versioning as described above.
There might be cases where the service can give a successfull response, but the response object is missing some data. In that case, we will include one or more warning messages in the object.