add api functions

API to rst — first cut.
It seems you got the header rows as well.