Add APIObject for generic inclusion of API objects.

Includes test and json/yaml getters and setters.