The Epic ecosystem is actually pretty open now. They have multiple web service APIs with full documentation, and even provide a developer sandbox you can use to test client applications.
https://open.epic.com/
Epic also has an app store. You can write your own SMART on FHIR apps, then deploy them inside the EHR with full access to patient data.
https://apporchard.epic.com/