Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 959 Bytes

conventions.md

File metadata and controls

55 lines (40 loc) · 959 Bytes

Conventions

Query Parameter Naming

Date from and to

On APIs best practice is to use the parameter names dateFrom and dateTo each parameter shall take its parameter as a UNIX timestamp in UTC.

?dateFrom=1640991600
&dateTo=1643670000

Aggregation

Is a enum to define the aggregation level for the response.

Possible values:

  • QUARTERHOUR
  • HOUR
  • DAY
  • WEEK
  • MONTH
  • YEAR
  • ACTUAL
  • TOTAL
?aggregation=HOUR

Time Zone

A time zone is expected to be supplied as an IANA/Olson Time Zone Identifier. The API will use the UTC/GMT time zone to generate output if a time zone is not provided. Note that the identifier must be URL encoded.

?timeZone=Europe%2FCopenhagen

Return object

JSON reponses must be a json object and not an array. If the response contains a list, this should be wrapped in an object.

{
    "result": [
        {...},
        {...}
    ]
}