Added repository-api support: preliminary version

Change-Id: I8cd4caa2087d763ff081921e8e85c46863a96cbd