Feature/api create and delete relationship

@hschink I was just trying to use code as similar to the original as possible - no other reason.