RepositoryService: Added ability to create resoruces with arbitrary IDs. Fixes #35967