Is there a way to see via an API if an repository has been opted in to the GitHub "Data Services" read-only access for dependecy graph and vulnerability alerts? I couldn't find it so far. It would be nice to set it via API and / or set an organisational policy for this too.
No, there's no way to do that via the API currently, though it's something the team would like to provide. I wish I had better news for you, but I don't. If there's anything else you'd like to see improved -- please let us know.
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!