knowledge: Rest API

* Implements a first prototype of Rest API to deprecate
  old kb export. (addresses #2570)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>