Add metadata specification API

Change-Id: I0aa8b438acb856e170dcc1e1979bb255558cdbfb