rest-api: Update background operations

Return the metadata dict on creation and allow storing multiple related
resources.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Indeed