move api to new version and add tests

Those 4 constants should probably be made private.