Merge RestAPI with basic funcionality

.close() ?