Add API functions and specs.
Add union example.