RepRapFirmware (RRF) and Duet Software Framework (DSF) have APIs that are accessible over the network (RepRapFirmware and Duet Software Framework), or directly on the SBC (Duet Software Framework).
The API documentation is hosted on github within the project repositories.