Add graph snapshot API endpoint.

Tests are all passing locally.