setup api structure