Add api.rst and reference it in index toctree