Spike/api hyperagent

https://www.openproject.org/work_packages/8319
https://www.openproject.org/work_packages/11927
i don't think i would have done this unless it hadn't worked. but i'll try.