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>
The [[ here looks like a typo.