Differences
This shows you the differences between two versions of the page.
— | api [2017/10/09 07:29] – [Headers] knutkohl | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== API ====== | ||
+ | |||
+ | ===== Request ===== | ||
+ | |||
+ | ==== URL ==== | ||
+ | |||
+ | The base URL for all API calls against the latest API version is | ||
+ | |||
+ | https:// | ||
+ | |||
+ | There is also a [[http:// | ||
+ | |||
+ | ==== Parameters ==== | ||
+ | |||
+ | === time === | ||
+ | |||
+ | With this parameter you can define in which format the timestamps will be returned. | ||
+ | |||
+ | https:// | ||
+ | |||
+ | If not given, a simple date time format is used: '' | ||
+ | |||
+ | ^ Parameter value ^ Result format | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === damping === | ||
+ | |||
+ | With this parameter you can add a factor to adjust the forecasted watts in the morning and the evening. | ||
+ | |||
+ | https:// | ||
+ | |||
+ | See this [[Damping|further explanations]]. | ||
+ | ===== Response ===== | ||
+ | ==== Content type ==== | ||
+ | |||
+ | The API can deliver responses in [[http:// | ||
+ | |||
+ | The response format have to be defined by the '' | ||
+ | |||
+ | <code bash> | ||
+ | curl -H " | ||
+ | </ | ||
+ | |||
+ | If no '' | ||
+ | |||
+ | JSON : application/ | ||
+ | XML : application/ | ||
+ | CSV : text/csv | ||
+ | |||
+ | ==== Headers ==== | ||
+ | |||
+ | These are the most relevant headers returned from API. | ||
+ | |||
+ | ^ Header field ^ Value ^ | ||
+ | | Content-Type | application/ | ||
+ | | Date | Fri, 22 Sep 2017 08:08:38 GMT | | ||
+ | | Expires | Fri, 22 Sep 2017 08:08:52 GMT | | ||
+ | | Last-Modified | Fri, 22 Sep 2017 08:08:38 GMT | | ||
+ | | X-Ratelimit-Calls | 323 | | ||
+ | | X-Ratelimit-Limit | 720 | | ||
+ | | X-Ratelimit-Remaining | 397 | | ||
+ | | X-Ratelimit-Reset | 48 | | ||
+ | |||
+ | See rate limit specification [[api# | ||
+ | ==== Body ==== | ||
+ | |||
+ | Any JSON and XML response will contain these 2 sections | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== Valid request ==== | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | { | ||
+ | " | ||
+ | ... | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Invalid request ==== | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Rate limits ==== | ||
+ | |||
+ | Rate limits are defined by hour. | ||
+ | |||
+ | | Calls | Calls made this period. | ||
+ | | Limit | The maximum number of requests you're permitted to make per period. | ||
+ | | Remaining | ||
+ | | Reset | The number of seconds left in the current period. | ||