first commit

api rest functions from examples.