Support data types and output formats in API-based formatting

Change-Id: I6738c7db48bab4729930f70a9ecca57488ea8f0b
Merge "Support data types and output formats in API-based formatting"