finished rewrite ajax-API

Signed-off-by: Andrwe Lord Weber <lord-weber-andrwe@andrwe.org>