Merge RestAPI with basic funcionality

maybe check against web ui code in main repo. some metadata is assured to ever be there with current code, you need to initialize them.