added timestamp to apidocs template
throw exceptions in case of invalid response content

fixes #1842