public function createUserGroup($groupPath, Request $request)
{
$userGroupLocation = $this->locationService->loadLocation($this->extractLocationIdFromPath($groupPath));
$createdUserGroup = $this->userService->createUserGroup($this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent())), $this->userService->loadUserGroup($userGroupLocation->contentId));
$createdContentInfo = $createdUserGroup->getVersionInfo()->getContentInfo();
$createdLocation = $this->locationService->loadLocation($createdContentInfo->mainLocationId);
$contentType = $this->contentTypeService->loadContentType($createdContentInfo->contentTypeId);
return new Values\CreatedUserGroup(array('userGroup' => new Values\RestUserGroup($createdUserGroup, $contentType, $createdContentInfo, $createdLocation, $this->contentService->loadRelations($createdUserGroup->getVersionInfo()))));
}