I'm seeing conflicting information:
On the other hand, the spring 18 release notes say that API Access for lightning containers has been revoked.
I tried to build the SOQL example app listed in the documentation and I did in fact get a
401: This session is not valid for use with the REST API.
So... I'm guessing it's not allowed anymore and this is just an example of Salesforce being horrible at updating their documentation?